## youtube/search

`GET /v1/youtube/search`

Search YouTube for videos, channels and playlists (Data API search.list; 100 quota units per call).

*YouTube search*

| Parameter | Required | Description |
| --- | --- | --- |
| `query` | yes | Search query — e.g. `lofi hip hop` |
| `type` | no | Result kinds: video, channel, playlist (comma-separable) Accepted values (comma-separated): video, channel, playlist. Case, spaces, hyphens and underscores are interchangeable. — e.g. `video` |
| `sortBy` | no | relevance, date, rating, title or views (maps to order/viewCount) Accepted values: relevance, date, rating, title, views, viewCount, viewcount. Case, spaces, hyphens and underscores are interchangeable. — e.g. `date` |
| `duration` | no | short, medium or long (forces video results) Accepted values: short, medium, long. Case, spaces, hyphens and underscores are interchangeable. — e.g. `medium` |
| `uploadDate` | no | hour/today/week/month/year — mapped to publishedAfter Accepted values: hour, lasthour, today, day, week, thisweek, month, thismonth, year, thisyear. Case, spaces, hyphens and underscores are interchangeable. — e.g. `week` |
| `region` | no | ISO-3166 region code (maps to regionCode) — e.g. `US` |
| `max_results` | no | Results per page, max 50 — e.g. `25` |
| `cursor` | no | Opaque page token from a previous response — e.g. `CAUQAA` |
| `include_metrics` | no | Opt in to one bounded video-metrics batch and one channel-handle batch at the same one-credit price. Original records, precise dates and continuation survive partial enrichment. Check data.enrichment for completion. Accepted values: true, false. Case, spaces, hyphens and underscores are interchangeable. — e.g. `true` |
| `dry_run` | no | Read a zero-credit estimate without fetching sources, running AI, or reserving credits. Cache status is a snapshot, not a guarantee at execution. Accepted values: 1, 0, true, false. Case, spaces, hyphens and underscores are interchangeable. — e.g. `1` |
| `judgments` | no | Add bounded AI labels to eligible returned records (default on). off preserves the original data shape. Unclassified records remain present; labels depend on evidence, time, capacity and the existing request budget. No label surcharge. Accepted values: on, off. Case, spaces, hyphens and underscores are interchangeable. — e.g. `on` |
| `label` | no | Set none to disable labels; default enables the endpoint’s label set. Equivalent to judgments=off. Accepted values: default, none. Case, spaces, hyphens and underscores are interchangeable. — e.g. `none` |
| `label_evidence` | no | Include exact supporting sentences and zero-based sentence indexes when a label has validated evidence. No extra charge or change to decisions. Accepted values: 1, 0, true, false. Case, spaces, hyphens and underscores are interchangeable. — e.g. `1` |
| `exclude` | no | Optionally remove confidently labelled engagement bait. Uncertain and unclassified records stay; removed IDs and an owner-bound recall reference are returned. Accepted values: engagement_bait. Case, spaces, hyphens and underscores are interchangeable. — e.g. `engagement_bait` |
| `fit` | no | Use goal to replace confidently irrelevant records with recall stubs. Keeps first, last, relevant and uncertain records; preserves order. Full evidence is stored for 24 hours when available. Accepted values: goal. Case, spaces, hyphens and underscores are interchangeable. — e.g. `goal` |
| `goal` | no | Required with fit=goal: describe the task in at most 600 characters. Supplied text is task context, never permission to act on posts. — e.g. `Find concrete product complaints` |
| `tokens` | no | Optional soft response target for fit=goal, 256–32000. Safety and evidence retention take priority, so the returned result may exceed it. — e.g. `4000` |

### Useful optional inputs

- `region`: Select the documented source market or request location. Read this endpoint’s region semantics; it does not generally prove creator residence.
- `fit`: Use fit=goal with a task description to replace confidently irrelevant records with recall stubs and reduce agent context. No fit surcharge; full evidence is retained for 24 hours when stored, and the response size target is soft.
- `dry_run`: Read a free estimate before fetching sources or scheduling paid work. Zero credits; cache status and availability are snapshots rather than guarantees.

**Cost:** 1 credit at list price per successful uncached response; variable-cost operations may quote or settle a different charge. Confirmed uncharged or refunded failures report zero. Pending reconciliation can report credits_used:null; retain request_id and the original idempotency key.

```bash
curl "https://www.monocrawl.com/v1/youtube/search?query=lofi%20hip%20hop" \
  -H "x-api-key: mn_your_key_here"
```

### Response data

Illustrative abbreviated data; documented core fields are optional and may be null. Additional source fields are allowed.

```json
{
  "items": [
    {
      "kind": "video",
      "id": "abcdefghijk",
      "url": "https://www.youtube.com/watch?v=abcdefghijk",
      "title": "A quieter desk setup",
      "channel": {
        "id": "UC_example",
        "name": "Example Channel"
      }
    }
  ],
  "cursor": null,
  "has_more": null
}
```

[Field reference](https://www.monocrawl.com/docs/endpoints/youtube/search#response) · [JSON Schema for response.data](https://www.monocrawl.com/schemas/youtube/search.json)
