Place Lookup API by place_id
Get one place
GET/v1/places/{place_id}
1 credit · Secret key (test or live) · getPlace
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
place_id required | path | string |
Response
JSON { data, meta, warnings }, where data is:
place_idstring requirednamestring requiredstatestringcountrystring requiredlatitudenumber requiredlongitudenumber requiredtimezonestring requiredpopulationinteger
Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.
Example request
curl 'https://api.astrologics.in/v1/places/pl_2028' \
-H 'Authorization: Bearer al_test_YOUR_KEY'
Node.js
const res = await fetch("https://api.astrologics.in/v1/places/pl_2028", {
headers: { Authorization: "Bearer al_test_YOUR_KEY" },
});
console.log(JSON.stringify(await res.json(), null, 2));Python
import json
import urllib.error
import urllib.request
req = urllib.request.Request(
"https://api.astrologics.in/v1/places/pl_2028",
method="GET",
headers={"Authorization": "Bearer al_test_YOUR_KEY"},
)
try:
with urllib.request.urlopen(req) as res:
print(json.dumps(json.load(res), indent=2, ensure_ascii=False))
except urllib.error.HTTPError as err:
print(err.code, err.read().decode())PHP
<?php
$ch = curl_init('https://api.astrologics.in/v1/places/pl_2028');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY'],
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;Example response
200 OK · 398 characters
{
"data": {
"place_id": "pl_2028",
"name": "Noida",
"country": "India",
"latitude": 28.58,
"longitude": 77.33,
"timezone": "Asia/Kolkata",
"state": "Uttar Pradesh",
"population": 293908
},
"meta": {
"request_id": "req_example",
"api_version": "v1",
"engine_version": "2026.10.4",
"mode": "live",
"credits_charged": 1
},
"warnings": []
}Try it
More in Places & time
- Birth Place Search API: Search birth places
- Reverse Geocoding API for Birth Places: Nearest real settlement to coordinates
- Historical Timezone API: IANA zone and UTC offset at a moment and place