Search YouTube videos by keyword
youtube.youtube.search.videosSearch YouTube videos by keyword
- Price
- freeAt provider cost
- Success rate
- 100%Last 30 days · 2,373 calls
- Latency p50
- 332 msp95 596 ms
- Last verified
- Jul 28, 2026Verified working
GEThttps://toolswitch.dev/v1/tools/youtube.youtube.search.videos?q=design+tutorial&part=snippet&type=video&maxResults=2Preview- Uses platform quota
- Synchronous response
- Reads public data
Parameters
search results carry NO statistics — pass the returned video ids to youtube.video.detail for view/like counts
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
q | string | Required | coffee | |
part | string | Required | snippet | |
type | string | Optional | video | channel | playlist; omit to mix all three | video |
order | string | Optional | relevance (default) | date | viewCount | rating | title | |
maxResults | integer | Optional | 1–50, default 5 | 10 |
regionCode | string | Optional | ISO 3166-1 alpha-2 | US |
publishedAfter | string | Optional | RFC 3339 timestamp | 2026-01-01T00:00:00Z |
- Query parameters
qstringRequiredExample:
coffeepartstringRequiredExample:
snippettypestringOptionalvideo | channel | playlist; omit to mix all three
Example:
videoorderstringOptionalrelevance (default) | date | viewCount | rating | title
maxResultsintegerOptional1–50, default 5
Example:
10regionCodestringOptionalISO 3166-1 alpha-2
Example:
USpublishedAfterstringOptionalRFC 3339 timestamp
Example:
2026-01-01T00:00:00Z
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
Preview
curl -X GET 'https://toolswitch.dev/v1/tools/youtube.youtube.search.videos?q=design+tutorial&part=snippet&type=video&maxResults=2' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/youtube.youtube.search.videos?q=design+tutorial&part=snippet&type=video&maxResults=2",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/youtube.youtube.search.videos?q=design+tutorial&part=snippet&type=video&maxResults=2", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at free, including the service fee.