REST Countries
REST Countries is a read-only API family served as JSON over HTTPS and authenticated with a single Bearer token. It provides five APIs that share one account,…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
REST Countries is a read-only API family served as JSON over HTTPS and authenticated with a single Bearer token. It provides five APIs that share one account, one key, and one request quota: the Countries API (/countries/v5) for structured country data, the Currencies API (/currencies/v1) for currency conversion and exchange rates across fiat and crypto, the IP API (/ip/v1) for IP geolocation, the User Agent API (/user-agent/v1) for user-agent string parsing, and the Email Intelligence API (/email-intelligence/v1) for email address analysis. Each API is versioned in its path; additive changes ship inside the current version, and breaking changes get a new version. See https://restcountries.com/docs for the full reference and https://restcountries.com/docs#versioning for the versioning policy.
Endpoints 13
Countries
- GETList or search countries
/countries/v5Returns a paginated list of countries. Supports full-text search via q, per-property filter chains (e.g. ?region=Europe&landlocked=1), pagination via… - GETSearch within a single property
/countries/v5/:propertyReturns a paginated list of countries whose {property} value matches q (or all countries when q is omitted). Property accepts any searchable field name as a… - GETFilter by property value
/countries/v5/:property/:valueReturns a paginated list of countries whose {property} value equals {value} (case-insensitive, URL-decoded; spaces accept either + or %20). For unique fields…
Aggregates
- GETAggregate search across every code property
/countries/v5/code?q=EUSearches the q value across alpha_2, alpha_3, ccn3, fips, gec, fifa, and cioc simultaneously. Useful when the caller has a code but doesn't know which… - GETAggregate search across every name field
/countries/v5/name?q=EUSearches the q value across common, official, native, and alternates simultaneously.
Currencies
- GETConvert an amount between currencies
/currencies/v1/convert?from=USD&to=EUR,CADConverts amount from one currency into one or more targets. from and to are required; amount is optional and defaults to 1, so omitting it returns the unit… - GETExchange-rate table for a base currency (path slug)
/currencies/v1/rates/:baseReturns the full exchange-rate table for a base currency: every supported currency expressed as units per one unit of the base. Supply the base as the path… - GETExchange-rate table for a base currency (query param)
/currencies/v1/ratesSame as /currencies/v1/rates/{base}, but with the base supplied via the base query parameter (e.g. ?base=USD). When both the path slug and the query param are… - GETList supported currencies
/currencies/v1/symbolsReturns the supported-currency catalog: one object per currency (code, name, symbol), sorted by code. symbol is null where the currency has no conventional…
IP
- GETLook up an IP address (path slug)
/ip/v1/:ipReturns the geolocation record for the IP address given as the path slug: location (continent, country, subdivision, city, coordinates, postal), connection… - GETLook up an IP address (query param or the caller's own)
/ip/v1Same as /ip/v1/{ip}, but with the address supplied via the ip query parameter; the path slug takes precedence when both are present. Omit the parameter…
User Agent
- GETParse a user-agent string
/user-agent/v1Parses a user-agent string into a structured record: client (with its type, version, maker, rendering engine, and browser-family flags), the operator the…
Email Intelligence
- GETAnalyze an email address
/email-intelligence/v1/processRuns one email address through the pipeline and returns a single record describing it: its parts (local, username, tag, domain), the top-level domain and the…
API details
- Base URL
https://api.restcountries.com- Authentication
- A bearer token in the Authorization header
An API key in the api-key query parameter - Operations
- 13 operations on 13 pathsGET 13
- Main resources
- Currencies 4Countries 3Aggregates 2IP 2Email Intelligence 1User Agent 1
- Description format
- OpenAPI 3.1.0, API version
2026-11-09 - Links
- OpenAPI document · Terms of service · Support
How to test the REST Countries in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the REST Countries collection, without the publisher's secrets.
- Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “List or search countries” (GET /countries/v5), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the REST Countries?
REST Countries is a read-only API family served as JSON over HTTPS and authenticated with a single Bearer token. It provides five APIs that share one account,… It is listed under Maps & location and has 13 endpoints.
Who publishes the REST Countries?
It is listed from REST Countries's public API description (an OpenAPI document), not published by REST Countries on Swastik Codes. Anyone who controls restcountries.com can claim the profile by adding a DNS TXT record.
What is the base URL of the REST Countries?
Requests go to https://api.restcountries.com. Endpoint paths are added to this base URL.
How do I authenticate with the REST Countries?
It accepts 2 methods: A bearer token in the Authorization header; an API key in the api-key query parameter.
How many endpoints does the REST Countries have?
13 operations on 13 paths (13 GET). The largest groups are Currencies, Countries, Aggregates, IP.
Is forking the REST Countries free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.