semust logo

API Platform

YouTube API

YouTube search rankings, full video details, transcripts in any language with translation, and comments — for any video, without quotas.

YouTube search rankings as a real viewer sees them, full video details, transcripts (with translation) and comments for any public video. One endpoint serves four reports, selected with the type parameter. There are no daily quotas, and transcripts work for any video, not only your own.

Authentication

HeaderTypeDescription
SEMUST-API-USERstringYour API user's username
SEMUST-API-PASSWORDstringYour API user's password
Accept-LanguagestringOptional. Send tr to receive error messages in Turkish

Create API credentials from the API Access page.

SEMUST-API-USER: your_username
SEMUST-API-PASSWORD: your_password
Content-Type: application/json

Report Types

typeReturnsPrice
search (default)YouTube results for a keyword, in ranking order: videos, Shorts, playlists, channels and ads$0.0022 per started block of 20 results
videoOne video's details: views, likes, comments, channel and subscribers, publish date, duration, category, tags, and which transcripts it has$0.0066
transcriptOne video's transcript as plain text plus timed segments, optionally translated$0.0066
commentsA video's top comments with author, likes and reply counts$0.0022 per started block of 20 comments
{
  "type": "search",
  "keyword": "seo nedir",
  "limit": 20
}

Request Parameters

A parameter that does not apply to the chosen type is rejected rather than ignored, and a misspelled one is named in the error with a suggestion. A JSON null is treated as "not sent".

Body

typestringdefault: search

search, video, transcript or comments.

keywordstring

search only, required. Up to 200 characters.

video_idstring

video, transcript and comments, required. The 11-character ID (CnQmoQD4xRM) or any YouTube URL: watch?v=, youtu.be/, shorts/, embed/ or live/.

countrystringdefault: TR

Two-letter country code: where the search is run from, and the region a video is read in. See Markets below.

languagestring

search only. Interface language of the search. Defaults to tr for TR and en elsewhere.

devicestringdefault: desktop

search only. desktop or mobile.

limitintegerdefault: 20

search and comments. Results to return, 1–200. Billed per started block of 20, so 20 and 40 are the economical sizes.

transcript_languagestring

transcript only. Which transcript to read, e.g. tr or en-GB. Defaults to tr for TR and en elsewhere. type: "video" lists the transcripts a video has.

translate_tostring

transcript only. Translate the transcript into this language, e.g. en.

idempotency_keystring

Optional, up to 128 characters. Repeating a request with the same key within 24 hours returns the stored response at no charge.

GET /v1/youtube/markets lists every supported country and search language. It is free.

curl -X POST https://data.semust.com/v1/youtube \
  -H "SEMUST-API-USER: your_username" \
  -H "SEMUST-API-PASSWORD: your_password" \
  -H "Content-Type: application/json" \
  -d '{"type": "transcript", "video_id": "https://youtu.be/CnQmoQD4xRM"}'

Response

search and comments return rows in items; video and transcript return one data object. A value that does not exist or does not apply is null, never 0 — a playlist has "views": null.

