querystringobbligatorio
The keyword to search Shorts for.
https://api.sandbase.ai/v1/api/youtube/search-shortsSearch YouTube Shorts by keyword and get matching Shorts (title, views, URL) with cursor pagination as normalized JSON.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Returns YouTube Shorts that match a keyword. Each result has an ID, title, URL and view count. You only need a query, and you can sort, filter by upload date and page through results.
sortBy to popular.uploadDate to today or this_week.curl -X POST "https://api.sandbase.ai/v1/api/youtube/search-shorts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "cats"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The keyword to search Shorts for. |
cursor | string | No | Continuation token from a previous response for pagination. |
sortBy | string | No | Sort order: "relevance" (default) or "popular" (most-viewed). |
uploadDate | string | No | Filter by upload recency. Omit for any time. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"nextCursor": "cur_fPTLy4Ok3x74uh2aBTeYXQ",
"shorts": [
{
"contentType": "short",
"id": "M93h41hyPsM",
"title": "Ranking Funny Cat Moment",
"url": "https://www.youtube.com/watch?v=M93h41hyPsM",
"views": 17000000,
"viewsAvailable": true
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.shorts[] | List of Shorts that match the query. |
data.shorts[].id | YouTube video ID of the Short. |
data.shorts[].title | Title of the Short. It can include hashtags and emoji. |
data.shorts[].url | Watch URL for the Short, in the form https://www.youtube.com/watch?v=<id>. |
data.shorts[].views | View count as a number. |
data.shorts[].viewsAvailable | true when a view count was found for the Short. Check it before you use views. |
data.shorts[].contentType | Type of the result. The value is short for these results. |
data.nextCursor | Token for the next page of results. Send it as cursor in the next request. |
found | true when the search returned results. |
cursor with the value of data.nextCursor.id value with YouTube Video Details to get more data about a single Short.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/search-shorts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "cats",
"sortBy": "relevance"
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
querystringobbligatorioThe keyword to search Shorts for.
cursorstringContinuation token from a previous response for pagination.
sortBystringSort order: "relevance" (default) or "popular" (most-viewed).
Predefinito: "relevance"
Valori possibili: relevance, popular
uploadDatestringFilter by upload recency. Omit for any time.
Valori possibili: today, this_week, this_month, this_year
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
YouTube Shorts SearchQuesta API YouTube | Da $0.0012 per chiamata | JSON |
YouTube | Da $0.00045 per chiamata | JSON |
YouTube | Da $0.0012 per chiamata | JSON |
YouTube | Da $0.0012 per chiamata | JSON |
YouTube | Da $0.0012 per chiamata | JSON |
YouTube | $0.014286 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/youtube/search-shorts con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
A partire da $0.0012 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: query (string). Facoltativi: cursor (string), sortBy (uno tra relevance, popular) e uploadDate (uno tra today, this_week, this_month, this_year). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. YouTube Shorts Search funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API YouTube.