Search YouTube videos by keyword
youtube.youtube.search.videosSearch YouTube videos by keyword
- Price
- freeプロバイダー原価
- Success rate
- 100%Last 30 days · 2,373 calls
- Latency p50
- 332 msp95 596 ms
- Last verified
- 2026/07/28Verified 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
パラメータ
search results carry NO statistics — pass the returned video ids to youtube.video.detail for view/like counts
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
q | 文字列 | 必須 | coffee | |
part | 文字列 | 必須 | snippet | |
type | 文字列 | 任意 | video | channel | playlist; omit to mix all three | video |
order | 文字列 | 任意 | relevance (default) | date | viewCount | rating | title | |
maxResults | 整数 | 任意 | 1–50, default 5 | 10 |
regionCode | 文字列 | 任意 | ISO 3166-1 alpha-2 | US |
publishedAfter | 文字列 | 任意 | RFC 3339 timestamp | 2026-01-01T00:00:00Z |
- クエリパラメータ
q文字列必須例:
coffeepart文字列必須例:
snippettype文字列任意video | channel | playlist; omit to mix all three
例:
videoorder文字列任意relevance (default) | date | viewCount | rating | title
maxResults整数任意1–50, default 5
例:
10regionCode文字列任意ISO 3166-1 alpha-2
例:
USpublishedAfter文字列任意RFC 3339 timestamp
例:
2026-01-01T00:00:00Z
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
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());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は free です。サービス料を含みます。