# YouTube Data API API reference

> The YouTube Data API v3 returns YouTube channels, videos, playlists, comments and search results as JSON. An investigator uses it to look up a channel by handle or ID, read a video's title, description, tags and statistics, and search for videos, channels and playlists by keyword. Calls are GET…

Source: https://osinttools.io/apis/youtube-data-api/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/youtube-data-api/

- Base URL: https://www.googleapis.com/youtube/v3
- Authentication: API key in the `key` query parameter. Get a key: https://console.cloud.google.com/apis/credentials Created in the Google Cloud console. Write requests and private data need OAuth 2.0 instead.
- Rate limits: Quota units per request, not requests per second; the daily allowance is not stated on the method pages
- Vendor docs: https://developers.google.com/youtube/v3/docs

## Overview

The YouTube Data API v3 returns YouTube channels, videos, playlists, comments and search results as JSON. An investigator uses it to look up a channel by handle or ID, read a video's title, description, tags and statistics, and search for videos, channels and playlists by keyword.

Calls are GET requests under `https://www.googleapis.com/youtube/v3`. Public data needs an API key, sent as the `key` query parameter; changes and private data need an OAuth 2.0 token. Each request costs quota units; the three read methods below cost 1 unit each.

Only the read methods most useful for lookups are described here. The API also covers captions, comments, playlists, subscriptions and uploads.

## Errors

| Status | Meaning |
| --- | --- |
| 400 | Bad request, for example invalidCriteria or invalidSearchFilter |
| 403 | Forbidden: not authorized for the request |
| 404 | Not found, for example channelNotFound or videoNotFound |

## Search

### Search for videos, channels and playlists.

`GET /search`

- Takes: Name, Username
- Footprint: passive (the target is not contacted)
- Cost: 1 quota unit

Returns search resources matching the query. type defaults to video, channel and playlist. Results are paged with pageToken. When type is video, a channelId filter caps results at 500 videos.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `part` | query | string | yes | Must be snippet Example: snippet |
| `q` | query | string | no | Search query; supports - (NOT) and | (OR, encoded as %7C) Example: example channel |
| `type` | query | string | no | Comma-separated resource types Example: channel One of: channel, playlist, video |
| `channelId` | query | string | no | Limit results to one channel Example: UCexample0000000000000000 |
| `maxResults` | query | integer | no | 0 to 50 Example: 10 |
| `order` | query | string | no | Sort order Example: date One of: date, rating, relevance, title, videoCount, viewCount |
| `publishedAfter` | query | string | no | Lower bound, RFC 3339 Example: 2025-01-01T00:00:00Z |
| `publishedBefore` | query | string | no | Upper bound, RFC 3339 Example: 2026-01-01T00:00:00Z |
| `regionCode` | query | string | no | ISO 3166-1 alpha-2 country code Example: NL |
| `pageToken` | query | string | no | Page from nextPageToken or prevPageToken Example: NEXT_PAGE_TOKEN |

Response fields:

- `kind` (string): Always youtube#searchListResponse
- `nextPageToken` (string): Token for the next page
- `prevPageToken` (string): Token for the previous page
- `regionCode` (string): Region used for the query
- `pageInfo.totalResults` (integer): Approximate total, at most 1,000,000
- `pageInfo.resultsPerPage` (integer): Results in this response
- `items[]` (object): Search resources matching the query

```bash
curl 'https://www.googleapis.com/youtube/v3/search?part=snippet&key=YOUR_API_KEY'
```

Example response (200):

```json
{
  "kind": "youtube#searchListResponse",
  "nextPageToken": "NEXT_PAGE_TOKEN",
  "regionCode": "NL",
  "pageInfo": {
    "totalResults": 1,
    "resultsPerPage": 1
  },
  "items": [
    {
      "kind": "youtube#searchResult"
    }
  ]
}
```

## Videos

### Details of videos by ID, or the most popular videos in a region.

`GET /videos`

- Takes: URL
- Footprint: passive (the target is not contacted)
- Cost: 1 quota unit

Exactly one filter is required: id, chart or myRating (needs authorization). part picks which resource sections are returned, for example snippet and statistics. maxResults and pageToken are not supported with id.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `part` | query | string | yes | Comma-separated resource parts to return Example: snippet,statistics One of: contentDetails, id, liveStreamingDetails, localizations, player, recordingDetails, snippet, statistics, status, topicDetails |
| `id` | query | string | no | Comma-separated video IDs Example: VIDEO_ID |
| `chart` | query | string | no | Chart to return Example: mostPopular One of: mostPopular |
| `regionCode` | query | string | no | ISO 3166-1 alpha-2 code; only used with chart Example: NL |
| `hl` | query | string | no | Language for localized snippet values Example: en |

Response fields:

- `kind` (string): Always youtube#videoListResponse
- `nextPageToken` (string): Token for the next page
- `pageInfo.totalResults` (integer): Total results in the set
- `pageInfo.resultsPerPage` (integer): Results in this response
- `items[]` (object): Video resources
- `items[].id` (string): Video ID
- `items[].snippet.channelId` (string): Channel that uploaded the video
- `items[].snippet.title` (string): Video title
- `items[].snippet.description` (string): Video description
- `items[].snippet.tags[]` (string): Video tags
- `items[].snippet.categoryId` (string): Video category ID

```bash
curl 'https://www.googleapis.com/youtube/v3/videos?part=snippet%2Cstatistics&key=YOUR_API_KEY'
```

Example response (200):

```json
{
  "kind": "youtube#videoListResponse",
  "pageInfo": {
    "totalResults": 1,
    "resultsPerPage": 1
  },
  "items": [
    {
      "id": "VIDEO_ID",
      "snippet": {
        "channelId": "UCexample0000000000000000",
        "title": "Example video",
        "description": "Example description",
        "tags": [
          "example"
        ],
        "categoryId": "22"
      }
    }
  ]
}
```

## Channels

### Details of channels by handle, username or ID.

`GET /channels`

- Takes: Username
- Footprint: passive (the target is not contacted)
- Cost: 1 quota unit

Exactly one filter is required: forHandle, forUsername, id, mine or managedByMe. mine and managedByMe need authorization.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `part` | query | string | yes | Comma-separated resource parts to return Example: snippet,statistics One of: brandingSettings, contentDetails, id, localizations, snippet, statistics, status, topicDetails |
| `forHandle` | query | string | no | YouTube handle, with or without @ Example: @example |
| `forUsername` | query | string | no | YouTube username Example: exampleuser |
| `id` | query | string | no | Comma-separated channel IDs Example: UCexample0000000000000000 |
| `maxResults` | query | integer | no | 0 to 50 Example: 5 |

Response fields:

- `kind` (string): Always youtube#channelListResponse
- `nextPageToken` (string): Token for the next page
- `pageInfo.totalResults` (integer): Total results in the set
- `pageInfo.resultsPerPage` (integer): Results in this response
- `items[]` (object): Channel resources
- `items[].id` (string): Channel ID

```bash
curl 'https://www.googleapis.com/youtube/v3/channels?part=snippet%2Cstatistics&key=YOUR_API_KEY'
```

Example response (200):

```json
{
  "kind": "youtube#channelListResponse",
  "pageInfo": {
    "totalResults": 1,
    "resultsPerPage": 1
  },
  "items": [
    {
      "kind": "youtube#channel",
      "id": "UCexample0000000000000000"
    }
  ]
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
