---
title: "Browse Sonic Drive-In's restaurant directory by country, state and city"
method: GET
path: "/sonic/directory"
tags: ["Sonic"]
---

# Browse Sonic Drive-In's restaurant directory by country, state and city

`GET /sonic/directory`

## Request

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

Returns Sonic Drive-In's restaurant directory as a country to state to city tree, with a restaurant count at every level. Use it to discover which states and cities have restaurants before calling GET /sonic/locations or GET /sonic/nearby. Each city carries both its display name and the slug that composes into a store path. Counts here describe listed restaurants and are internally consistent (the city counts sum to total_count); GET /sonic/locations enumerates a larger set of store pages, so the two totals intentionally differ.

## Headers

- `x-api-key` string, required

## Response `200`

OK

- SonicDirectoryResponseDoc
  - `code` integer: Code is the HTTP status code or a custom code used to indicate the result of the request @example 200
  - `data` SonicDirectoryResponse
    - `countries` SonicDirectoryCountry[]
      - `count` integer
      - `country_code` string
      - `country_name` string
      - `states` SonicDirectoryState[]
        - `cities` SonicDirectoryCity[]
          - `count` integer
          - `name` string
          - `slug` string: Slug is the city segment as it appears in a store path, which is the lowercased form GET /sonic/locations returns.
        - `code` string
        - `count` integer
        - `name` string
    - `fetched_at` string
    - `source_url` string
    - `total_count` integer
  - `msg` unknown

## Other responses

- `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/0497899e2016?raw)
