querystringobbligatorio
The video search query.
https://api.sandbase.ai/v1/api/google/videosSearch Google for video results (YouTube and others) with title, link, thumbnail, and source.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Returns Google video search results for a text query. Each result has a title, link, position, snippet, and thumbnail image. The only required input is query.
timeframe to 7d or 1y.curl -X POST "https://api.sandbase.ai/v1/api/google/videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"gl": "us", "hl": "en", "query": "lofi hip hop"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The video search query. |
autocorrect | boolean | No | Toggle Google spelling autocorrect (default true). Set false to search the exact query without correction. |
gl | string | No | Two-letter country code for result localization (e.g. us, gb, de). |
hl | string | No | Two-letter interface and results language code (e.g. en, es, de). |
location | string | No | Fine-grained location for result localization, given as a canonical Google location string (e.g. 'New York, United States', 'London, United Kingdom'). More specific than the country-level gl. |
requireFields | array | No | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example source, and it is served only by a source that returns every one of |
timeframe | string | No | Restrict results to a recent time window: 1h, 1d, 7d, 1y, or all. Default all (no time restriction). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"query": "lofi hip hop",
"results": [
{
"image": "",
"link": "https://www.youtube.com/watch?v=rFZHOHl-L8A",
"position": 1,
"snippet": "Spooky season is officially upon us 2026 Halloween playlist available now: https…",
"title": "lofi hip hop radio beats to relax/study to"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.query | The search query that Google ran. It can differ from your input if autocorrect changed it. |
data.results[].position | Rank of the video in the result list, starting at 1. |
data.results[].title | Title of the video result. |
data.results[].link | URL of the video page, such as a YouTube watch link. |
data.results[].snippet | Text shown under the result. It can include the description start, the site name, the channel name, and a date. |
data.results[].image | Thumbnail of the video. It is either an empty string or an inline base64 data:image/jpeg value. |
found | true when the search returned results. |
source field is not in this response. Pass requireFields: ["source"] if you need it. This can change the price.snippet, after the description text.gl, hl, and location to localize results. Use location for city-level targeting.Billed at the actual cost of each call, about $0.00085 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/google/videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"gl": "us",
"hl": "en",
"query": "lofi hip hop"
}'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 video search query.
glstringTwo-letter country code for result localization (e.g. us, gb, de).
Predefinito: "us"
hlstringTwo-letter interface and results language code (e.g. en, es, de).
Predefinito: "en"
locationstringFine-grained location for result localization, given as a canonical Google location string (e.g. 'New York, United States', 'London, United Kingdom'). More specific than the country-level gl.
timeframestringRestrict results to a recent time window: 1h, 1d, 7d, 1y, or all. Default all (no time restriction).
Valori possibili: 1h, 1d, 7d, 1y, all
autocorrectbooleanToggle Google spelling autocorrect (default true). Set false to search the exact query without correction.
requireFieldsarrayOptional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `source`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a record that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
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 |
|---|---|---|
Google VideosQuesta API Google | Da $0.00085 per chiamata | JSON |
Google | $0.01 per chiamata | JSON |
Google | $0.015 per chiamata | JSON |
Google | Da $0.002 per chiamata | JSON |
Google | Da $0.0015 per chiamata | JSON |
Google | $0.01 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/google/videos 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.00085 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: query (string). Facoltativi: gl (string), hl (string), location (string), timeframe (uno tra 1h, 1d, 7d, 1y, all), autocorrect (boolean) e requireFields (array). 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. Google Videos 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 Google.