---
title: "Reference data — API reference"
description: "Countries, states, cities."
url: https://www.gyrohosting.com/developers/en/api/reference-data.html
language: en
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Reference data

Countries, states, cities.

Base URL: `https://www.gyrohosting.com/api/v1/client` · OpenAPI: https://www.gyrohosting.com/developers/openapi.json


## GET /reference/countries

**List countries** · operationId `coreGetCountries` · scope `Reference/GetCountries` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreGetCountries.json

List countries. 

Core WISECP client endpoint.


### Responses

- **200**: Success
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled

### Examples

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/reference/countries' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro reference country list
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/reference/countries", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/reference/countries", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## GET /reference/countries/{code}/states

**List states (path: {code})** · operationId `coreGetStates` · scope `Reference/GetStates` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreGetStates.json

List states (path: {code}). 

Core WISECP client endpoint.


### Parameters

| Field | in | Type | Description |
|---|---|---|---|
| `code` (required) | path | string |  |

### Responses

- **200**: Success
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled

### Examples

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/reference/countries/1/states' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro reference country state list
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/reference/countries/1/states", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/reference/countries/1/states", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## GET /reference/states/{id}/cities

**List cities (path: {id})** · operationId `coreGetCities` · scope `Reference/GetCities` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreGetCities.json

List cities (path: {id}). 

Core WISECP client endpoint.


### Parameters

| Field | in | Type | Description |
|---|---|---|---|
| `id` (required) | path | integer |  |

### Responses

- **200**: Success
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled

### Examples

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/reference/states/12345/cities' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro reference state city list 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/reference/states/12345/cities", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/reference/states/12345/cities", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```
