API العامة (/v1)
البلدان
GET /v1/countries — list countries with eSIMs on sale, with plan counts and lowest prices.
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#
| المعامل | النوع | الوصف |
|---|---|---|
q | string | ابحث باسم الدولة أو رمزها (اختياري) |
lang | string | لغة الاستجابة: ko | en | ja | zh-CN | zh-TW (الافتراضي en) |
يطابق q أسماء الدول بأي من اللغات الخمس (مثال: japan, 일본, 日本).
الاستجابة#
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#
| الحقل | النوع | الوصف |
|---|---|---|
countryCode | string | رمز البلد وفق ISO 3166-1 alpha-2 |
name | string | اسم البلد (بلغة lang) |
planCount | integer | عدد الباقات المعروضة للبيع |
lowestPriceKrw | integer | null | أقل سعر بـ KRW |
url | string | صفحة باقات البلد — تتضمن رمز الشريك الخاص بك (?ref=) |
