Sonic API endpoint
Returns Sonic Drive-In's restaurant listing one page at a time, each entry already split into its country, state, city and address parts plus a ready-made path value that GET /sonic/store takes -- so enumerating restaurants needs no path parsing. Filter by state and/or city to narrow the list; city slugs come from GET /sonic/directory. Results are sorted by path so paging is reproducible. This listing covers more store pages than GET /sonic/directory counts, since the directory counts listed restaurants while this enumerates every published store page; a filter that matches nothing returns an empty locations array with total 0, not an error. If Sonic's live store-locator service refuses the request, the list is built from Sonic's public store sitemap instead (same entry shape; it can omit stores without a published page, and source_url shows which source answered).
/sonic/locationsQuery parameters:
state (optional) — two-letter state or province code to filter by, e.g. WY. Case-insensitive.city (optional) — city slug to filter by, e.g. cheyenne. Slugs come from /sonic/directory. Case-insensitive.page (optional) — 1-based page number. Defaults to 1.page_size (optional) — entries per page, 1 to 500. Defaults to 100.A state that is not two letters, a page below 1, or a page_size outside 1-500 returns 400.
Results are sorted by path, so paging is reproducible across calls.
If Sonic's live store-locator service refuses the request, the same listing is built from Sonic's public store sitemap instead. Entries have the same shape, but the sitemap can omit stores that have no published page; source_url shows which source answered (the sitemap URL is https://www.sonicdrivein.com/locations.xml).
Response includes state, city, page, page_size, total, total_pages, count, locations[], source_url, and fetched_at. total is the number of entries matching the filter, not the page size.
Each entry in locations[] has store_id, country_code, state_code, city_slug, address_slug, and path. store_id is the bare store number that /sonic/nearby and /sonic/availability use, with the upstream store- prefix removed.
This listing covers more store pages than /sonic/directory counts: the directory counts listed restaurants, while this enumerates every published store page. Both are correct for their own purpose, so their totals intentionally differ.
| Field | Filled in, of 6 checked | Values in the sample |
|---|---|---|
| store_id | 6 | |
| country_code | 6 | |
| state_code | 6 | |
| city_slug | 6 | |
| address_slug | 6 | |
| path | 6 | “locations/us/wy/cheyenne/125-s--greeley-highway/store-4694” and 5 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| state | string | No | Two-letter state or province code to filter by | WY | |
| city | string | No | City slug to filter by, from /sonic/directory | cheyenne | |
| page | integer | No | 1 | 1-based page number. Defaults to 1. | 1 |
| page_size | integer | No | 100 | Entries per page, 1-500. Defaults to 100. | 100 |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sonic/locations?page=1" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"state": "WY",
"city": "cheyenne",
"page": 1,
"page_size": 100,
"total": 2,
"total_pages": 1,
"count": 2,
"locations": [
{
"store_id": "4694",
"country_code": "US",
"state_code": "WY",
"city_slug": "cheyenne",
"address_slug": "125-s--greeley-highway",
"path": "locations/us/wy/cheyenne/125-s--greeley-highway/store-4694"
},
{
"store_id": "4521",
"country_code": "US",
"state_code": "WY",
"city_slug": "cheyenne",
"address_slug": "2540-dell-range-blvd",
"path": "locations/us/wy/cheyenne/2540-dell-range-blvd/store-4521"
}
],
"source_url": "https://api-idp.sonicdrivein.com/snc/web-exp-api/v1/location/list/urls",
"fetched_at": "2026-09-06T12:00:00Z"
}
}Request schema
No body schema
Response schema
#/definitions/sonic.locationsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | Code is the HTTP status code or a custom code used to indicate the result of the request @example 200 | |||
| data | sonic.LocationsResponse | No | ||||
| data.city | string | No | cheyenne | |||
| data.count | integer | No | 100 | |||
| data.fetched_at | string | No | ||||
| data.locations | array | No | ||||
| data.locations[].address_slug | string | No | 2540-dell-range-blvd | |||
| data.locations[].city_slug | string | No | cheyenne | |||
| data.locations[].country_code | string | No | US | |||
| data.locations[].path | string | No | locations/us/wy/cheyenne/2540-dell-range-blvd/store-4521 | Path is the ready-made value GET /sonic/store takes. | ||
| data.locations[].state_code | string | No | WY | |||
| data.locations[].store_id | string | No | 4521 | |||
| data.page | integer | No | 1 | |||
| data.page_size | integer | No | 100 | |||
| data.source_url | string | No | ||||
| data.state | string | No | WY | |||
| data.total | integer | No | 5125 | |||
| data.total_pages | integer | No | 52 | |||
| msg | unknown | No | Msg is the message that describes the result of the request @example "Request successful" |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/sonic/locations?page=1" \
-H "x-api-key: $CRAWLORA_API_KEY"