---
title: "List Countries"
source_url: https://docs.rapyd.net/en/list-countries.html
lang: en
---

# List Countries

Retrieve a list of all countries.

### Parameters

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- - currency_code
  - Three-letter ISO 4217 code for the currency.
- - currency_name
  - Name of the currency in English.
- - currency_sign
  - Unicode symbol for the currency.
- - id
  - ID of the country.
- - iso_alpha2
  - 2-letter ISO 3166-1 alpha-2 code for the country.
- - iso_alpha3
  - 3-letter ISO 3166-1 alpha-3 code for the country. Informational only - not relevant to Rapyd API.
- - name
  - Name of the country in English.
- - phone_code
  - International telephone prefix for the country.

### Code Samples

- - .NET

    - ```csharp
      using System;

      namespace RapydApiRequestSample
      {
          class Program
          {
              static void Main(string[] args)
              {
                  try
                  {
                      string result = RapydApiRequestSample.Utilities.MakeRequest("GET", "/v1/data/countries");

                      Console.WriteLine(result);
                  }
                  catch (Exception e)
                  {
                      Console.WriteLine("Error completing request: " + e.Message);
                  }
              }
          }
      }
      ```
- - JavaScript

    - ```javascript
      const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

      async function main() {
        try {
          const result = await makeRequest('GET', '/v1/data/countries');

          console.log(result);
        } catch (error) {
          console.error('Error completing request', error);
        }
      }
      ```
- - PHP

    - ```php
      <?php
      $path = $_SERVER['DOCUMENT_ROOT'];
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);

      try {
          $object = make_request('get', '/v1/data/countries');
          var_dump($object);
      } catch(Exception $e) {
          echo "Error: $e";
      }
      ?>
      ```
- - Python

    - ```python
      from pprint import pprint

      from utilities import make_request

      response = make_request(method='get',
                              path='/v1/data/countries')

      pprint(response)
      ```

- /v1/data/countries

- List Countries
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/data/countries
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "0",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "cf6d191d-088b-41e0-a080-3afe31f3a005"
      },
      "data": [
          {
              "id": 127,
              "name": "Afghanistan",
              "iso_alpha2": "AF",
              "iso_alpha3": "AFG",
              "currency_code": "AFN",
              "currency_name": "Afghan afghani",
              "currency_sign": "؋",
              "phone_code": "93"
          },
          {
              "id": 128,
              "name": "Åland Islands",
              "iso_alpha2": "AX",
              "iso_alpha3": "ALA",
              "currency_code": "EUR",
              "currency_name": "Euro",
              "currency_sign": "€",
              "phone_code": "358"
          }
      ]
  }
  ```
