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

# Search Episodes

> Search episode titles, show notes and transcripts.

```
GET https://api.rephonic.com/api/search/episodes/
```

Find episodes that mention something in their title, show notes or transcript. Without a query, you get the newest episodes from podcasts that match your [filters](https://rephonic.com/developers/docs/1.1/search-filters.md).

With a query, you get one episode per podcast, its best match. To get every matching episode from one podcast, pass its `podcast_id`.

Filters apply to the podcast each episode belongs to, so `listeners:gte:5000` finds episodes of shows with at least 5,000 listeners per episode.

You can page through the first 10,000 results.

## Parameters

| Field | In | Description | Default | Max | Required |
|-------|----|-------------|---------|-----|----------|
| query | query | What to search for. It matches episode titles, show notes and transcripts. Up to 200 characters. Every word has to match, so `climate farming` only finds results with both words. Put `OR` in capitals between words to match either of them, as in `climate OR weather`. Put a phrase in quotes to match it exactly, as in `"climate change"`, and put a minus sign before a word to leave out results that have it, as in `climate -politics`. Use parentheses to group words, as in `(climate OR weather) farming`. |  |  |  |
| per_page | query | How many results to get on each page. | 50 | 100 |  |
| page | query | Which page of results to get, starting at 1. | 1 |  |  |
| filters | query | Narrow the results with [search filters](https://rephonic.com/developers/docs/1.1/search-filters.md), separated by commas. |  |  |  |
| podcast_id | query | Only search one podcast's episodes. Pass its Rephonic ID, e.g. `the-daily`. With a query, you then get every episode that matches. |  |  |  |
| threshold | query | How recent the episodes have to be, in seconds. For example, `3600` gets episodes published in the last hour. The maximum is `1209600`, which is 14 days. |  | 1209600 |  |

## Response Fields

- `page` (integer): The page you asked for.
- `more` (boolean): Whether there is another page of results.
- `count` (integer): How many results match, up to 10,000.
- `per_page` (integer): How many results are on each page.
- `spelling_suggestion` (string or null): A corrected spelling of the query when we think it is misspelled, or `null`.
- `episodes` (array of EpisodeSearchResult objects): The episodes on this page.

## Example Request

```bash
curl -G https://api.rephonic.com/api/search/episodes/ \
  -H "X-Rephonic-Api-Key: YOUR_API_KEY" \
  --data-urlencode "query=remix"
```

## Example Response

```json
{
  "page": 1,
  "more": true,
  "count": 10000,
  "per_page": 50,
  "spelling_suggestion": null,
  "episodes": [
    {
      "id": "tgypv-delayed-premiere-ness-flesh-of-the-gods-dino",
      "title": "PREMIERE: Ness - Flesh Of The Gods (Dino Sabatini Remix) [Navigare Audio]",
      "published": "2025-01-29T08:28:35.384Z",
      "audio_url": "https://feeds.soundcloud.com/stream/1978009943.mp3",
      "guid": "tag:soundcloud,2010:tracks/1978009943",
      "itunes_id": null,
      "duration": 453,
      "transcribed": false,
      "type": null,
      "evergreen": null,
      "branded": null,
      "popularity": null,
      "political_leaning": null,
      "summary": null,
      "notes": "After two years of anticipation, the wait is over...",
      "podcast": {
        "id": "fiction-lab",
        "name": "Delayed",
        "itunes_id": 1441342580,
        "publisher": {
          "id": "delayed",
          "name": "Delayed"
        },
        "genres": ["Music"],
        "artwork_url": "https://img.rephonic.com/artwork/fiction-lab.jpg?width=600&height=600&quality=95",
        "artwork_thumbnail_url": "https://img.rephonic.com/artwork/fiction-lab.jpg?width=70&height=70&quality=95",
        "active": true,
        "sponsors": {
          "accepted": false
        },
        "guests": {
          "accepted": true
        },
        "weekly_downloads": 151,
        "downloads_per_episode": 46
      }
    }
  ]
}
```

## Objects

Objects that the fields above refer to by name.

### EpisodeSearchResult Object

An episode in search results, with a short version of its podcast.

- `id` (string): The episode's Rephonic ID.
- `title` (string): The episode's title.
- `published` (timestamp): When the episode was published.
- `audio_url` (string or null): The audio file, or `null` when Apple Podcasts hosts the audio, in which case use `itunes_id`.
- `guid` (string or null): The episode's GUID from the RSS feed.
- `itunes_id` (integer or null): The episode's Apple Podcasts ID.
- `duration` (integer or null): How long the episode is, in seconds.
- `transcribed` (boolean): Whether we have a transcript. Get it from [episode transcript](https://rephonic.com/developers/docs/1.1/episode-transcript.md).
- `type` (string or null): The episode's format. Values: `monologue`, `discussion`, `interview`, `storytelling`, `scripted`, `news`, `review`, `educational`, `journalism`, `documentary`, `q_and_a`.
- `evergreen` (boolean or null): Whether the episode is evergreen, meaning its content won't go out of date.
- `branded` (boolean or null): Whether the episode is made to promote a company or organisation.
- `popularity` (number or null): How popular the episode is in Apple Podcasts, from 0 to 1. Only compare it between episodes of the same show. It's `null` for shows without enough ratings or episodes for Apple to rank them.
- `political_leaning` (object or null): The episode's political leaning, or `null` when it isn't political.
  - `name` (string): The leaning. Values: `left`, `center_left`, `center`, `center_right`, `right`.
  - `explanation` (string or null): Why we think so.
- `summary` (string or null): Our short summary of the episode, or `null` until we've analysed it.
- `notes` (string or null): The show notes from the RSS feed, as plain text.
- `podcast` (PodcastSummary object): The podcast the episode belongs to.

### PodcastSummary Object

The short version of a podcast that appears inside other results. Pass its `id` to [get a podcast](https://rephonic.com/developers/docs/1.1/get-podcast.md) for the rest.

- `id` (string): The podcast's Rephonic ID.
- `name` (string): The podcast's name.
- `itunes_id` (integer): The podcast's Apple Podcasts ID.
- `publisher` (object)
  - `id` (string): The publisher's Rephonic ID.
  - `name` (string): The publisher's name.
- `genres` (array of strings): The Apple Podcasts categories the show is in, main category first.
- `artwork_url` (string): The cover art, 600 by 600 pixels.
- `artwork_thumbnail_url` (string): The cover art, 70 by 70 pixels.
- `active` (boolean or null): Whether the show published an episode in the last 60 days.
- `sponsors` (object)
  - `accepted` (boolean or null): Whether the show takes sponsors. It's `null` when we haven't analysed the show yet.
- `guests` (object)
  - `accepted` (boolean or null): Whether the show is likely to take guests. It's `null` when we haven't analysed the show yet.
- `weekly_downloads` (integer or null, sometimes absent): Our estimate of listeners per week. See `downloads_per_episode`. Left out of transcript results.
- `downloads_per_episode` (integer or null, sometimes absent): Our estimate of listeners per episode, based on public data. It doesn't include YouTube views. It's `null` when we don't have a reliable estimate, which is usual for shows that aren't active. Left out of transcript results.
