API publique (/v1)
Pays
GET /v1/countries — list countries with eSIMs on sale, with plan counts and lowest prices.
On this page
Request#
GET
/v1/countriescurl "https://api.esimoa.com/v1/countries?q=japan&lang=en" \
-H "X-API-Key: esk_live_your_key_here"const res = await fetch('https://api.esimoa.com/v1/countries?q=japan&lang=en', {
headers: { 'X-API-Key': process.env.ESIMOA_API_KEY },
});
const { items } = await res.json();res = requests.get(
"https://api.esimoa.com/v1/countries",
params={"q": "japan", "lang": "en"},
headers={"X-API-Key": os.environ["ESIMOA_API_KEY"]},
timeout=10,
)
countries = res.json()["items"]Query parameters#
| Paramètre | Type | Description |
|---|---|---|
q | string | Recherchez par nom ou code de pays (facultatif) |
lang | string | Langue de la réponse : ko | en | ja | zh-CN | zh-TW (en par défaut) |
q correspond aux noms de pays dans l’une des cinq langues (ex. : japan, 일본, 日本).
Réponse#
200 OKjson
{
"success": true,
"items": [
{
"countryCode": "JP",
"name": "Japan",
"planCount": 128,
"lowestPriceKrw": 1000,
"url": "https://www.esimoa.com/en/plans/jp?ref=p_yourcode"
}
]
}The Country object#
| Champ | Type | Description |
|---|---|---|
countryCode | string | Code pays ISO 3166-1 alpha-2 |
name | string | Nom du pays (en lang) |
planCount | integer | Nombre de forfaits en vente |
lowestPriceKrw | integer | null | Prix le plus bas en KRW |
url | string | Page des forfaits du pays — inclut votre code partenaire (?ref=) |
