Search YouTube by keyword — videos, channels, playlists
scrapecreators.x.v1-youtube-searchSearches YouTube by keyword query and returns matching videos, channels, playlists, shorts, shelves, and live streams.
- Price
- $0.00188/callZum Anbieterpreis
- Success rate
- 100 %Last 30 days · 50.454 calls
- Latency p50
- 1.2 sp95 3.7 s
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-search?sortBy=relevancePreview- Uses platform quota
- Synchronous response
- Reads public data
Parameter
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Abfrageparameter | ||||
type | Zeichenkette | Optional | Type of content to search for. Plural forms: videos | shorts | channels | playlists (not video/channel). | videos |
query | Zeichenkette | Erforderlich | Search query | |
region | Zeichenkette | Optional | 2 letter country code of the country to put the proxy in. | US |
sortBy | Zeichenkette | Optional | Only relevance|popular work. view_count, upload_date, and rating are NOT accepted (HTTP 400). | relevance |
duration | Zeichenkette | Optional | Duration of the video. Only applies to videos (not shorts). One of: under_3_min | between_3_and_20_min | over_20_min. | under_3_min |
uploadDate | Zeichenkette | Optional | Filter by upload date. One of: today | this_week | this_month | this_year. | |
includeExtras | Zeichenkette | Optional | 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.* | false |
continuationToken | Zeichenkette | Optional | Continuation token to get more videos. Get 'continuationToken' from previous response. | 4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB |
- Abfrageparameter
typeZeichenketteOptionalType of content to search for. Plural forms: videos | shorts | channels | playlists (not video/channel).
Beispiel:
videosqueryZeichenketteErforderlichSearch query
regionZeichenketteOptional2 letter country code of the country to put the proxy in.
Beispiel:
USsortByZeichenketteOptionalOnly relevance|popular work. view_count, upload_date, and rating are NOT accepted (HTTP 400).
Beispiel:
relevancedurationZeichenketteOptionalDuration of the video. Only applies to videos (not shorts). One of: under_3_min | between_3_and_20_min | over_20_min.
Beispiel:
under_3_minuploadDateZeichenketteOptionalFilter by upload date. One of: today | this_week | this_month | this_year.
includeExtrasZeichenketteOptionalThis 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.*
Beispiel:
falsecontinuationTokenZeichenketteOptionalContinuation token to get more videos. Get 'continuationToken' from previous response.
Beispiel:
4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
curl -X GET 'https://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-search?sortBy=relevance' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-search?sortBy=relevance",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-search?sortBy=relevance", {
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());Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.00188/call einschließlich Servicegebühr abgerechnet.