本页有中文版。查看中文版

CORE API

YouTube comments API

comments on YouTube: 0.2 credits per successful call, with clear inputs, source data and billing.

01 / CORE API

One request

0.2 credits per successful or empty call. Failed calls cost 0.

Replace any PASTE_PUBLIC placeholder with a supported public identifier. This is a request template; it does not run automatically.

REQUEST TEMPLATE
curl --request POST 'https://api.socialtoai.com/v1/comments' \
  --header "X-API-Key: $SOCIALTOAI_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: REPLACE_WITH_A_UNIQUE_REQUEST_ID' \
  --data '{"platform":"youtube","url_or_id":"PASTE_PUBLIC_ITEM_URL_OR_ID"}'

02 / CORE API

Native support

Result shape: item. Pagination: returned opaque cursor.

Reply branches: supported. Include the cursor returned with the branch.

These values describe the reference card. Additional restrictions can apply to user discovery or a content subtype. Inspect applied_params and warnings instead of assuming an unsupported filter was honored.

03 / CORE API

A schema-checked example

Illustrative result with one invented value and an example trial balance. It shows the response shape; it is not a live response or a production availability measurement.

ILLUSTRATIVE JSON · NOT LIVE
{
  "request_id": "example_only_not_a_live_call",
  "schema_version": "v1",
  "fetched_at": "2026-09-05T00:00:00Z",
  "status": "ok",
  "applied_params": {},
  "warnings": [],
  "items": [
    {
      "kind": "item",
      "id": "EXAMPLE_ITEM_ID",
      "author": {
        "name": "example_author"
      },
      "published_at": "2026-09-01T08:30:00Z",
      "metrics": {
        "likes": 412,
        "comments": 96
      },
      "text": "Illustrative comment, not real content."
    }
  ],
  "platform": "youtube",
  "billing": {
    "cost": 0.2,
    "balance": 1.8,
    "unit": "credits",
    "pricing": "standard"
  }
}

04 / CORE API

Platform limitations

Content search returns videos; user search returns channels. Playlists and movies are excluded. User discovery supports relevance/all; unsupported content filters produce warnings.

Use an 11-character video ID or standard watch/shorts/youtu.be URL for items. Profiles and creator posts require a UC channel ID or /channel/ URL, not an @handle.

Replies require both reply_of and the cursor returned with that comment branch.

Trending currently supports Gaming only. Other categories are not claimed as available.

Count trims projected results. Encrypted cursors preserve remaining items and omit adjacent duplicates with warnings.

Frequently asked questions

What does this call cost?

0.2 credits for a successful or empty lookup. Failed calls cost 0 credits.

Can I paginate?

Use only the returned opaque cursor, preserving the platform and query. Check has_more and your remaining budget.

Are all platform features covered?

Content search returns videos; user search returns channels. Playlists and movies are excluded. User discovery supports relevance/all; unsupported content filters produce warnings. Use an 11-character video ID or standard watch/shorts/youtu.be URL for items. Profiles and creator posts require a UC channel ID or /channel/ URL, not an @handle. Replies require both reply_of and the cursor returned with that comment branch. Trending currently supports Gaming only. Other categories are not claimed as available. Count trims projected results. Encrypted cursors preserve remaining items and omit adjacent duplicates with warnings.

YOUR AI. A WIDER VIEW.

Start with one good question.

Get 2 free credits ↗

No card. Read-only public data. Explicit limits and transparent credits.