---
updatedAt: 2025-11-13T22:46:22.000Z
agentTools:
  projectIndex: https://developers.kokocares.org/llms.txt
---

# Get list of available countries

Returns a sorted list of all countries that have helpline data available. Each country includes its country code and internationalization key.

Countries are sorted alphabetically by country name (countryI18nKey) and deduplicated to ensure each country appears only once.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Crisis Helplines API",
    "description": "A public API providing crisis helpline data organized by country. This API serves mental health and crisis support helpline information to help integrate crisis resources into your application.\n\n## Features\n- Comprehensive helpline data by country\n- Country alias support (e.g., \"USA\" resolves to \"United States\")\n- CORS-enabled for web applications\n- No authentication required (public API)\n",
    "version": "0.0.1",
    "contact": {
      "name": "API Support",
      "url": "https://github.com/koko/helpline-api"
    },
    "license": {
      "name": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://helpline-api.koko.ai/",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Countries",
      "description": "Country metadata endpoints"
    }
  ],
  "paths": {
    "/crisis_helplines/countries": {
      "get": {
        "summary": "Get list of available countries",
        "description": "Returns a sorted list of all countries that have helpline data available. Each country includes its country code and internationalization key.\n\nCountries are sorted alphabetically by country name (countryI18nKey) and deduplicated to ensure each country appears only once.\n",
        "operationId": "getCountries",
        "tags": [
          "Countries"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved list of countries",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "CORS header indicating allowed origin",
                "schema": {
                  "type": "string",
                  "example": "https://example.com"
                }
              },
              "Vary": {
                "description": "Indicates response varies by Origin header",
                "schema": {
                  "type": "string",
                  "example": "Origin"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "countries"
                  ],
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Country"
                      }
                    }
                  }
                },
                "example": {
                  "countries": [
                    {
                      "countryCode": "CA",
                      "countryI18nKey": "Canada"
                    },
                    {
                      "countryCode": "GB",
                      "countryI18nKey": "United Kingdom"
                    },
                    {
                      "countryCode": "US",
                      "countryI18nKey": "United States"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Origin not allowed (CORS error)",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "noOrigin": {
                    "summary": "No allowed origins configured",
                    "value": "Forbidden: no allowed origins configured"
                  },
                  "originNotAllowed": {
                    "summary": "Request origin not in allowlist",
                    "value": "Forbidden: Origin https://unauthorized.com not allowed"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Country": {
        "type": "object",
        "description": "Country metadata including code and internationalization key.\n\nOnly countries with at least one helpline are included in the response.\n",
        "required": [
          "countryCode",
          "countryI18nKey"
        ],
        "properties": {
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code",
            "example": "US",
            "pattern": "^[A-Z]{2}$"
          },
          "countryI18nKey": {
            "type": "string",
            "description": "Full country name used as internationalization key",
            "example": "United States"
          }
        }
      }
    }
  },
  "security": [],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```