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

YouTube Search Suggestions

Tài liệu API
https://api.sandbase.ai/v1/api/youtube/web-v2/search-suggestions

Returns YouTube autocomplete search suggestions for a given keyword query. Supports optional geographic region and language filtering.

Giá
$0.001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 2 tùy chọn
100 lượt gọi miễn phí / ngày100 lượt gọi đầu tiên mỗi ngày miễn phí (chia sẻ theo tổ chức) · Đặt lại lúc 00:00 UTC. Sau đó tính phí theo mỗi lượt gọi.

Phòng thử nghiệm

Đầu vào
Search keyword (required)
Language code (optional, default en)
Region code (optional, default US)
Đầu raVí dụ
Phản hồioutputs · 233 B · 14 dòng
[
  {
    "data": {
      "keyword": "OpenAI",
      "suggestions": [
        "openai",
        "openai dots",
        "openai hugging face",
        "… 11 more items in the full response"
      ],
      "total_count": 14
    }
  }
]

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

YouTube Search Suggestions API

Returns YouTube autocomplete suggestions for a search keyword. You send a keyword and can set region and language to localize the results.

Use cases

  • Fill a search box in your own app with the same suggestions YouTube shows for a partial or full query.
  • Find phrases people type after a brand or topic name, such as OpenAI, to plan video titles.
  • Compare suggestions for the same keyword across different region and language values to see how searches differ by market.
  • Build a keyword list for content research by running a seed term and collecting the returned phrases.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/search-suggestions" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "OpenAI"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
keywordstringYesSearch keyword (required)
languagestringNoLanguage code (optional, default en)
regionstringNoRegion code (optional, default US)

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "keyword": "OpenAI",
  "suggestions": [
    "openai"
  ],
  "total_count": 14
}

Response fields

FieldMeaning
keywordThe search term the suggestions were requested for. It matches the keyword you sent.
suggestions[]List of autocomplete phrases, as plain strings. The first item in the example is the keyword itself in lowercase, followed by longer phrases that start with it.
total_countNumber of suggestions reported for the query. In the example it is 14, while the list is trimmed to a few items.

Notes

  • keyword is required and can be up to 200 characters. region defaults to US and language defaults to en.
  • Suggestions are returned as plain text strings with no IDs or URLs. To get videos for a suggestion, pass it to YouTube General Search (Web V2, V2).
  • To find channels for a suggestion, use YouTube Channel Search.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
YouTube$0.001 mỗi lần gọiJSON
YouTube$0.001 mỗi lần gọiJSON
YouTube$0.001 mỗi lần gọiJSON
YouTube$0.001 mỗi lần gọiJSON
YouTube$0.001 mỗi lần gọiJSON
YouTube$0.001 mỗi lần gọiJSON

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

Câu hỏi

FAQ

Làm thế nào để dùng API YouTube Search Suggestions?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/youtube/web-v2/search-suggestions 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 YouTube Search Suggestions có giá bao nhiêu?

$0.001 mỗi lần gọi. Mỗi tổ chức được 100 lần gọi miễn phí mỗi ngày UTC, dùng chung cho các API SandBase đủ điều kiện, bao gồm API này; sau đó mỗi lần gọi sẽ được tính theo mức giá này từ số dư SandBase của bạn. Không có gói đăng ký.

API YouTube Search Suggestions chấp nhận những tham số nào?

Bắt buộc: keyword (string). Tùy chọn: language (string) và region (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API YouTube Search Suggestions 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 YouTube không?

Không. YouTube Search Suggestions 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 YouTube.