Location and Timezone API

Geocoding autocomplete with coordinates and timezone for astrology apps

<50mslatency
uptime
endpoints

Start building in seconds.

Want to try without writing code? Try this domain live in API playground →

Terminal
npm install @roxyapi/sdk
import { createRoxy } from '@roxyapi/sdk'

const roxy = createRoxy(process.env.ROXY_API_KEY!)
const { data } = await roxy.location.get(/* ... */)
SDK docs

Want to ship faster? Clone a free template and go from zero to production in 30 minutes.

Building with Cursor, Claude Code, or Bolt? Use our AI prompts to generate a complete app in minutes.

Building on WordPress? Install the RoxyAPI plugin and drop a shortcode, no code required.

GET /api/v2/location/search?q=Mumbai
{
  "total": 1,
  "limit": 10,
  "offset": 0,
  "cities": [
    {
      "city": "Mumbai",
      "province": "Maharashtra",
      "country": "India",
      "iso2": "IN",
      "latitude": 19.07283,
      "longitude": 72.88261,
      "timezone": "Asia/Kolkata",
      "utcOffset": 5.5,
      "population": 12691836
    }
  ]
}

Structured JSON with documented fields. Not hallucinated text. See all endpoints

Works with your stack

Claude CodeCursorAntigravityChatGPTWindsurfVS Code CopilotOpenAI AgentsGeminiLangChainCrewAIVercel AI SDK

City search and geocoding API + hosted MCP for AI agents and astrology apps. Connect Claude Code, Cursor, VS Code in seconds, no local setup. 7,000+ cities across 227 countries. Returns latitude, longitude, IANA timezone, and DST-aware UTC offset. The location layer for birth chart forms, horoscope apps, event planners, and any feature that needs place-to-coordinates resolution.

Key Features

Everything you need from our Location and Timezone API, built for production:

City autocomplete search across 7,000+ cities worldwide, sorted by relevance and population

Latitude, longitude, IANA timezone, and UTC offset in every result for direct use in astrology APIs

Global coverage across 227 countries with ISO 3166 codes

DST-aware UTC offset that adjusts automatically for daylight saving time

Fully offline dataset with sub-5ms response times, no external geocoding API dependencies

Response fields map directly to astrology API parameters for seamless integration

All Endpoints

Click any endpoint to view detailed documentation, parameters, and response examples.

Search cities worldwide - Geocoding autocomplete with coordinates and timezoneCity autocomplete and geocoding search across 23,000+ locations in 240+ countries, including deep coverage of Indian tier-2 and tier-3 cities. Returns geographic coordinates (latitude, longitude), IANA timezone, and DST-aware UTC offset for each match. Built for birth chart location pickers, horoscope apps, event scheduling, and any feature requiring place-to-coordinates resolution. Partial name matching with intelligent ranking: exact prefix matches first, then sorted by population for relevance. Common alternate names like Bombay, Calcutta, Madras, and Banaras transparently resolve to their canonical entries.List all countries - ISO codes and city coverageReturns every country with ISO 3166-1 alpha-2 and alpha-3 codes, plus the number of searchable cities per country. Use this endpoint to build country dropdown menus, regional filters, or to check city coverage before querying. Sorted alphabetically by country name. Covers Europe, Americas, Asia, Middle East, Africa, and Oceania.Get cities in a country - Geocoding directory sorted by populationReturns all cities for a specific country, identified by ISO 3166-1 alpha-2 code (e.g. DE for Germany, FR for France, GB for United Kingdom, US for United States). Each city includes geographic coordinates, IANA timezone, and DST-aware UTC offset for direct use in astrology birth chart, horoscope, transit, and panchang calculations. Cities sorted by population with the largest metropolitan areas first.

What You Can Build with Location and Timezone API

Real-world applications and use cases for integrating Location and Timezone API into your projects:

Birth chart location picker: autocomplete city search that auto-fills latitude, longitude, and timezone

Event location for transits: get coordinates and timezone for planetary transit and panchang calculations

Timezone conversion: look up IANA timezone and current UTC offset for any city worldwide

Country and city directory: browse all 227 countries and their cities for location dropdowns and filters

What developers are saying

DM

Dhani M.

Indie App Developer

Shipped an astrology app over a long weekend. Birth charts, nakshatras, KP cusps, significators. I verified the Lahiri ayanamsha values independently and they line up with my reference. One API key for all of it.