URLs are canonical (https://www.youtube.com/watch?v=…, without tracking parameters) and dates are ISO 8601 in UTC. In search results published_at is approximate, because YouTube shows relative dates there ("5 years ago"); type: "video" gives the exact date. For search, total is the result count YouTube reports.

The examples below are real responses.

{
  "success": true,
  "type": "search",
  "keyword": "seo nedir",
  "country": "TR",
  "language": "tr",
  "device": "desktop",
  "total": 628065,
  "count": 2,
  "limit": 2,
  "items": [
    {
      "position": 1,
      "type": "video",
      "title": "SEO Nedir? | Webtures",
      "url": "https://www.youtube.com/watch?v=CnQmoQD4xRM",
      "video_id": "CnQmoQD4xRM",
      "channel_name": "Webtures",
      "channel_url": "https://www.youtube.com/@Webturescom",
      "views": 241552,
      "video_count": null,
      "published_at": "2021-11-05T21:17:53Z",
      "duration_seconds": 180,
      "is_live": false
    },
    {
      "position": 2,
      "type": "playlist",
      "title": "SEO Eğitimi Serisi - 2024 - Sıfırdan Uzmanlığa",
      "url": "https://www.youtube.com/playlist?list=PLaqVtetWSaGhlXiU48bDd8511btrbx6T2",
      "video_id": null,
      "channel_name": "Mehmet Ali Yassı",
      "channel_url": "https://www.youtube.com/@maliyassi",
      "views": null,
      "video_count": 20,
      "published_at": null,
      "duration_seconds": null,
      "is_live": null
    }
  ],
  "cost": 0.0022,
  "cached": false,
  "request_id": "0b7e6f1a-3c2d-4e5f-9a8b-1c2d3e4f5a6b"
}

Response Fields Reference

search row

FieldTypeDescription
positionintegerRank on the results page
typestringvideo, short, playlist, channel or ad
title, urlstringTitle and canonical link
video_idstring | nullFor videos, Shorts and ads
channel_name, channel_urlstring | nullThe channel
viewsinteger | nullView count (videos)
video_countinteger | nullVideos in the playlist or channel
published_atstring | nullApproximate publish time, ISO 8601
duration_secondsinteger | nullLength (videos)
is_liveboolean | nullLive stream (videos)

video → data

video_id, title, url, description, channel_name, channel_url, channel_subscribers, views, likes, comments, published_at (exact), duration_seconds, category, tags (the uploader's tags), is_live, and transcripts — each {language, auto_generated}; pass a language as transcript_language.

transcript → data

FieldTypeDescription
languagestring | nullLanguage of the transcript read
translated_tostring | nullTarget language when translate_to was sent
textstringThe whole transcript as one string
segmentsarray{start, end, text}, times in seconds

comments row

author, author_url, text, likes, replies, published_at. total in the envelope is the video's comment count.

Errors

Every error carries a stable code, a readable error, and retryable; where it helps also field, hint and allowed. Send Accept-Language: tr for Turkish messages. You are never charged for an error. The full list, shared with the other APIs, is on Error Codes. Specific to this endpoint:

StatusCodeMeaningWhat to do
400KEYWORD_REQUIREDtype: "search" without a keywordSend keyword
400VIDEO_ID_REQUIREDA video report without video_idSend the ID or URL
400INVALID_VIDEO_IDNot an 11-character ID or a YouTube video URLCopy the ID from the video's address
400UNSUPPORTED_MARKETUnknown country or search languageGET /v1/youtube/markets
404VIDEO_NOT_FOUNDNo such video, or it is private, removed or blocked in that countryCheck the ID
404TRANSCRIPT_NOT_FOUNDThe video has no transcript in that languagetype: "video" lists the languages it has
400INVALID_PARAMETERe.g. a translate_to language YouTube cannot translate into; field names itUse another language
{
  "error": "This video has no transcript in the requested language",
  "code": "TRANSCRIPT_NOT_FOUND",
  "hint": "type=video lists the transcript languages a video has. You were not charged",
  "retryable": false,
  "request_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}

Credits & Limits

RequestCost
search or comments, up to 20 results$0.0022
search or comments, 21–40 results$0.0044
search, 200 results (maximum)$0.022
video$0.0066
transcript$0.0066

The balance hold is the cost of limit; anything not used is refunded immediately. A search or comment list with no results is a valid answer, billed at one block.

Results are cached — search, video details and comments for 24 hours, transcripts for 30 days. A cached answer is marked "cached": true and billed at the same price as a live one.

Per-minute and per-day limits are set on your account (429 RATE_LIMIT_EXCEEDED). At most 10 requests per API user run at the same time; more get 429 TOO_MANY_CONCURRENT_REQUESTS with Retry-After.

Last updated: 2026-11-06