# Universities API and database

> 17,765 universities worldwide with country, city, website, founding year, student numbers and ROR id, free to use as an API (JSON, GeoJSON, vector tiles) or as a CSV download. CC0, no attribution needed.

## Endpoints
Public, no API key, CORS open. 

- **JSON:** https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries?limit=50
  Paged entries with all fields. Up to 500 per page.
- **GeoJSON:** https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries.geojson?limit=1000
  FeatureCollection of points; up to 5,000 per request.
- **TileJSON:** https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/tiles.json
  Vector tiles (layer entries) for MapLibre, Mapbox GL and QGIS.
- **OpenAPI:** https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/openapi.json
  This dataset’s typed OpenAPI 3.1 document, for generated clients.

### Filters
- By country code: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries?filter[country]=CZ
- Search by name: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries?q=a
- Within 50 km of a point: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries?near=14.26,50.10&radius=50000&sort=distance
- In a bounding box: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries.geojson?bbox=-10,35,30,60

## Code samples
### Fetch universities

curl:

```bash
curl "https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries?limit=10"
```

JavaScript:

```js
const res = await fetch('https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries?limit=10')
const { data } = await res.json()
console.log(data[0].title)
```

Python:

```python
import requests

r = requests.get("https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries", params={"limit": 10})
print(r.json()["data"][0]["title"])
```

### Show the universities on your map

MapLibre (vector tiles):

```js
map.addSource('universities', { type: 'vector', url: 'https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/tiles.json' })
map.addLayer({
  id: 'universities',
  type: 'circle',
  source: 'universities',
  'source-layer': 'entries',
  paint: { 'circle-radius': 4, 'circle-color': '#3b82f6' },
})
```

MapLibre (GeoJSON):

```js
map.addSource('universities', { type: 'geojson', data: 'https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries.geojson?limit=5000' })
map.addLayer({ id: 'universities', type: 'circle', source: 'universities', paint: { 'circle-radius': 4 } })
```

Leaflet:

```js
fetch('https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries.geojson?limit=5000')
  .then((r) => r.json())
  .then((data) => L.geoJSON(data, {
    onEachFeature: (f, layer) => layer.bindPopup(f.properties.title),
  }).addTo(map))
```

## Build with AI
Prompts for a coding agent (Claude Code, Codex, Cursor), also as plain text.

