# YouTube — Search

Search YouTube general via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no cookies required. Powered by ScrapeCreators, pass parameters such as continuationToken, duration, includeExtras, and retrieve structured data including returned channels field, returned continuation token field, returned credits charged field, returned credits remaining field, and returned lives field for content research and account lookup, and integration reference.

Documentation: https://openany.si/youtube/youtube-general-search/cb7323b0-c83e-42df-9130-788bfba98719/
API ID: cb7323b0-c83e-42df-9130-788bfba98719
Provider: scrapecreators
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/search
Page update time: 2026-12-03T02:55:56.651Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.00188 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:55:56.414Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "1880",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## YouTube — Search API

Search for YouTube by keyword query and return matching videos, channels, playlists, shorts, shelves, and live streams. Provide query in query. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

## What You Can Build

- **Content research and account lookup**: Keep source records connected to their content and account identifiers.
- **Integration reference**: Use the selected request format and keep source identifiers with the returned result.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `channels` | Returned channels field |
| `continuationToken` | Returned continuation token field |
| `credits_charged` | Returned credits charged field |
| `credits_remaining` | Returned credits remaining field |
| `lives` | Returned lives field |
| `playlists` | Returned playlists field |
| `shelves[].items` | Item collection |
| `shelves[].title` | Title |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "YouTube — Search request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "Search query. For stricter title matching, use YouTube's intitle: operator, for example intitle:\"Foursquare Swarm\". Quoted queries by themselves may still be broadened by YouTube when no fresh exact matches are available."
        },
        "uploadDate": {
          "type": "string",
          "description": "Upload date",
          "enum": [
            "today",
            "this_week",
            "this_month",
            "this_year"
          ]
        },
        "sortBy": {
          "type": "string",
          "description": "Sort by",
          "enum": [
            "relevance",
            "popular"
          ]
        },
        "type": {
          "type": "string",
          "description": "Type of content to search for",
          "enum": [
            "videos",
            "shorts",
            "channels",
            "playlists"
          ]
        },
        "duration": {
          "type": "string",
          "description": "Duration of the video. Only applies to videos (not shorts).",
          "enum": [
            "under_3_min",
            "between_3_and_20_min",
            "over_20_min"
          ]
        },
        "region": {
          "type": "string",
          "description": "2 letter country code of the country to put the proxy in."
        },
        "continuationToken": {
          "type": "string",
          "description": "Continuation token to get more videos. Get 'continuationToken' from previous response."
        },
        "includeExtras": {
          "type": "string",
          "description": "This will get you the like + comment count and the description. To get the full details of the video, use the /v1/youtube/video endpoint. *This will slow down the response slightly.*"
        }
      },
      "required": [
        "query"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "channels": {
      "type": "array",
      "items": {}
    },
    "continuationToken": {
      "type": "string"
    },
    "credits_charged": {
      "type": "integer"
    },
    "credits_remaining": {
      "type": "integer"
    },
    "lives": {
      "type": "array",
      "items": {}
    },
    "playlists": {
      "type": "array",
      "items": {}
    },
    "shelves": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "thumbnail": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "viewCountInt": {
                  "type": "integer"
                },
                "viewCountText": {
                  "type": "string"
                }
              }
            }
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      }
    },
    "shorts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "badges": {
            "type": "array",
            "items": {}
          },
          "channel": {
            "type": "object",
            "properties": {
              "handle": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "thumbnail": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            }
          },
          "id": {
            "type": "string"
          },
          "lengthSeconds": {
            "type": "integer"
          },
          "lengthText": {
            "type": "string"
          },
          "publishedTime": {
            "type": "string"
          },
          "publishedTimeText": {
            "type": "string"
          },
          "thumbnail": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "viewCountInt": {
            "type": "integer"
          },
          "viewCountText": {
            "type": "string"
          }
        }
      }
    },
    "success": {
      "type": "boolean"
    },
    "videos": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "badges": {
            "type": "array",
            "items": {}
          },
          "channel": {
            "type": "object",
            "properties": {
              "handle": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "thumbnail": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            }
          },
          "id": {
            "type": "string"
          },
          "lengthSeconds": {
            "type": "integer"
          },
          "lengthText": {
            "type": "string"
          },
          "publishedTime": {
            "type": "string"
          },
          "publishedTimeText": {
            "type": "string"
          },
          "thumbnail": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "viewCountInt": {
            "type": "integer"
          },
          "viewCountText": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/search?continuationToken=4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB&duration=under_3_min&includeExtras=false&query=mr+beast&region=US&sortBy=relevance&type=videos' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "channels": [],
  "continuationToken": "EooDEg...",
  "credits_charged": 1,
  "credits_remaining": 1000000,
  "lives": [],
  "playlists": [],
  "shelves": [
    {
      "items": [
        {
          "id": "LLBR5nO05tE",
          "thumbnail": "https://i.ytimg.com/vi/LLBR5nO05tE/oardefault.jpg?sqp=-oaymwEoCJUDENAFSFqQAgHyq4qpAxcIARUAAIhC2AEB4gEKCBgQAhgGOAFAAQ==&rs=AOn4CLCYYIIDmBllgkLP68AjVs25UpyevQ",
          "title": "running through walls gone wrong",
          "type": "short",
          "url": "https://www.youtube.com/watch?v=LLBR5nO05tE",
          "viewCountInt": 750000,
          "viewCountText": "750K"
        }
      ],
      "title": "Shorts",
      "type": "shelf"
    }
  ],
  "shorts": [
    {
      "badges": [],
      "channel": {
        "handle": "abbyandryan",
        "id": "UCGRdcRxpJWi5Q2oDCrMDUuQ",
        "thumbnail": "https://yt3.ggpht.com/8UdUEesepx1Ry_rFUPJOJgndTCKno9VTkSysnuJpFjMj63N6av0pNwnqoiKh_7PN2dw7PGIp=s68-c-k-c0x00ffffff-no-rj",
        "title": "Abby and Ryan"
      },
      "id": "uMNvF-lSCHg",
      "lengthSeconds": 44,
      "lengthText": "0:44",
      "publishedTime": "2024-07-28T17:08:46.498Z",
      "publishedTimeText": "10 months ago",
      "thumbnail": "https://i.ytimg.com/vi/uMNvF-lSCHg/hq720.jpg?sqp=-oaymwFBCNAFEJQDSFryq4qpAzMIARUAAIhCGADYAQHiAQoIGBACGAY4AUAB8AEB-AG2CIACgA-KAgwIABABGFsgXyhlMA8=&rs=AOn4CLA_P-5ExEn9EGLJDNeJedsxb3k1eQ",
      "title": "LONG RUN ROUTINE #run #runvlog #runner #shorts #morning",
      "type": "short",
      "url": "https://www.youtube.com/watch?v=uMNvF-lSCHg",
      "viewCountInt": 462705,
      "viewCountText": "462,705 views"
    }
  ],
  "success": true,
  "videos": [
    {
      "badges": [],
      "channel": {
        "handle": "channel/UCoRR6OLuIZ2-5VxtnQIaN2w",
        "id": "UCoRR6OLuIZ2-5VxtnQIaN2w",
        "thumbnail": "https://yt3.ggpht.com/J1_Si0TYNZ-991v09y8RpCh4_Z_ALwKmPgMYnJqjNhoglVtipf3oEN8LpzG1kS0qsv8Jptpmmg=s88-c-k-c0x00ffffff-no-rj",
        "title": "NFrealmusic"
      },
      "id": "BzSzwqb-OEE",
      "lengthSeconds": 254,
      "lengthText": "4:14",
      "publishedTime": "2023-05-28T17:08:46.499Z",
      "publishedTimeText": "2 years ago",
      "thumbnail": "https://i.ytimg.com/vi/BzSzwqb-OEE/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLCasEKav1CLqeSSE2IYDqjGiIMBGw",
      "title": "NF - RUNNING (Audio)",
      "type": "video",
      "url": "https://www.youtube.com/watch?v=BzSzwqb-OEE",
      "viewCountInt": 14860541,
      "viewCountText": "14,860,541 views"
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which inputs identify this request?
Provide query in query (string). Keep identifiers and URLs in the formats documented for this implementation.

### Which values can I use for uploadDate?
The selected schema accepts today, this_week, this_month, this_year. Keep the documented string type and exact spelling for this input.

### Where do URL parameters belong?
Use the documented path and query inputs. This GET implementation does not use a JSON request body; keep path values and URL query values in their declared locations.

### How should I map the returned fields?
Use the documented response paths with their returned types. Keep null, empty collections, false and zero distinct, and retain the identifiers needed to match results to the request.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

## Available implementations
- scrapecreators: https://openany.si/youtube/youtube-general-search/cb7323b0-c83e-42df-9130-788bfba98719/
- tikhub: https://openany.si/youtube/youtube-general-search/26df84e7-c3cb-4776-b31a-96f0f75e8788/
- tikhub: https://openany.si/youtube/youtube-general-search/91b73333-2213-4aa2-afb9-eb9bc8a51731/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
