Skip to content
BestAstroAPI

Places & time zones

Place by id

GET/v1/places/{id}

One place by the id from place search.

Request

No request body.

Example

curl -X GET "https://api.bestastroapi.in/v1/places/1270927" \
  -H "x-api-key: $BESTASTRO_KEY"

Try it live

Sends a real request from your browser.

Response

  • [] is a list. {key} is a key that varies.
FieldTypeMeaning
placePlaceThe place

Objects used above

Place A city, town or village.

FieldTypeMeaning
idintegerStable id. Send it as place_id to any calculation
namestringName
districtstring or nullDistrict or county
statestring or nullState or province
countrystringCountry
country_codestringTwo-letter country code
labelstringReady to show: name, district for smaller places, state, country
latnumberdegreesLatitude
lonnumberdegreesLongitude
tzstringIANA time zone
populationinteger or nullPopulation. Null when not known, which is usual for villages
matchstringWhy it is listed. Only in place search optionalexact | starts_with | contains | other_name | similar
utc_offsetstringUTC offset at datetime. Only in place search with datetime optional
Raw sample
200 application/json
{
  "place": {
    "country": "India",
    "country_code": "IN",
    "district": "Gorakhpur",
    "id": 1270927,
    "label": "Gorakhpur, Uttar Pradesh, India",
    "lat": 26.76628,
    "lon": 83.36889,
    "name": "Gorakhpur",
    "population": 674246,
    "state": "Uttar Pradesh",
    "tz": "Asia/Kolkata"
  }
}

Real output for the example request above.

Errors use one format. See error codes. Also in openapi.json.

Welcome! How will you use it?

We'll show you what matters to you. You can switch any time at the top.