Skip to content
AIDb
Developers

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.

/d/{slug}.csv
CSV — Excel, Sheets, pandas, R
/d/{slug}.xlsx
Excel — Native Excel workbook
/d/{slug}.json
JSON — Array of objects
/d/{slug}.ndjson
NDJSON — One JSON object per line
/d/{slug}.tsv
TSV — Tab-separated
/d/{slug}.sql
SQL — CREATE TABLE + INSERT (SQLite/Postgres)
/d/{slug}.xml
XML — Generic XML rows
/d/{slug}.md
Markdown — Table for docs and LLM prompts
/d/{slug}.html
HTML — Standalone table page
curl -O https://aidb.si/d/exoplanets.csv

Full 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.

GET/api/v1/search?q={query}
Search entities and datasets. mode=prefix for autocomplete-style matching; limit up to 50.
GET/api/v1/entities/{id}
Every fact about one entity (Wikidata id like Q937): typed values, qualifiers (dates), sources, identifiers and time series. props=P569,P106 to filter; format=csv|xlsx|md….
GET/api/v1/entities?ids=Q1,Q2,…
Batch lookup of up to 50 entities in one call.
GET/api/v1/datasets
The catalog: every dataset with columns, license, sources and file URLs. Free and cached.
GET/api/v1/datasets/{slug}
Metadata and schema for one dataset.
GET/api/v1/datasets/{slug}/rows
Filter, sort, select and page rows — see the query language below. Responses include total and a next link.
GET/api/v1/people?group={group}&country={ISO3}
The People directory: millions of notable people with dates, country, occupation groups and links. q, era, status=living; sort=id + next for bulk export.
GET/api/v1/places?country={ISO2}&city={slug}&category={type}
The Yellow Pages: businesses and places worldwide with address, phone, website and coordinates. q matches names and categories; format=csv|xlsx…; sort=id + next for bulk export.
GET/api/v1/places/{id}
One place by its Overture ID.
GET/api/v1/categories
All topics and their datasets.
GET/api/v1/usage
Your plan and today's remaining allowance.
curl "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.400greater than or equal (also gt, lt, lte)
country=eq.USAequals (default if no operator)
status=neq.retirednot equal
name=like.towercontains, case-insensitive
name=starts.newstarts with
country=in.USA,CHN,AREone of a list
architect=is.nullis null / is.notnull
select=name,height_mchoose columns
sort=-height_m,namesort; - for descending
q=shanghaifree-text search across text columns
limit=100&offset=200paging (max rows per request depends on plan)
format=csvcsv, 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/mcp
Claude (web or desktop): Settings → Connectors → Add custom connector
Name: AIDb
URL:  https://aidb.si/mcp

For 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.