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

# Get helplines for a specific country

Returns an array of crisis helplines for the specified country. The country parameter accepts both full country names and aliases (e.g., "USA", "America" for "United States").

## Response Patterns
- Returns empty array `[]` if country has no helplines or is unknown
- Returns 400 error if country parameter is missing
- Returns 403 error if request origin is not allowed (CORS)

# 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": "Helplines",
      "description": "Crisis helpline data endpoints"
    }
  ],
  "paths": {
    "/crisis_helplines": {
      "get": {
        "summary": "Get helplines for a specific country",
        "description": "Returns an array of crisis helplines for the specified country. The country parameter accepts both full country names and aliases (e.g., \"USA\", \"America\" for \"United States\").\n\n## Response Patterns\n- Returns empty array `[]` if country has no helplines or is unknown\n- Returns 400 error if country parameter is missing\n- Returns 403 error if request origin is not allowed (CORS)\n",
        "operationId": "getHelplines",
        "tags": [
          "Helplines"
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "Country name or alias to retrieve helplines for.\n\n**Examples:**\n- `United States`\n- `USA` (alias for United States)\n- `America` (alias for United States)\n- `Canada`\n- `CAN` (alias for Canada)\n\nCountry names are case-sensitive and should match exactly as stored in the database.\n",
            "schema": {
              "type": "string"
            },
            "examples": {
              "unitedStates": {
                "value": "United States",
                "summary": "Full country name"
              },
              "usaAlias": {
                "value": "USA",
                "summary": "Using country alias"
              },
              "canada": {
                "value": "Canada",
                "summary": "Canada by name"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved helplines for the specified country",
            "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": "array",
                  "items": {
                    "$ref": "#/components/schemas/Helpline"
                  }
                },
                "examples": {
                  "singleHelpline": {
                    "summary": "Single helpline for a country",
                    "value": [
                      {
                        "country": "United States",
                        "countryI18nKey": "en-US",
                        "countryCode": "US",
                        "name": "Crisis Text Line",
                        "description": "24/7 crisis support via text message",
                        "url": "https://crisistextline.org",
                        "displayURL": "crisistextline.org",
                        "phone": "741741",
                        "displayNumber": "741741",
                        "formattedCallNumber": "741741",
                        "formattedTextingNumber": "741741",
                        "displayTextNumber": "",
                        "availability": "24/7",
                        "modality": "text",
                        "identity": "general",
                        "topic": "crisis",
                        "topicMenu": true,
                        "hours": "24/7"
                      }
                    ]
                  },
                  "multipleHelplines": {
                    "summary": "Multiple helplines for a country",
                    "value": [
                      {
                        "country": "United States",
                        "countryI18nKey": "en-US",
                        "countryCode": "US",
                        "name": "Crisis Text Line",
                        "description": "24/7 crisis support via text message",
                        "url": "https://crisistextline.org",
                        "displayURL": "crisistextline.org",
                        "phone": "741741",
                        "displayNumber": "741741",
                        "formattedCallNumber": "741741",
                        "formattedTextingNumber": "741741",
                        "displayTextNumber": "",
                        "availability": "24/7",
                        "modality": "text",
                        "identity": "general",
                        "topic": "crisis",
                        "topicMenu": true,
                        "hours": "24/7"
                      },
                      {
                        "country": "United States",
                        "countryI18nKey": "en-US",
                        "countryCode": "US",
                        "name": "National Suicide Prevention Lifeline",
                        "description": "Free and confidential support for people in distress",
                        "url": "https://suicidepreventionlifeline.org",
                        "displayURL": "suicidepreventionlifeline.org",
                        "phone": "988",
                        "displayNumber": "988",
                        "formattedCallNumber": "988",
                        "formattedTextingNumber": "988",
                        "displayTextNumber": "",
                        "availability": "24/7",
                        "modality": "phone",
                        "identity": "general",
                        "topic": "suicide",
                        "topicMenu": true,
                        "hours": "24/7"
                      }
                    ]
                  },
                  "emptyArray": {
                    "summary": "No helplines found for country",
                    "value": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - missing required country parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Country required"
                }
              }
            }
          },
          "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": {
      "Helpline": {
        "type": "object",
        "description": "A crisis helpline resource providing mental health and crisis support services.\n\nEach helpline includes contact information, availability details, and categorization metadata.\n",
        "required": [
          "country",
          "countryI18nKey",
          "countryCode",
          "name",
          "description",
          "url",
          "phone",
          "displayNumber",
          "formattedCallNumber",
          "formattedTextingNumber",
          "availability",
          "modality",
          "identity",
          "topic",
          "topicMenu"
        ],
        "properties": {
          "country": {
            "type": "string",
            "description": "Full country name where this helpline operates",
            "example": "United States"
          },
          "countryI18nKey": {
            "type": "string",
            "description": "Internationalization key for the country (typically locale code)",
            "example": "en-US"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code",
            "example": "US",
            "pattern": "^[A-Z]{2}$"
          },
          "name": {
            "type": "string",
            "description": "Name of the helpline organization or service",
            "example": "Crisis Text Line"
          },
          "description": {
            "type": "string",
            "description": "Brief description of the services provided",
            "example": "24/7 crisis support via text message"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Full URL to the helpline's website",
            "example": "https://crisistextline.org"
          },
          "displayURL": {
            "type": "string",
            "description": "Human-friendly display version of the URL (without protocol)",
            "example": "crisistextline.org"
          },
          "phone": {
            "type": "string",
            "description": "Raw phone number or short code",
            "example": "741741"
          },
          "displayNumber": {
            "type": "string",
            "description": "Phone number formatted for display purposes",
            "example": "741741"
          },
          "formattedCallNumber": {
            "type": "string",
            "description": "Phone number formatted for tel: links (calling)",
            "example": "741741"
          },
          "formattedTextingNumber": {
            "type": "string",
            "description": "Phone number formatted for sms: links (texting)",
            "example": "741741"
          },
          "displayTextNumber": {
            "type": "string",
            "description": "Text message number formatted for display",
            "example": ""
          },
          "availability": {
            "type": "string",
            "description": "Human-readable availability description\n\n**Common values:**\n- `24/7` - Available around the clock\n- `Business hours` - Standard business hours only\n- Custom schedules (e.g., \"Mon-Fri 9am-5pm\")\n",
            "example": "24/7"
          },
          "modality": {
            "type": "string",
            "description": "Primary contact method for this helpline\n\n**Common values:**\n- `phone` - Voice call support\n- `text` - SMS/text message support\n- `chat` - Online chat support\n- `email` - Email support\n",
            "enum": [
              "phone",
              "text",
              "chat",
              "email"
            ],
            "example": "text"
          },
          "identity": {
            "type": "string",
            "description": "Target demographic or identity group for this helpline\n\n**Examples:**\n- `general` - Available to everyone\n- `youth` - Specifically for young people\n- `lgbtq` - LGBTQ+ focused\n- `veterans` - Military veterans\n- `indigenous` - Indigenous/native populations\n",
            "example": "general"
          },
          "topic": {
            "type": "string",
            "description": "Primary topic or issue area addressed by this helpline\n\n**Examples:**\n- `crisis` - General crisis support\n- `suicide` - Suicide prevention\n- `domestic_violence` - Domestic violence support\n- `substance_abuse` - Addiction and substance abuse\n- `mental_health` - Mental health support\n",
            "example": "crisis"
          },
          "topicMenu": {
            "type": "boolean",
            "description": "Whether this helpline should appear in topic-based filtering menus\n\nUsed for UI/UX to determine which helplines to show in categorized views.\n",
            "example": true
          },
          "hours": {
            "type": "string",
            "description": "Detailed hours of operation (may duplicate availability field)",
            "example": "24/7"
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Standard error response format",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable error message describing what went wrong",
            "example": "Country required"
          }
        }
      }
    }
  },
  "security": [],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```