API
Two public endpoints powering the checker. Both are free to use with attribution. No signup or API key.
Attribution
Free with a visible attribution link back to esimcompatibility.com. We rely on inbound links to keep the dataset open and the lights on.
Authentication
None. Anonymous public access. Responses are aggressively cached at the edge.
GET /api/check
Search devices
Search for devices by free-text query. Returns up to 25 matches, ranked by relevance + release year.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | yes | Free-text query. Example: "iPhone 16 Pro" |
| limit | integer 1–25 | no | Max results to return. Default 10. |
curl
curl 'https://esimcompatibility.com/api/check?q=iphone+16+pro&limit=5'JavaScript
const res = await fetch(
`https://esimcompatibility.com/api/check?q=${encodeURIComponent("iPhone 16 Pro")}`
);
const { results, count } = await res.json();Response
{
"results": [
{
"slug": "apple/iphone-16-pro",
"brand": "Apple",
"brandSlug": "apple",
"model": "iPhone 16 Pro",
"modelSlug": "iphone-16-pro",
"releaseYear": 2024,
"category": "phone",
"supports": "yes",
"exceptionRegions": ["china-mainland"]
}
],
"count": 1
}GET /api/detect
Auto-detect device
Identify the visitor's device from the User-Agent header plus the Sec-CH-UA-Model / Sec-CH-UA-Platform Client Hints. Returns null when no specific device can be identified.
| Parameter | Type | Required | Description |
|---|---|---|---|
| User-Agent | header | no | Standard browser UA. Used as fallback when client hints are not sent. |
| Sec-CH-UA-Model | header | no | Client Hint. The device model (e.g. "Pixel 8 Pro"). |
| Sec-CH-UA-Platform | header | no | Client Hint. The OS platform (e.g. "Android"). |
curl
curl -H 'Sec-CH-UA-Model: "iPhone 16 Pro"' \
-H 'Sec-CH-UA-Platform: "iOS"' \
https://esimcompatibility.com/api/detectJavaScript
const res = await fetch("https://esimcompatibility.com/api/detect");
const { match, brand, model } = await res.json();
// match is null when no specific device can be identified.Response
{
"match": {
"slug": "apple/iphone-16-pro",
"brand": "Apple",
"brandSlug": "apple",
"model": "iPhone 16 Pro",
"modelSlug": "iphone-16-pro",
"releaseYear": 2024,
"category": "phone",
"supports": "yes",
"exceptionRegions": ["china-mainland"]
},
"brand": "Apple",
"model": "iPhone 16 Pro"
}