> For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.sonicalpha.ai/llms.txt. For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sonicalpha.ai/_mcp/server. For SDK generation or contract validation, use the authoritative OpenAPI spec at https://api.sonicalpha.ai/openapi.json — this docs domain's /openapi.json is a regenerated copy that can differ in auth modeling and strictness annotations.

# List episodes

GET https://api.sonicalpha.ai/v1/episodes

Find episodes by title, show, and/or date window — newest first.
Only episodes with searchable insights are listed.

Use an episode's `id` in the `episode_ids` search filter to scope
retrieval to that one conversation.

Reference: https://docs.sonicalpha.ai/api-reference/episodes/list-episodes

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `query` (string, optional, nullable) — Episode-title match — typo-tolerant on its own; exact (case-insensitive) when combined with `podcast_id` or a date window.
- `podcast_id` (string, optional, nullable) — Scope to one show — the podcast `id` from the directory.
- `date_from` (string, optional, nullable) — Earliest `published_at` to include, inclusive. ISO 8601; a bare date starts at UTC midnight.
- `date_to` (string, optional, nullable) — Latest `published_at` to include, inclusive — a bare date covers the whole day.
- `limit` (integer, optional, default: 25) — Episodes per page, up to 200. Default 25.
- `cursor` (string, optional, nullable) — `next_cursor` from the previous page.

## Response

### 200

Successful Response

- `episodes` (list of EpisodeCard, required) — One page of episodes, newest first.
- `count` (integer, required) — Episodes in this page — not the total matching the query.
- `next_cursor` (string, optional, nullable) — Pass back as `cursor` to fetch the next page. `null` on the last page.

## Errors

### 400 Bad Request Error

Malformed request: unknown field, bad cursor, or out-of-range parameter

- `error` (ErrorResponseError, required) — The error envelope. Every non-2xx response on every endpoint uses this shape.

### 401 Unauthorized Error

Missing or invalid API key

- `error` (ErrorResponseError, required) — The error envelope. Every non-2xx response on every endpoint uses this shape.

### 422 Unprocessable Entity Error

Invalid request (validation)

- `error` (ErrorResponseError, required) — The error envelope. Every non-2xx response on every endpoint uses this shape.

### 429 Too Many Requests Error

Rate limit or daily quota exceeded; includes Retry-After

- `error` (ErrorResponseError, required) — The error envelope. Every non-2xx response on every endpoint uses this shape.

### 500 Internal Server Error

Internal error

- `error` (ErrorResponseError, required) — The error envelope. Every non-2xx response on every endpoint uses this shape.

## Types

### EpisodeCard

- `id` (string, required) — Episode id. Every insight from this conversation carries it as `episode_id`, and the `episode_ids` search filter accepts it.
- `insight_count` (integer, required) — How many searchable insights this conversation yielded — a dense discussion runs to dozens, a passing segment to one or two.
- `title` (string, optional, nullable) — Episode title.
- `published_at` (string, optional, nullable) — When the episode aired — ISO 8601 UTC.
- `duration_seconds` (integer, optional, nullable) — Length of the recording, in seconds.
- `episode_audio_url` (string, optional, nullable) — Full episode audio. Pair with an insight's `start_seconds` to play a claim at the moment it was said.
- `episode_url` (string, optional, nullable) — Public web page for the episode.
- `episode_image_url` (string, optional, nullable) — Episode artwork.
- `podcast_id` (string, optional, nullable) — Id of the show this episode belongs to.
- `podcast_name` (string, optional, nullable) — Display name of the show.
- `podcast_image_url` (string, optional, nullable) — Show artwork.

### ErrorResponseError

The error envelope. Every non-2xx response on every endpoint uses this shape.

- `type` (enum, required)
  - Allowed values: `invalid_request_error`, `authentication_error`, `permission_error`, `not_found_error`, `rate_limit_error`, `api_error`
- `message` (string, required)

## Examples

**Response**

```json
{
  "episodes": [
    {
      "id": "string",
      "insight_count": 1,
      "title": "string",
      "published_at": "string",
      "duration_seconds": 1,
      "episode_audio_url": "string",
      "episode_url": "string",
      "episode_image_url": "string",
      "podcast_id": "string",
      "podcast_name": "string",
      "podcast_image_url": "string"
    }
  ],
  "count": 1,
  "next_cursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.sonicalpha.ai/v1/episodes"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sonicalpha.ai/v1/episodes';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sonicalpha.ai/v1/episodes"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sonicalpha.ai/v1/episodes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.sonicalpha.ai/v1/episodes")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sonicalpha.ai/v1/episodes', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sonicalpha.ai/v1/episodes");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sonicalpha.ai/v1/episodes")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```