Getting Started
AtlasPI is a structured historical geographic database designed for AI agents. It provides coordinates, GeoJSON boundaries, and historical metadata for geopolitical entities across all eras — from 4500 BCE to 2024.
Base URL & Response Format
https://atlaspi.cra-srl.com/v1/.
Years are integers — negative values represent BCE dates (e.g., -500 = 500 BCE).
Every entity includes a confidence_score (0.0-1.0) and sources array.
# Get all empires that existed in 1500 CE curl -s https://atlaspi.cra-srl.com/v1/entity?year=1500&type=empire # World snapshot for a given year curl -s https://atlaspi.cra-srl.com/v1/snapshot/1500 # Find entities near Rome curl -s "https://atlaspi.cra-srl.com/v1/nearby?lat=41.9&lon=12.5&year=100" # Random entity curl -s https://atlaspi.cra-srl.com/v1/random
Entities API
Query geopolitical entities (empires, kingdoms, city-states, etc.) with filtering by year, type, continent, and more. Each entity has original-language names, coordinates, GeoJSON boundaries, confidence scores, and academic sources.
Returns entities filtered by year, type, continent, status, and confidence. Supports pagination.
| Name | Type | Description |
|---|---|---|
| year | int | Filter entities that existed in this year (negative = BCE) |
| type | string | Entity type: empire, kingdom, city_state, etc. |
| continent | string | Filter by continent |
| status | string | confirmed, disputed, approximate |
| confidence_min | float | Minimum confidence score (0.0-1.0) |
| limit | int | Results per page (default 50) |
| offset | int | Pagination offset |
curl -s "https://atlaspi.cra-srl.com/v1/entity?year=1200&type=empire&limit=3"
Returns all entities with pagination support. Lighter than /v1/entity when no filters needed.
| Name | Type | Description |
|---|---|---|
| limit | int | Results per page (default 50) |
| offset | int | Pagination offset |
Returns full details for a single entity, including GeoJSON boundaries and all metadata.
| Name | Type | Description |
|---|---|---|
| entity_id required | int | Entity ID |
Returns all entities that existed in the given year, with summary statistics by type and continent.
| Name | Type | Description |
|---|---|---|
| year required | int | Year (negative = BCE) |
| type | string | Filter by entity type |
Find entities near a geographic point, optionally filtered by year.
| Name | Type | Description |
|---|---|---|
| lat required | float | Latitude |
| lon required | float | Longitude |
| year | int | Filter by year |
| radius_km | float | Search radius in km |
Returns a random entity from the database. Useful for discovery and testing.
Returns all distinct entity types in the database with counts.
Returns all distinct continents with entity counts.
Returns aggregate statistics about the database: total entities, breakdown by type, continent, temporal coverage.
Search entities by name (original name, English name, or variants). Returns ranked results.
| Name | Type | Description |
|---|---|---|
| q required | string | Search query |
| limit | int | Max results (default 10) |
Events API
Historical events linked to entities — battles, treaties, conquests, and more. Each event has date precision metadata, geographic coordinates, and ethical annotations.
Returns historical events filtered by type, year range, entity, and more.
| Name | Type | Description |
|---|---|---|
| event_type | string | battle, treaty, conquest, founding, etc. |
| year_min | int | Start of year range |
| year_max | int | End of year range |
| entity_id | int | Filter by related entity |
| limit | int | Results per page (default 50) |
| offset | int | Pagination offset |
Returns all distinct event types with counts.
Returns full details for a single historical event.
| Name | Type | Description |
|---|---|---|
| event_id required | int | Event ID |
Returns events that occurred on a specific month/day across all years.
| Name | Type | Description |
|---|---|---|
| mm_dd required | string | Month-day format, e.g. "10-14" for Oct 14 |
Returns all historical events linked to a specific entity.
| Name | Type | Description |
|---|---|---|
| entity_id required | int | Entity ID |
date_precision field (DAY, MONTH, YEAR, DECADE, CENTURY, APPROXIMATE)
indicating how precise the recorded date is. Ancient events often have APPROXIMATE or CENTURY precision.
Cities & Trade Routes API
Historical cities and trade routes with geographic coordinates and temporal data.
Returns historical cities with coordinates, founding dates, and associated entities.
| Name | Type | Description |
|---|---|---|
| city_type | string | capital, port, religious, trade_hub, etc. |
| entity_id | int | Filter by owning entity |
| limit | int | Results per page |
Returns full details for a single city.
Returns historical trade routes with waypoints, time periods, and associated entities.
| Name | Type | Description |
|---|---|---|
| route_type | string | land, sea, river |
| limit | int | Results per page |
Returns full details for a single trade route including waypoints.
Dynasty Chains API
Succession chains linking entities across time — dynasty sequences, colonial chains, ideological lineages. Each chain includes transition metadata (type, violence, ethical notes).
Returns all dynasty/succession chains with their links. Filterable by type and region.
| Name | Type | Description |
|---|---|---|
| chain_type | string | SUCCESSION, DYNASTY, COLONIAL, IDEOLOGICAL, RESTORATION |
| region | string | Filter by region |
Returns all distinct chain types with counts.
Returns full chain details including all links with transition metadata and ethical notes.
Returns entities that precede the given entity in any dynasty chain.
Returns entities that follow the given entity in any dynasty chain.
Search & Export API
Unified search across all data types and bulk export in CSV, GeoJSON, and JSON formats.
Search across entities, events, cities, and trade routes. Results ranked by relevance with filters.
| Name | Type | Description |
|---|---|---|
| q required | string | Search query (min 2 chars) |
| data_type | string | entity, event, city, route |
| entity_type | string | Filter entities by type |
| year_min | int | Start of year range |
| year_max | int | End of year range |
| status | string | confirmed, disputed, approximate |
| sort | string | relevance, name, year, confidence |
| limit | int | Results per page (default 20) |
| offset | int | Pagination offset |
Tolerant search that handles misspellings and partial matches.
| Name | Type | Description |
|---|---|---|
| q required | string | Search query |
| limit | int | Max results |
Bulk export entities in CSV or GeoJSON format. Max 1000 rows per request.
| Name | Type | Description |
|---|---|---|
| format required | string | csv or geojson |
| entity_type | string | Filter by type |
| year_min | int | Start of year range |
| year_max | int | End of year range |
Bulk export events in CSV or JSON format. Max 1000 rows per request.
| Name | Type | Description |
|---|---|---|
| format required | string | csv or json |
| event_type | string | Filter by event type |
| year_min | int | Start of year range |
| year_max | int | End of year range |
Timeline & Compare API
Timeline data for visualization and side-by-side entity comparison.
Returns entity data structured for timeline visualization: start/end years, type, region.
| Name | Type | Description |
|---|---|---|
| region | string | Filter by continent/region |
| type | string | Filter by entity type |
| year_min | int | Start of year range |
| year_max | int | End of year range |
Side-by-side comparison of 2-4 entities with overlap analysis, shared events, and chain context.
| Name | Type | Description |
|---|---|---|
| ids required | string | Comma-separated entity IDs (2-4), e.g. "1,2,3" |
Legacy pair comparison. Use /v1/compare?ids= for the newer multi-entity comparison.
Relations API
Explore relationships between entities: contemporaries, related polities, evolution over time.
Returns entities with overlapping temporal ranges.
Returns the temporal evolution of an entity: boundary changes, name changes, type transitions.
Returns a timeline of key events and milestones for a specific entity.
Admin & Insights API
Traffic analytics, data coverage reports, and smart suggestions for data expansion.
Returns traffic analytics: request counts, popular endpoints, geographic distribution, user agents.
Comprehensive report on data coverage: temporal gaps, geographic distribution, confidence scores, source quality.
AI-generated suggestions for expanding the dataset: missing entities, underrepresented regions, temporal gaps.
Health Check
System health and diagnostics.
Returns system status, version, entity count, database connection status, and uptime.
{
"status": "ok",
"version": "6.21.0",
"entity_count": 862,
"database": {
"connected": true,
"type": "postgresql"
}
}