---
title: "GET /v2/locations/countries"
method: GET
path: "/v2/locations/countries"
tags: ["locations"]
---

# GET /v2/locations/countries

`GET /v2/locations/countries`

## Request

- Base URL: `https://api.thecompaniesapi.com`
- URL: `https://api.thecompaniesapi.com/v2/locations/countries`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/thecompaniesapi/apis/the-companies-api/docs/v2/locations/countries/get.ts> (a function with typed inputs; its response is checked against the schema)

Search countries.

## Query parameters

- `filters` string
- `page` number
- `search` string
- `size` number
- `sortKey` 'counts.companies'
- `sortOrder` 'asc' | 'desc'

## Response `200`

Search countries.

- object
  - `countries` NominatimCountry[], required
    - `citiesCount` number, nullable, required
    - `code` string, required
    - `companiesCount` number, nullable, required
    - `continent` 'Africa' | 'Antarctica' | 'Asia' | 'Europe' | 'North America' | 'Oceania' | 'South America', nullable, required
    - `continentCode` 'af' | 'an' | 'as' | 'eu' | 'na' | 'oc' | 'sa', nullable, required
    - `countiesCount` number, nullable, required
    - `id` number, required
    - `latitude` string, nullable, required
    - `linkedinHeadline` string, nullable
    - `linkedinId` string, nullable
    - `longitude` string, nullable, required
    - `name` string, required
    - `nameEs` string, required
    - `nameFr` string, required
    - `nameNative` string, required
    - `population` number, nullable, required
    - `statesCount` number, nullable, required
    - `usageCount` number, nullable, required
  - `meta` PaginationMeta, required: Metadata about a paginated or billed response.
    - `cost` number, required
    - `credits` number, required
    - `currentPage` number, required
    - `firstPage` number, required
    - `freeRequest` boolean, required
    - `lastPage` number, required
    - `maxScrollResultsReached` boolean
    - `perPage` number, required
    - `total` number, required

## Other responses

- `401`: The error message

---

[API](https://skmtc.dev/thecompaniesapi/apis/the-companies-api.md) - [All operations](https://skmtc.dev/thecompaniesapi/apis/the-companies-api/llms.txt) - [OpenAPI document](https://skmtc.dev/thecompaniesapi/apis/the-companies-api/revisions/f8bfc2d10b71?raw)
