querystringobrigatório
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.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
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.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
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"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
querystringobrigatórioThe video search query.
glstringTwo-letter country code for result localization (e.g. us, gb, de).
Padrão: "us"
hlstringTwo-letter interface and results language code (e.g. en, es, de).
Padrão: "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).
Valores possíveis: 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.
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
Google VideosEsta API Google | A partir de $0.00085 por chamada | JSON |
Google | $0.01 por chamada | JSON |
Google | $0.015 por chamada | JSON |
Google | A partir de $0.002 por chamada | JSON |
Google | A partir de $0.0015 por chamada | JSON |
Google | $0.01 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/google/videos com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
A partir de $0.00085 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: query (string). Opcionais: gl (string), hl (string), location (string), timeframe (um de 1h, 1d, 7d, 1y, all), autocorrect (boolean) e requireFields (array). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. Google Videos funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Google separadamente.