<!-- generated by scripts/docs/generate-reference.ts — do not edit -->

astro_geocode

Place-name → coordinates + timezone. basic Free; atlas Paid (historical TZ + DST).

  • Layer: utility
  • Methods: basic, atlas
  • Free tier: basic
  • Paid tier: atlas

Description

Place-name → coordinates + timezone. `basic` Free; `atlas` Paid (historical TZ + DST).

Methods:
  basic [Free] — place name → matching places with coordinates + IANA timezone (Photon/OSM backend)
  atlas [Paid] — timezones + UTC offset at a coordinate (historical TZ via Intl)

Input schema

basic

FieldTypeRequiredConstraints
querystringyesminLength 2
limitintegernomin 1, max 10, int

Example request

{
  "method": "basic",
  "query": "London"
}

Example response (captured; long values elided)

{
  "places": [
    {
      "name": "London",
      "country": "United Kingdom",
      "state": "England",
      "latitude": 51.5085,
      "longitude": -0.1257,
      "timezone": "Europe/London"
    },
    {
      "name": "London",
      "country": "Canada",
      "state": "Ontario",
      "latitude": 42.9834,
      "longitude": -81.233,
      "timezone": "America/Toronto"
    },
    {
      "name": "London",
      "country": "United States",
      "state": "Ohio",
      "latitude": 39.8865,
      "longitude": -83.4483,
      "timezone": "America/New_York"
    },
    {
      "name": "London",
      "country": "United States",
      "state": "Kentucky",
      "latitude": 37.129,
      "longitude": -84.0833,
      "timezone": "America/New_York"
    },
    {
      "name": "London",
      "country": "United States",
      "state": "California",
      "latitude": 36.4761,
      "longitude": -119.4432,
      "timezone": "America/Los_Angeles"
    }
  ]
}

atlas

FieldTypeRequiredConstraints
latitudenumberyesmin -90, max 90
longitudenumberyesmin -180, max 180
atUtc.yearintegeryesint
atUtc.monthintegeryesmin 1, max 12, int
atUtc.dayintegeryesmin 1, max 31, int
atUtc.hourintegeryesmin 0, max 23, int
atUtc.minuteintegeryesmin 0, max 59, int

Example request

{
  "method": "atlas",
  "latitude": 51.5074,
  "longitude": -0.1278
}

Example response (captured; long values elided)

{
  "timezones": [
    "Europe/London"
  ],
  "primary": "Europe/London",
  "utcOffsetMinutes": 0
}