---
title: "List Sonic Drive-In restaurants with ready-made store paths"
method: GET
path: "/sonic/locations"
tags: ["Sonic"]
---

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

`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`

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

## Query parameters

- `state` string
- `city` string
- `page` integer
- `page_size` integer

## Headers

- `x-api-key` string, required

## Response `200`

OK

- SonicLocationsResponseDoc
  - `code` integer: Code is the HTTP status code or a custom code used to indicate the result of the request @example 200
  - `data` SonicLocationsResponse
    - `city` string
    - `count` integer
    - `fetched_at` string
    - `locations` SonicLocationEntry[]
      - `address_slug` string
      - `city_slug` string
      - `country_code` string
      - `path` string: Path is the ready-made value GET /sonic/store takes.
      - `state_code` string
      - `store_id` string
    - `page` integer
    - `page_size` integer
    - `source_url` string
    - `state` string
    - `total` integer
    - `total_pages` integer
  - `msg` unknown

## Other responses

- `400`: Bad Request
- `429`: Too Many Requests
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/afac9b012a27?raw)
