GET /countries
Operation ID: listCountries
Auth: unknown
Description
Get a list of countries. Useful for filtering works by author affiliation country.
Parameters (10)
(string, query, required)
Your OpenAlex API key (required). Get a free key at https://openalex.org/settings/api
(string, query, optional)
Cursor for deep pagination. Use `cursor=*` to start, then use the `next_cursor` from the response.
(string, query, optional)
Filter countries. Examples: `id:US`, `works_count:>1000000` See [all Country fields](/api-reference/countries#available-filter-sort-and-group_by-fields).
(string, query, optional)
Group results by a field and return counts. Available fields vary by entity type. See [all Country fields](/api-reference/countries#available-filter-sort-and-group_by-fields).
(integer, query, optional)
Page number for pagination. Use cursor for deep pagination beyond 10,000 results.
Constraints: {'minimum': 1}
(integer, query, optional, default: 25)
Number of results per page (1-100, default 25)
Constraints: {'minimum': 1, 'maximum': 100}
(integer, query, optional)
Return a random sample of N results (max 10,000). Cannot be used with sort or page.
Constraints: {'maximum': 10000}
(string, query, optional)
Full-text search across titles, abstracts, and other text fields. Example: `search=machine learning`
(string, query, optional)
Comma-separated list of fields to return. Reduces response size. Example: `select=id,display_name,cited_by_count`
(string, query, optional)
Sort by: `works_count`, `cited_by_count`. Prefix with `-` for descending. See [all Country fields](/api-reference/countries#available-filter-sort-and-group_by-fields).
Examples (3)
| Title | Type | URL | Action |
|---|---|---|---|
| List countries with pagination | curl |
https://api.openalex.org/countries?per_page=10&page=1 |
|
| Filter by country ID | curl |
https://api.openalex.org/countries?filter=id:US |
|
| Sort by works count descending | curl |
https://api.openalex.org/countries?sort=-works_count&per_page=5 |
Probe History
Status Codes
| Time | Status | Latency | Size |
|---|---|---|---|
| 2026-03-23 11:07:15.149058 | 200 | 228ms | |
| 2026-03-23 09:22:34.957464 | 200 | 215ms | |
| 2026-03-23 09:06:18.217427 | 400 | 219ms |
Response Changes
| When | Old | New |
|---|---|---|
| 2026-03-23 09:22:34.957464 | 7cc4ed395374 |
a798b118159e |
| 2026-03-23 11:07:15.149058 | a798b118159e |
7cc6ddc52346 |