Countries Beta
The supported country, currency and language codes, so location-aware integrations can be built without guesswork. Reference data — this endpoint takes no url.
Authentication
Send your API key as an X-API-Key header, or as a key query parameter. Available on every plan, including Free — plans differ only in requests per day. This call costs one request against your daily quota, which is shared across every key on the account. See Authentication.
Query parameters
| Name | Type | Description |
|---|---|---|
key optional | string | Your API key, if not sent as the X-API-Key header. |
Request
Response
- {
- "count": 98,
- "countries": [{ "code": 2012, "name": "Algeria", "iso2": "dz",
- "currency": "DA", "lang": "en" }],
- "usage": { "used": 1, "dailyLimit": 100, "tier": "free" }
- }
Response fields
| Field | Type | Description |
|---|---|---|
count | integer | How many countries are returned. |
countries[].code | integer | RankNibbler's internal location code. |
countries[].iso2 | string | Lower-case ISO 3166-1 alpha-2 code. |
countries[].currency | string | Currency symbol or code for that country. |
countries[].lang | string | Default language code. |
Errors
| Status | When |
|---|---|
401 | Missing or invalid API key. |
429 | Burst rate limit (60 req/10s per IP, 30 req/10s per key) or your daily quota. See Rate limits. |
503 | The country list is unavailable on this server. This check runs before authentication. |
Errors return { "error": "…" }; see Errors.