- **Your own copy:** The agent makes a temporary Spatibase project, imports the universities you choose (all of them, or one country or area), adds your own fields, builds the app on its API and asks for your email so you can keep it. No account needed to start. ([plain text](https://spatibase.com/datasets/universities/prompt.txt))
- **Quick prototype:** The agent builds a read-only prototype straight on the public API above. Nothing to set up and nothing to keep; copy the dataset into your own project when you want to add data. ([plain text](https://spatibase.com/datasets/universities/prompt-public.txt))

### Starter ideas
Add one to the end of either prompt, under "What to build".

- **A university finder with a country filter:** Build a university finder: a searchable list and a MapLibre map side by side (stacked on a phone). A country dropdown filters with filter[country], a search box uses q, and a sort control orders the loaded results by students or founded in the app (the API sorts only by title, dates and distance). Each card shows the city, the founding year, the number of students (when known) and a link to the website; selecting a card flies the map to it and the other way round. Show a clear empty state, and keep the data credit visible.
- **A campus site-selection map:** Build a map for choosing where to open an office or a training centre near universities. Let me click a city (or type one) and pick a radius, then use near=<lng>,<lat>&radius=<metres>&sort=distance to list the universities around it, with their student numbers added up. Compare up to three candidate cities side by side, and let me save a shortlist with my own notes as extra fields in my own copy of the data. Export the shortlist as CSV.
- **A partner and outreach list:** Build a small internal tool for a team that works with universities: a table of the universities in the countries I pick (founded, students, website, ROR id) with my own fields next to it (partnership status, contact person, last contact, notes). Add those fields to my copy of the dataset so my team can edit them, and let me filter by status and export the table as CSV.

### Prompt: Your own copy

```text
Help me build an app on a copy of the free Universities dataset from Spatibase (a CMS and API for places), with Spatibase as the app's backend.
Read the guide first: https://spatibase.com/agents/quickstart.md
Below, "spatibase ..." means "npx --yes spatibase@0.1 ..." (Node 18.3 or newer).

The dataset
- Universities: https://spatibase.com/datasets/universities/
- A shared, read-only public copy, no key needed. Look at it first: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/entries?limit=3
- Its typed OpenAPI file: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/openapi.json
- Fields (the keys under "fields" in an entry; the title is the entry's own title):
  - title (text): University name (English label, else the native one), for example Charles University
  - wikidata_id (identifier): Wikidata item id, unique and stable, for example Q31519
  - country (text): ISO 3166-1 alpha-2 country code, for example CZ
  - city (text): City where it is located, for example Prague
  - website (link): Official website, for example https://cuni.cz/
  - founded (number): Year founded, for example 1348
  - students (number): Number of students, latest value (about a fifth have one), for example 51438
  - ror_id (text): Research Organization Registry id, for example 024d6js02
  - wikipedia (link): English Wikipedia article, for example https://en.wikipedia.org/wiki/Charles_University
- Licence: CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/). No attribution required; a credit is appreciated.
- Good to know about the data: Compiled from Wikidata, a volunteer-edited source: coverage is uneven between countries and records can be out of date. Faculties, departments and campuses of another university are left out. Universities without coordinates in Wikidata are placed by geocoding their address or name, and location_source and location_precision say how each point was found. Check anything important against the university itself.

1. Ask me what the app is for, unless it is stated under "What to build" at the end. Ask whether I want every university or only some: one value of a filter field (for example country = CZ) or an area (bbox: minLng,minLat,maxLng,maxLat). A temporary project holds 1,000 entries, so choose a filter or area that fits.
2. Show me a short report and wait for my OK: what you will import and how many entries match (a dry run tells you), the fields of my own you would add, the app you would build and the files it touches, and that the data will be public but unlisted and deleted after 24 hours unless I keep it.
3. Create a temporary project: spatibase create "<app name>" --ref dataset-universities
   Import the dataset into it, a dry run first: spatibase call import_dataset '{"dataset":"universities","filter":{"field":"country","value":"CZ"},"dryRun":true}'
   Read the counts, then run it again with "dryRun":false. The entries arrive as drafts. spatibase call list_datasets names the fields you can filter by.
4. Add my own fields and data: spatibase describe shows the imported type and its apiKey; write a small model file in .spatibase/ and run spatibase model <file> (it adds missing fields to the existing type); import my own rows if I have a file (spatibase import <file> --type <apiKey> --publish). Then spatibase publish and spatibase verify.
5. Build the app on my project's Content Delivery API: the address that create printed (it ends in /delivery/v1/projects/<my project id>, not the public copy's id) and its typed OpenAPI file at <address>/openapi.json. Generate types from that file, never guess field names, keep loading and error states, and show a credit to Wikidata (appreciated, not required).
6. Ask for my email and run spatibase keep <email>, so I can keep the project (it is deleted after 24 hours otherwise).

Finish with the live API URL, how many entries were imported and with which filter, what you built and when the project expires.
```

### Prompt: Quick prototype

```text
I am building an app on the free Universities dataset from Spatibase. Use the Spatibase Content Delivery API as the data source. It is read-only and returns published content only.

Project
- Project id: 4282d45f-a6eb-405e-8330-3586d17b22c5
- API base URL: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5
- Access: public. No key is needed, and the API can be called straight from the browser.

The dataset
- Universities, a free public dataset: https://spatibase.com/datasets/universities/
- Licence: CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/). No attribution required; a credit is appreciated.
- Good to know about the data: Compiled from Wikidata, a volunteer-edited source: coverage is uneven between countries and records can be out of date. Faculties, departments and campuses of another university are left out. Universities without coordinates in Wikidata are placed by geocoding their address or name, and location_source and location_precision say how each point was found. Check anything important against the university itself.
- Fields (the keys under "fields" in an entry):
  - title (text): University name (English label, else the native one), for example Charles University
  - wikidata_id (identifier): Wikidata item id, unique and stable, for example Q31519
  - country (text): ISO 3166-1 alpha-2 country code, for example CZ
  - city (text): City where it is located, for example Prague
  - website (link): Official website, for example https://cuni.cz/
  - founded (number): Year founded, for example 1348
  - students (number): Number of students, latest value (about a fifth have one), for example 51438
  - ror_id (text): Research Organization Registry id, for example 024d6js02
  - wikipedia (link): English Wikipedia article, for example https://en.wikipedia.org/wiki/Charles_University
- Filters that work here, for example: filter[country]=CZ, near=<lng>,<lat>&radius=<metres>&sort=distance, bbox=<minLng>,<minLat>,<maxLng>,<maxLat>, q=<name search>
- This public copy is shared and read-only. To add my own data or fields, or for a busy app, I copy it into my own project: https://app.spatibase.com/signup?dataset=universities&ref=ds-universities

Read these first
- This project's typed OpenAPI file, with my real field names and types: https://api.spatibase.com/delivery/v1/projects/4282d45f-a6eb-405e-8330-3586d17b22c5/openapi.json
- The general OpenAPI file of the API: https://api.spatibase.com/delivery/v1/openapi.json
- The docs, written for AI agents: https://spatibase.com/llms.txt (every docs page is also Markdown, for example https://spatibase.com/docs/reference/delivery-api.md)
Generate TypeScript types or a typed client from the typed OpenAPI file before writing app code. Take field names from it, never guess them.

Endpoints (all GET, relative to the base URL)
- /entries: entries as JSON, paged (limit up to 500). Filters: type, group, q (title search), filter[<field>]=value or filter[<field>][<op>]=value (eq, ne, gt, gte, lt, lte, in, contains, exists), bbox, near + radius (meters), sort (for example title, -publishedAt, distance), include=references
- /entries.geojson: the same entries and filters as a GeoJSON FeatureCollection (up to 5000)
- /entries/<entryId>: one entry
- /tiles.json: TileJSON for vector tiles (tiles at /tiles/{z}/{x}/{y}.pbf, one layer "entries"; filters type, subtypes, group)
- /types, /groups, /groups/<groupKey> (entries in the order I arranged them), /feature-types

Good to know
- An entry has id, type, title, geometry (GeoJSON, can be null) and fields keyed by each field's API key.
- Image URLs are absolute; add ?w=800&fmt=webp to get a resized image.
- Responses are cacheable (ETag and 304; about a minute in the browser, up to five minutes at the CDN). CORS is open. Errors look like { "error": { "code", "message" } }.
- For maps, use MapLibre GL JS with the vector tiles or the GeoJSON, or Leaflet with the GeoJSON.
- Regenerate the types when I tell you I changed my content model.
```

## Fields
| Field | Kind | Meaning | Example |
|---|---|---|---|
| `title` | text | University name (English label, else the native one) | `Charles University` |
| `wikidata_id` | identifier | Wikidata item id, unique and stable | `Q31519` |
| `country` | text | ISO 3166-1 alpha-2 country code | `CZ` |
| `city` | text | City where it is located | `Prague` |
| `website` | link | Official website | `https://cuni.cz/` |
| `founded` | number | Year founded | `1348` |
| `students` | number | Number of students, latest value (about a fifth have one) | `51438` |
| `ror_id` | text | Research Organization Registry id | `024d6js02` |
| `wikipedia` | link | English Wikipedia article | `https://en.wikipedia.org/wiki/Charles_University` |

## Coverage
What the snapshot covers and what it leaves out.

### Fields filled in
- Country code: 99%
- City: 92%
- Website: 86%
- Founded: 87%
- Students: 18%
- ROR id: 69%
- Wikipedia: 67%

### Countries with the most universities
- India: 1,934 (11%)
- United States: 1,919 (11%)
- Indonesia: 1,320 (7%)
- Japan: 848 (5%)
- China: 767 (4%)
- Nigeria: 497 (3%)
- Philippines: 482 (3%)
- Germany: 471 (3%)
- Russia: 391 (2%)
- Brazil: 361 (2%)

We left out 2,935 universities: universities that have closed or merged into another (929); faculties, departments and campuses of another university (412); records we could not place on a map (1,592); and records with no name in any language (2).

## Downloads
- [CSV](https://data.spatibase.com/universities/2026-11-01-34ef6941d677ac64/universities.csv) (2.8 MB): One row per university, latitude and longitude columns included. Opens in Excel, Google Sheets, QGIS.
- [GeoJSON](https://data.spatibase.com/universities/2026-11-01-34ef6941d677ac64/universities.geojson) (6.7 MB): RFC 7946 FeatureCollection of points, every field as a property. Loads in MapLibre, Leaflet, QGIS, geopandas.

## Licence and source
- **Source:** [Wikidata: items that are a university (Q3918) or one of its subclasses, with coordinates; faculties, departments and campuses of another university and closed ones are left out](https://www.wikidata.org/)
- **Licence:** [CC0 1.0. No attribution required; a credit is appreciated.](https://creativecommons.org/publicdomain/zero/1.0/)
- **Snapshot:** November 1, 2026. Not updated live.
- **Use:** Compiled from Wikidata, a volunteer-edited source: coverage is uneven between countries and records can be out of date. Faculties, departments and campuses of another university are left out. Universities without coordinates in Wikidata are placed by geocoding their address or name, and location_source and location_precision say how each point was found. Check anything important against the university itself.

## Copy it and make it yours
Copy into your account: https://app.spatibase.com/signup?dataset=universities&ref=ds-universities

- **Your own project.:** The dataset lands in your account as a normal project with the university type, all fields and every university, already published.
- **Your own API.:** You get your own endpoints (JSON, GeoJSON, vector tiles, OpenAPI) on your project id, and API keys if you want it private.
- **Add what the dataset lacks.:** Add fields such as photos, a description or your own notes, and fill them in the editor.
- **Edit and publish.:** Fix a name, hide a university, add your own. Only what you publish reaches your API.
- **Free to copy.:** Copying costs nothing and nothing you change affects the public dataset or anyone else’s copy.

## FAQ
### Is the universities API free?
Yes. The endpoints on this page are public, need no API key and cost nothing. You can also download the CSV or GeoJSON and host it yourself. If you copy it into your own Spatibase project, the copy is free too; your own project follows the normal plan limits.

### How many universities are in the dataset?
17,765 universities, built from Wikidata. See the sources and the coverage notes on this page for what is included and what is left out.

### How often is it updated?
It is a snapshot taken on November 1, 2026, not a live feed. The snapshot date is also in the page’s structured data and in meta.json next to the downloads.

### Can I use it commercially?
Yes. Wikidata releases its data into the public domain (CC0), so there is no attribution requirement and no restriction on commercial use. A credit to Wikidata is still appreciated. The data comes without any warranty.

### What are the rate limits and how is it cached?
Responses are cacheable (ETag and conditional requests, CORS open to any origin), so a browser or CDN in front of it rarely hits the server twice. There is no published request quota for this public dataset, but it is shared by everyone: for a busy app, copy it into your own project (or download the file) so your traffic is your own.

### What does “Copy into your account” do?
It creates a new project in your Spatibase account with the university type, all fields and all universities, already published. You get your own API URL, can edit entries in the editor and publish your changes. Nothing you change touches the public dataset.
