Returns realtime operational status of the Urania API and database connection.
{
"status": "operational",
"version": "1.0.0",
"database": "connected",
"timestamp": "2026-09-22T17:00:00+00:00",
"uptime": "0.04s"
}
A high-performance, strictly typed REST API for geographical data worldwide. Covers sovereign nations, administrative divisions, cities, coordinates, and spatial queries.
All API access is conducted over HTTPS. Endpoints are versioned in the URI path under /v1/. To get started, obtain an API key from the developer dashboard.
curl -H "X-API-Key: YOUR_API_KEY" \
"https://urania.obilodev.com/api/v1/countries/NG"
Pass your API key in every request using the X-API-Key HTTP request header.
| Header | Type | Description |
|---|---|---|
X-API-Key |
string | Your project secret key (format: sk_live_...). Required for all non-public endpoints. |
Accept |
string | Set to application/json. |
Urania responses are standardized in a predictable envelope with two top-level keys: data and meta.
{
"data": [
// Resource object or array of objects
],
"meta": {
"timestamp": "2026-09-22T17:00:00.000000Z",
"data_source": "REST Countries v3.1 / GeoNames / Manual curation",
"last_updated": "2026-06-26T00:00:00Z",
"pagination": {
"current_page": 1,
"last_page": 13,
"per_page": 20,
"total": 250,
"from": 1,
"to": 20
},
"record_count": 20
}
}
Urania uses standard HTTP status codes to communicate success or failure:
| Code | Status | Meaning |
|---|---|---|
200 OK |
Success | The request succeeded and returned the requested payload. |
304 Not Modified |
Cached | Payload has not changed since the provided If-None-Match ETag. |
400 Bad Request |
Validation Error | Invalid parameters supplied (e.g. missing lat/lng coordinates). |
401 Unauthorized |
Auth Failure | Missing, revoked, or invalid X-API-Key. |
403 Forbidden |
Scope Denied | API key does not hold the required permission scope (e.g., read-cities). |
404 Not Found |
Not Found | The requested country, state, or city identifier does not exist. |
429 Too Many Requests |
Rate Limited | You have exceeded your per-minute burst rate or monthly request quota. |
500 Server Error |
Internal Error | Unexpected server error. Our engineering team receives automatic incident alerts. |
All read responses contain an ETag HTTP header representing a cryptographic hash of the content. You can pass this back in the If-None-Match request header. If the dataset has not changed, Urania responds with 304 Not Modified (0 bytes transferred, 0 quota consumed).
Every authenticated request returns rate limit telemetry in the HTTP response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit |
Your per-minute burst rate ceiling (default: 1,000). |
X-RateLimit-Remaining |
Remaining requests available in the current 60-second window. |
X-RateLimit-Reset |
Unix epoch timestamp when the current rate limit window refreshes. |
Returns realtime operational status of the Urania API and database connection.
{
"status": "operational",
"version": "1.0.0",
"database": "connected",
"timestamp": "2026-09-22T17:00:00+00:00",
"uptime": "0.04s"
}
Retrieve a paginated list of all 250 sovereign countries and autonomous territories.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number for pagination. |
per_page | integer | 20 | Items per page (max: 100). |
name | string | null | Case-insensitive substring search across country names. |
continent | string | null | Filter by continent: Africa, Europe, Asia, Americas, Oceania, Antarctica. |
region | string | null | Filter by UN region (e.g. Western Africa, Northern America). |
currency | string | null | Filter by 3-letter currency code (e.g. USD, EUR, NGN). |
sort | string | name | Sort field: name, -name, population, -population, areaKm2, -areaKm2. |
curl -H "X-API-Key: YOUR_KEY" \
"https://urania.obilodev.com/api/v1/countries?continent=Africa&per_page=2"
{
"data": [
{
"id": 160,
"name": "Nigeria",
"iso2": "NG",
"iso3": "NGA",
"phoneCode": "+234",
"currency": "NGN",
"flag": null,
"flagEmoji": "🇳🇬",
"timezone": "Africa/Lagos",
"timezones": ["Africa/Lagos"],
"continent": "Africa",
"region": "Africa",
"subregion": "Western Africa",
"population": 218541212,
"areaKm2": 923768,
"languages": { "eng": "English", "hau": "Hausa", "yor": "Yoruba", "ibo": "Igbo" },
"tld": [".ng"],
"borders": ["BEN", "CMR", "TCD", "NER"],
"lat": 10.0,
"lng": 8.0
}
],
"meta": {
"timestamp": "2026-09-22T17:00:00.000000Z",
"data_source": "REST Countries v3.1 / GeoNames / Manual curation",
"last_updated": "2026-06-26T00:00:00Z",
"pagination": {
"current_page": 1,
"last_page": 27,
"per_page": 2,
"total": 54,
"from": 1,
"to": 2
},
"record_count": 2
}
}
Lookup a single country by its numeric database id, ISO 3166-1 alpha-2 code (e.g. NG, US, GB), or ISO 3166-1 alpha-3 code (e.g. NGA, USA, GBR).
curl -H "X-API-Key: YOUR_KEY" "https://urania.obilodev.com/api/v1/countries/NG"
Fetch all administrative subdivisions (states, provinces, regions) belonging to the specified country.
curl -H "X-API-Key: YOUR_KEY" "https://urania.obilodev.com/api/v1/countries/NG/states"
Ultra-low-latency prefix search optimized for UI typeahead search fields.
{
"data": [
{ "id": 160, "name": "Nigeria", "iso2": "NG", "iso3": "NGA" },
{ "id": 161, "name": "Niger", "iso2": "NE", "iso3": "NER" }
]
}
Retrieve a paginated list of states and provinces across all countries.
| Parameter | Type | Description |
|---|---|---|
country_code | string | Filter states by country ISO2 code (e.g. NG, CA, US). |
country_id | integer | Filter states by internal country ID. |
name | string | Case-insensitive substring search for state names. |
code | string | Exact match for state subdivision code (e.g. LA, ON, TX). |
page | integer | Page number (default: 1). |
per_page | integer | Items per page (max: 100). |
{
"data": [
{
"id": 90,
"name": "Lagos",
"capital": "Ikeja",
"slogan": "Centre of Excellence",
"code": "LA",
"lat": 6.5244,
"lng": 3.3792,
"countryId": 160
}
],
"meta": {
"pagination": { "current_page": 1, "total": 37, "per_page": 20 }
}
}
Retrieve single state details by numeric state ID or state code.
Retrieve all cities within a specified state or province.
curl -H "X-API-Key: YOUR_KEY" "https://urania.obilodev.com/api/v1/states/90/cities"
Prefix search for state names and codes.
Retrieve a paginated list of cities worldwide with coordinates.
| Parameter | Type | Description |
|---|---|---|
state_id | integer | Filter cities belonging to a parent state ID. |
country_code | string | Filter cities belonging to a country ISO2 code. |
name | string | Case-insensitive substring search for city name. |
page | integer | Page number (default: 1). |
per_page | integer | Items per page (max: 100). |
{
"data": [
{
"id": 14502,
"name": "Ikeja",
"lat": 6.6059,
"lng": 3.3491,
"stateId": 90,
"countryId": 160
}
]
}
Find cities within a specified radius of a geographic coordinate point using the Haversine spatial equation.
| Parameter | Required | Type | Description |
|---|---|---|---|
lat | Required | float | Latitude (-90.0 to 90.0). |
lng | Required | float | Longitude (-180.0 to 180.0). |
radius | Optional | integer | Radius in kilometers (default: 50, max: 500). |
curl -H "X-API-Key: YOUR_KEY" \
"https://urania.obilodev.com/api/v1/cities/nearby?lat=6.5244&lng=3.3792&radius=30"
{
"data": [
{
"id": 14502,
"name": "Ikeja",
"lat": 6.6059,
"lng": 3.3491,
"stateId": 90,
"countryId": 160,
"distance_km": 9.65
}
]
}
Lookup a single city by its unique integer ID.
Instant prefix search across city names worldwide.
Urania compiles typed SDK client packages directly from its OpenAPI specification. You can download and import them directly into your project: