Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Google Videos

Tài liệu API
https://api.sandbase.ai/v1/api/google/videos

Search Google for video results (YouTube and others) with title, link, thumbnail, and source.

Giá
Từ $0.00085USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 6 tùy chọn

Phòng thử nghiệm

Đầu vào
The video search query.
Two-letter country code for result localization (e.g. us, gb, de).
Two-letter interface and results language code (e.g. en, es, de).
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.
Restrict results to a recent time window: 1h, 1d, 7d, 1y, or all. Default all (no time restriction).
Toggle Google spelling autocorrect (default true). Set false to search the exact query without correction.
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 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.
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

Google Videos API

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.

Use cases

  • Find YouTube videos that rank on Google for a keyword.
  • Track which videos appear first for a topic in a given country or language.
  • Collect video links and titles to build a content list for a topic.
  • Check how results change when you set timeframe to 7d or 1y.

Request

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.

Parameters

NameTypeRequiredDescription
querystringYesThe video search query.
autocorrectbooleanNoToggle Google spelling autocorrect (default true). Set false to search the exact query without correction.
glstringNoTwo-letter country code for result localization (e.g. us, gb, de).
hlstringNoTwo-letter interface and results language code (e.g. en, es, de).
locationstringNoFine-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.
requireFieldsarrayNoOptional; 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
timeframestringNoRestrict results to a recent time window: 1h, 1d, 7d, 1y, or all. Default all (no time restriction).

Example response

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
}

Response fields

FieldMeaning
data.queryThe search query that Google ran. It can differ from your input if autocorrect changed it.
data.results[].positionRank of the video in the result list, starting at 1.
data.results[].titleTitle of the video result.
data.results[].linkURL of the video page, such as a YouTube watch link.
data.results[].snippetText shown under the result. It can include the description start, the site name, the channel name, and a date.
data.results[].imageThumbnail of the video. It is either an empty string or an inline base64 data:image/jpeg value.
foundtrue when the search returned results.

Notes

  • The source field is not in this response. Pass requireFields: ["source"] if you need it. This can change the price.
  • The site and channel name appear inside snippet, after the description text.
  • Use gl, hl, and location to localize results. Use location for city-level targeting.
  • For image results on the same query, call Google Images.

Pricing

Billed at the actual cost of each call, about $0.00085 for the request above. Failed calls are not charged.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
GoogleTừ $0.00085 mỗi lần gọiJSON
Google$0.01 mỗi lần gọiJSON
Google$0.015 mỗi lần gọiJSON
GoogleTừ $0.002 mỗi lần gọiJSON
GoogleTừ $0.0015 mỗi lần gọiJSON
Google$0.01 mỗi lần gọiJSON

Hướng dẫn:Best Google API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Google Videos?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/google/videos với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Google Videos có giá bao nhiêu?

Từ $0.00085 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Google Videos chấp nhận những tham số nào?

Bắt buộc: query (string). Tùy chọn: gl (string), hl (string), location (string), timeframe (một trong số 1h, 1d, 7d, 1y, all), autocorrect (boolean) và requireFields (array). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Google Videos trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Google không?

Không. Google Videos chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Google.