Every fact, one request away.
Three ways in: free bulk files for whole datasets, a REST API for querying and lookups, and an MCP server so AI assistants can use AIDb as a tool. Everything returns sources and licenses.
Bulk files — free, no key
Every dataset is published as a static file in 9 formats, served from a global CDN. Append the extension to any dataset URL.
curl -O https://aidb.si/d/exoplanets.csvFull catalog as JSON: /api/v1/datasets. Entity pages export too: /e/Q937.json, .csv, .xlsx, .md, .jsonld.
REST API
Base URL https://aidb.si/api/v1. JSON by default; add format=csv (or any bulk format) to most endpoints. CORS is open. The machine-readable spec is at /openapi.json.
/api/v1/search?q={query}mode=prefix for autocomplete-style matching; limit up to 50./api/v1/entities/{id}Q937): typed values, qualifiers (dates), sources, identifiers and time series. props=P569,P106 to filter; format=csv|xlsx|md…./api/v1/entities?ids=Q1,Q2,…/api/v1/datasets/api/v1/datasets/{slug}/api/v1/datasets/{slug}/rowstotal and a next link./api/v1/people?group={group}&country={ISO3}q, era, status=living; sort=id + next for bulk export./api/v1/places?country={ISO2}&city={slug}&category={type}q matches names and categories; format=csv|xlsx…; sort=id + next for bulk export./api/v1/places/{id}/api/v1/categories/api/v1/usagecurl "https://aidb.si/api/v1/entities/Q312?props=P2139,P1128"Bulk export of the big directories
Datasets are single free files (above). The People and Places directories are too big for one file, so page through them: add sort=id, ask for as many rows as your plan allows per request, and follow next (also sent as a Link header for CSV) until it's null. Paging by id never skips or repeats a row. A Developer key pulls 10,000 rows per request and 1 million a day; Pro pulls 50,000 per request and 20 million a day.
import csv, requests
KEY = "aidb_…"
url = "https://aidb.si/api/v1/places?country=US&sort=id&limit=50000"
with open("places-us.csv", "w", newline="") as f:
out = None
while url:
r = requests.get(url, headers={"Authorization": f"Bearer {KEY}"}, timeout=120)
r.raise_for_status()
page = r.json()
for row in page["places"]:
if out is None:
out = csv.DictWriter(f, fieldnames=list(row))
out.writeheader()
out.writerow(row)
url = page["next"]Query language
Filters are query parameters named after a column key, with an operator prefix. Combine as many as you like.
| height_m=gte.400 | greater than or equal (also gt, lt, lte) |
| country=eq.USA | equals (default if no operator) |
| status=neq.retired | not equal |
| name=like.tower | contains, case-insensitive |
| name=starts.new | starts with |
| country=in.USA,CHN,ARE | one of a list |
| architect=is.null | is null / is.notnull |
| select=name,height_m | choose columns |
| sort=-height_m,name | sort; - for descending |
| q=shanghai | free-text search across text columns |
| limit=100&offset=200 | paging (max rows per request depends on plan) |
| format=csv | csv, tsv, xlsx, ndjson, sql, xml, md, html (default json) |
MCP server — give your AI the database of everything
AIDb speaks the Model Context Protocol. Connect it once and your assistant can search, read entity facts and query datasets on its own — and cite AIDb pages in its answers. Tools: search, get_entity, list_datasets, describe_dataset, query_dataset, find_places.
https://aidb.si/mcpClaude (web or desktop): Settings → Connectors → Add custom connector
Name: AIDb
URL: https://aidb.si/mcpFor LLM crawlers and agents there's also /llms.txt — a plain-text map of everything here.
Limits & keys
No key needed to start: anonymous use gets 500 API requests and 25,000 rows a day, up to 1,000 rows per request. Bulk files never count. Paid plans raise every limit and come with an API key — send it as Authorization: Bearer <key>. Every response carries X-RateLimit-Remaining; when you hit the cap you get HTTP 429 until 00:00 UTC.