Email feedback
TH

Tom H.

Senior Developer

The OpenAPI spec is the most complete I have seen in this space. Generated a type-safe TypeScript client from it in seconds. Every field has descriptions and examples. Production-grade documentation.

Email feedback
CW

Chris W.

Backend Engineer

Response times consistently under 50ms for numerology and tarot endpoints. The API returns structured JSON with every field documented. Integrated it into our platform in an afternoon.

Email feedback

Do not take our word for it. Ask the agents.

Every page here is built so AI search engines can read and cite it, so go straight to the source. Let ChatGPT, Perplexity, or Claude search the web and tell you what they find about RoxyAPI accuracy, MCP, SDKs, and pricing.

Opens a live web search in a new tab.

Getting started with Location and Timezone API.

From zero to production in 3 steps. No signup required for testing.

3 Steps to Ship

1Install the SDKnpm i @roxyapi/sdk
2Get your API keyView Plans
3Make your first callView Docs

Agent-Ready Infrastructure

MCP

Remote MCP, llms.txt, and AGENTS.md. The full agent-readiness stack for 12 spiritual domains under one key.

  • Remote MCP server — tools auto-discovered by Claude, ChatGPT, Cursor over Streamable HTTP. No Docker.
  • llms.txt — AI-native discovery surface for ChatGPT, Perplexity, and Gemini citation
  • AGENTS.md — 2026 execution playbook for Cursor, Codex, Windsurf, Aider, Claude Code, Gemini CLI. Bundled in the SDK.

Location and Timezone API FAQ

How do I turn a birth city into latitude and longitude?

Send a city name to the location API and get back precise latitude and longitude in one call. The dataset covers 7,000+ cities across 227 countries, ranked so the largest matching place leads. This is city-level resolution built for birth and event forms, not street addresses. The coordinates drop straight into every birth chart, kundli, panchang, and forecast request, all under one API key with all 12 spiritual domains included at one flat price.

How do I get the correct IANA timezone for a birth place?

Every result from the location API carries the IANA timezone for that place, such as Asia/Kolkata, Europe/Berlin, or America/New_York. That single value is what the chart and panchang endpoints need to anchor a reading to true local time. You can read it through the typed SDKs for TypeScript, Python, or PHP, or fetch it agent-side through our Remote MCP server with no local setup and no Docker. One lookup gives you coordinates and timezone together.

How does city autocomplete work for a birth data form?

Wire a text input to the location API and each keystroke returns ranked city matches in milliseconds, fast enough for live typeahead. Typing ber surfaces Berlin, Bern, and Bergen, most likely first. Selecting one suggestion fills the entire location step at once: city, country, coordinates, and timezone. It is the setup layer that feeds the rest of the platform, and our drop-in UI components and WordPress plugin let you ship that picker without building it from scratch.

How do I handle daylight saving time in birth charts?

Pass the IANA timezone from the location API into any chart endpoint and daylight saving is handled for you. The chart endpoints resolve that identifier to the offset that was actually in effect on the birth date, so a January New York birth resolves correctly and a July birth does too. This removes the classic bug where a summer offset gets piped into a winter chart and quietly shifts every house. Accuracy at this layer is why one location call protects every downstream reading.

How do I build a country and city picker for global signups?

The location API ships a full directory: all 227 countries with their ISO codes, plus the cities in each one with coordinates and timezone already attached. Use it to power country dropdowns and dependent city lists for a worldwide audience without sourcing or cleaning your own geo data. Activation is instant, so the directory is live the moment you get your key. The same directory is reachable through the typed SDKs and our Remote MCP server for AI agents.

Why use this instead of stitching together a separate geocoding service?

The location API is the front door to the whole RoxyAPI platform: the same key that resolves a city also runs all 12 spiritual domains, from Western and Vedic astrology to numerology, tarot, and forecast. You get coordinates and timezone in the exact shape the chart endpoints expect, so there is no glue code between geocoding and calculation. Pricing is flat and predictable with no per-call geocoding bill, and discovery surfaces like AGENTS.md and llms.txt make the whole platform easy for agents to find and use.

Start using Location and Timezone API today.

Geocoding autocomplete with coordinates and timezone for astrology apps

All 12 domains included with every plan. 3+ endpoints, MCP server, SDK, and starters.

Plans from $39/mo — thats $3.25 per domain. No credit card required for testing.

View Pricing & Get API Key