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

DataForSEO YouTube Search Results

Tài liệu API
https://api.sandbase.ai/v1/api/dataforseo/v3/serp/youtube/organic/live/advanced

YouTube search results for a keyword: videos, channels and playlists with titles, views, durations and upload dates.

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

Phòng thử nghiệm

Đầu vào
Search query.
Location code, e.g. 2840 for the United States.
Language code, e.g. "en".
Đầ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

DataForSEO YouTube Search Results API

Returns the YouTube search results page for a keyword, as a list of ranked items. Each item carries the channel that published it. You send a keyword, plus an optional location_code and language_code.

Use cases

  • Check which channels and videos rank on YouTube for a target keyword in a given country.
  • Track the rank of a competitor channel across a list of search terms.
  • Collect channel names, IDs and URLs for a niche to build an outreach list.
  • Compare results for the same keyword across different location_code and language_code values.

Request

curl -X POST "https://api.sandbase.ai/v1/api/dataforseo/v3/serp/youtube/organic/live/advanced" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "coffee", "location_code": 2840, "language_code": "en"}'

The result is returned in outputs[0].

Parameters

NameTypeRequiredDescription
keywordstringNoSearch query.
language_codestringNoLanguage code, e.g. "en".
location_codeintegerNoLocation code, e.g. 2840 for the United States.

Example response

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

{
  "status_code": 20000,
  "status_message": "Ok.",
  "tasks": [
    {
      "data": {
        "api": "serp",
        "device": "desktop",
        "function": "live",
        "keyword": "coffee",
        "language_code": "en",
        "location_code": 2840,
        "os": "windows",
        "se": "youtube"
      },
      "id": "11030829-1614-0139-0000-8c15c5d6ecc7",
      "path": [
        "v3"
      ],
      "result": [
        {
          "check_url": "https://www.youtube.com/results?search_query=coffee",
          "datetime": "2026-11-03 08:29:37 +00:00",
          "item_types": [
            "youtube_video"
          ],
          "items": [
            {
              "badges": null,
              "block_name": null,
              "block_rank": 2,
              "channel_id": "UCI4_-vEalUX3qB7DSQLbgUw",
              "channel_logo": "https://yt3.ggpht.com/ytc/AIdro_kGbzuHsf8CGdiFeKVM3TKi9r4JmymtqTsx0WMjsLQvZuItYd…",
              "channel_name": "LsLs",
              "channel_url": "https://www.youtube.com/@LsLs-r5h",
              "description": "We poured through the coffee aisle so you don't get shortchanged at the register…"
            }
          ],
          "items_count": 26,
          "keyword": "coffee",
          "language_code": "en",
          "location_code": 2840
        }
      ],
      "result_count": 1,
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "6.5972 sec."
    }
  ],
  "tasks_count": 1,
  "tasks_error": 0,
  "time": "6.6636 sec.",
  "version": "0.1.20261022"
}

Response fields

FieldMeaning
tasks[].result[].check_urlThe YouTube search URL that matches the query, so you can open the same results in a browser.
tasks[].result[].datetimeTime the results were collected, in the format 2026-11-03 08:29:37 +00:00.
tasks[].result[].item_typesList of item types found in the results. In this response it holds youtube_video.
tasks[].result[].items_countNumber of items in the result for this keyword.
tasks[].result[].items[].block_rankRank of the item's block on the results page, starting at 1.
tasks[].result[].items[].channel_idYouTube ID of the channel that published the item.
tasks[].result[].items[].channel_name / tasks[].result[].items[].channel_urlDisplay name of the channel and the link to its YouTube page.
tasks[].result[].items[].channel_logoURL of the channel's logo image.
tasks[].result[].items[].descriptionText snippet from the item. It is null when none is shown.
tasks[].data.device / tasks[].data.osDevice and operating system used for the search. In this response they are desktop and windows.

Notes

  • Use the location_code value 2840 for the United States and en for language_code.
  • The response keeps the original task structure, so read results from tasks[].result[], and the ranked entries from items[] inside each result.
  • Some fields, such as badges, block_name and description, can be null.
  • Each task has an id such as 11030829-1614-0139-0000-8c15c5d6ecc7, and tasks_error shows how many tasks failed.

Pricing

Billed at the actual cost of each call, about $0.002 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
DataForSEOTừ $0.002 mỗi lần gọiJSON
DataForSEOTừ $0.0102 mỗi lần gọiJSON
DataForSEOTừ $0.000724 mỗi lần gọiJSON
DataForSEO$0.004 mỗi lần gọiJSON
DataForSEOTừ $0.00162 mỗi lần gọiJSON
DataForSEOTừ $0.001105 mỗi lần gọiJSON

Câu hỏi

FAQ

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

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/dataforseo/v3/serp/youtube/organic/live/advanced 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 DataForSEO YouTube Search Results có giá bao nhiêu?

Từ $0.002 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 DataForSEO YouTube Search Results chấp nhận những tham số nào?

Không có tham số bắt buộc. Tùy chọn: keyword (string), location_code (integer) và language_code (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

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

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