Direct API
Counties
Get counties/states for a specific country
GET
/locations/counties/{country_code}
Get counties/states for a specific country using its ISO country code
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country_code | string | Yes | ISO 3166-1 alpha-2 country code (e.g., "RO", "BG") |
Response Codes
| Code | Status | Description |
|---|---|---|
| 200 | Success | Counties list retrieved |
| 400 | Bad Request | Invalid country_code parameter |
| 401 | Unauthorized | Invalid or missing API key |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error occurred |
Response Format
| Field | Type | Description |
|---|---|---|
| id | integer | Unique county identifier |
| county_code | string | County/state code abbreviation. See available country codes and their corresponding carriers. |
| county_name | string | County/state name |
| country_code | string | ISO 3166-1 alpha-2 country code |
Response Example
RESPONSEJSON
[
{
"id": 1,
"county_code": "AB",
"county_name": "Alba",
"country_code": "RO"
},
{
"id": 2,
"county_code": "AR",
"county_name": "Arad",
"country_code": "RO"
}
]Complete API Reference
For interactive testing and additional technical details, visit our complete Swagger documentation.
View in Swagger Documentation
