> Part of the Rephonic API reference. The full list of pages is at https://rephonic.com/llms.txt.

# Chart Categories

> The chart categories and countries for Apple Podcasts, Spotify or YouTube.

```
GET https://api.rephonic.com/api/charts/{platform}/
```

Find which charts we track on Apple Podcasts, Spotify or YouTube, by category and country. Pass the slugs to [chart rankings](https://rephonic.com/developers/docs/1.1/chart-rankings.md) to get a chart.

## Parameters

| Field | In | Description | Default | Max | Required |
|-------|----|-------------|---------|-----|----------|
| platform | path | The app whose charts you want. One of `apple`, `spotify`, `youtube`. |  |  | Yes |

## Response Fields

- `categories` (array of objects): The categories that have charts on this platform.
  - `id` (integer, sometimes absent): The category's ID, for the `categories` search filter. Apple Podcasts categories only.
  - `name` (string): The full name. A subcategory includes its parent, as in `Arts / Books`.
  - `short_name` (string): The name without the parent category, as in `Books`.
  - `slug` (string): The category's slug, for [chart rankings](https://rephonic.com/developers/docs/1.1/chart-rankings.md).
  - `parent_slug` (string or null): The parent category's slug, or `null` for a top-level category.
- `countries` (array of objects): The countries that have charts on this platform.
  - `name` (string): The country's name in English.
  - `id` (string): The two-letter country code, lowercase. Use it in the `locations` search filter.
  - `slug` (string): The country's slug, for [chart rankings](https://rephonic.com/developers/docs/1.1/chart-rankings.md).

## Example Request

```bash
curl https://api.rephonic.com/api/charts/apple/ \
  -H "X-Rephonic-Api-Key: YOUR_API_KEY"
```

## Example Response

```json
{
  "categories": [
    {
      "id": 1301,
      "name": "Arts",
      "short_name": "Arts",
      "slug": "arts",
      "parent_slug": null
    },
    {
      "id": 1482,
      "name": "Arts / Books",
      "short_name": "Books",
      "slug": "arts-books",
      "parent_slug": "arts"
    },
    {
      "id": 1318,
      "name": "Technology",
      "short_name": "Technology",
      "slug": "technology",
      "parent_slug": null
    }
  ],
  "countries": [
    {
      "name": "United States",
      "id": "us",
      "slug": "united-states"
    },
    {
      "name": "Canada",
      "id": "ca",
      "slug": "canada"
    },
    {
      "name": "United Kingdom",
      "id": "gb",
      "slug": "united-kingdom"
    },
    {
      "name": "Australia",
      "id": "au",
      "slug": "australia"
    }
  ]
}
```
