Sonic

List Sonic Drive-In restaurants with ready-made store paths

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).

get/sonic/locations

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/sonic/locations
  • Auth: API key in header x-api-key

Query parameters

statestring

Two-letter state or province code to filter by

citystring

City slug to filter by, from /sonic/directory

pageinteger

1-based page number. Defaults to 1.

page_sizeinteger

Entries per page, 1-500. Defaults to 100.

Headers

x-api-keystring required

API key required

Response

OK

codeinteger

Code is the HTTP status code or a custom code used to indicate the result of the request @example 200

msgunknown

Example response

{
  "data": {
    "city": "cheyenne",
    "count": 100,
    "locations": [
      {
        "address_slug": "2540-dell-range-blvd",
        "city_slug": "cheyenne",
        "country_code": "US",
        "path": "locations/us/wy/cheyenne/2540-dell-range-blvd/store-4521",
        "state_code": "WY",
        "store_id": "4521"
      }
    ],
    "page": 1,
    "page_size": 100,
    "state": "WY",
    "total": 5125,
    "total_pages": 52
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.