Location and Timezone API

Geocoding autocomplete with coordinates and timezone for astrology apps

City SearchGeocodingTimezone …and so much more

<50mslatency
99.95%+uptime

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=New York&limit=1
{
  "total": 216,
  "limit": 1,
  "offset": 0,
  "cities": [
    {
      "city": "New York City",
      "province": "New York",
      "country": "United States",
      "iso2": "US",
      "latitude": 40.71427,
      "longitude": -74.00597,
      "timezone": "America/New_York",
      "utcOffset": -4,
      "population": 8175133
    }
  ]
}

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 with 23,000+ cities across 240+ countries, returning 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. Fully offline dataset with sub-5ms lookups and fields that map directly to the astrology endpoints. One key covers every RoxyAPI domain, with Remote MCP and typed SDKs.

Every Location and Timezone calculation is covered by 5,114 automated tests per deploy, 828 of them gold-standard tests locked to named external references such as NASA JPL Horizons, with a public MIT benchmark repo anyone can clone and re-run. See how we test.

Key Features

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

City autocomplete search across 23,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 240+ 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.

Drop-in UI components

Render Location and Timezone responses without building charts yourself. These open source, framework-agnostic web components take the typed API response and draw it, in React, Vue, Svelte, Angular, plain HTML, and WordPress.

MIT licensedFramework agnosticThemeable via CSS variablesjsDelivr CDN
ElementRenders
<roxy-location-search>Debounced city search input, emits roxy-location-select

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 240+ 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.

The receipts are public: the testing methodology, the open MIT benchmark, the transparency report, and the live API playground. 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 — every endpoint auto-discovered as a tool by Claude, ChatGPT, Cursor over Streamable HTTP. No Docker.
  • Token-optimized responses — opt-in compact mode returns the same data with each field name sent once, cutting the tokens your agent reads per call by roughly 40 to 52 percent. Lossless, and one call still counts as one request.
  • 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.

From your AI agent to a verified Location and Timezone answer.

Your AI agentyour model, your voice
Remote MCPauto-discovered, no local setupToken-optimized
Roxy Ephemeris5,114 tests, 828 vs NASA JPL
Verified result12 domains, one flat rate

Your agent grounds every answer in verified calculations and replies in your own voice, so it never hallucinates a chart, date, or reading. No local setup, no AGPL, no hosted-AI markup.

Audit it yourself: every Location and Timezone endpoint runs live in the API playground

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 23,000+ cities across 240+ 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 America/New_York, Europe/Berlin, or Australia/Sydney. 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 240+ 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. Every endpoint, MCP server, SDK, and starters.

Plans from $39/mo, starting at $2.70 per domain on annual billing. No credit card required for testing.

View Pricing & Get API Key