Litescrape sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.litescrape.com/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

← All documentation

// YouTube documentation

YouTube Channel API

Read a YouTube channel profile and its videos, Shorts, live streams, podcasts, playlists or posts. Search within the channel, choose a sort order and continue through pages.

GET / POST https://api.litescrape.com/api/youtube/channel

// from request to code

Integrate YouTube Channel

Build your request and copy it into your stack. Or let your coding agent set it up.

APIYouTube Channel
More options 7
Channel
Content

Choose a tab and its sort order, or search within the channel.

Localization
Pagination

Your request updates the code instantly.

Open the Playground →

Set LITESCRAPE_API_KEY on your server, then run this request.

request.sh
curl --fail-with-body --get 'https://api.litescrape.com/api/youtube/channel' \
  --header "Authorization: Bearer $LITESCRAPE_API_KEY" \
  --data-urlencode 'channel_id=veritasium' \
  --data-urlencode 'tab=videos'

JSON POST request example

POST to https://api.litescrape.com/api/youtube/channel with Content-Type: application/json and your Authorization: Bearer header.

POST · application/json
{
  "channel_id": "veritasium",
  "tab": "videos"
}

Fetch the next page

Read pagination.next_page_token and send it as next_page_token by itself, using the same Authorization header. It preserves the channel, selected tab or search, sorting and locale. Stop when no next token is returned.

Next page POST body
{
  "next_page_token": "<pagination.next_page_token>"
}
  • Send next_page_token alone. The token preserves the channel, selected tab or search, sorting and locale. Use POST for long tokens. Stop when pagination.next_page_token is absent.
  • Minimum characters: 1
  • Maximum characters: 32768
  • Pattern: ^ct2_[A-Za-z0-9_-]{100,}$

// request reference

YouTube Channel parameters

Send query parameters with GET /api/youtube/channel. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.

POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the v3 OpenAPI contract.

Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.

Channel

channel_id
Channel handle or IDOptional

Channel handle (with or without @) or a UC channel ID. Required on the first page; omit with next_page_token.

Type string · GET query or POST JSON

Example / input hint: veritasium

  • Required on the first page. Use a handle such as @veritasium or a UC channel ID; full URLs are not accepted.
  • Minimum characters: 1
  • Maximum characters: 100
search_query
Search within channelOptional

Search within this channel for matching videos and playlists. Cannot be combined with tab or sort. Omit with next_page_token.

Type string · GET query or POST JSON

Example / input hint: physics

  • Omit tab and sort when searching. Matching videos and playlists appear in search_results.
  • Minimum characters: 1
  • Maximum characters: 2048

Content

Choose a tab and its sort order, or search within the channel.

tab
Content tabOptional

Channel content tab. Defaults to videos. Omit when using search_query or next_page_token. Not every channel offers every tab.

Type string · GET query or POST JSON

Accepted valuesvideosshortsstreamspodcastsplaylistsposts
  • A channel without the requested tab returns an empty content group with search_information.tab_available set to false.
sort
Sort orderOptional

videos, shorts and streams accept latest, popular or oldest; playlists accept dd (newest playlist) or lad (last video added). Omit with podcasts, posts, search_query or next_page_token.

Type string · GET query or POST JSON

Accepted valueslatestpopularoldestddlad
  • Videos, Shorts and streams default to latest. Playlists default to dd. Sorting uses the choices offered by YouTube.
about
Include channel detailsOptional

Include additional public channel details, such as country, join date, total views and links. Defaults to false. Omit with next_page_token.

Type boolean · GET query or POST JSON

Accepted valuestruefalse
  • Channel profile data is returned on the first page. about=true includes additional public details. Continuation pages return content only.

Localization

hl
LanguageOptional

Interface language, such as en or pt-BR. Defaults to en. Omit with next_page_token.

Type string · GET query or POST JSON

Example / input hint: en

  • Pattern: ^[a-zA-Z]{2,3}(?:-[a-zA-Z0-9]{2,8}){0,2}$
gl
CountryOptional

Two-letter country code. Defaults to US. Omit with next_page_token.

Type string · GET query or POST JSON

Example / input hint: US

  • Pattern: ^[A-Za-z]{2}$

Pagination

next_page_token
Next page tokenOptional

Opaque pagination.next_page_token from this endpoint. Send it alone to continue the channel feed with its original settings. Tokens expire after one hour.

Type string · GET query or POST JSON

  • Send next_page_token alone. The token preserves the channel, selected tab or search, sorting and locale. Use POST for long tokens. Stop when pagination.next_page_token is absent.
  • Minimum characters: 1
  • Maximum characters: 32768
  • Pattern: ^ct2_[A-Za-z0-9_-]{100,}$

// response

Work with the complete JSON response

Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.

Response groups include search_metadata, search_parameters, search_information, channel_results, videos_results, shorts_results, streams_results, podcasts_results, playlists_results, posts_results, search_results, filters, pagination, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.

channel_results contains the profile on the first page. The selected tab returns one content group: videos_results, shorts_results, streams_results, podcasts_results, playlists_results or posts_results. Channel searches use search_results.

Set about=true on the first request to include additional public channel details. Continuation pages return content without fetching the profile again. A missing tab returns an empty group and search_information.tab_available=false.

Counts and dates retain YouTube's display text. Numeric counts are included when English display text can be interpreted unambiguously. Optional fields depend on what the channel makes public.

The Python and TypeScript examples use HTTP clients. Check the HTTP status before reading the JSON response.

Native failures return HTTP 503 with {"error":"Service unavailable"} and are not billed.

Illustrative success response. Result groups and optional fields depend on upstream content.

200 · application/json
{
  "search_metadata": {
    "id": "example-youtube-channel",
    "status": "Success",
    "created_at": "2026-10-09T00:00:00+00:00",
    "processed_at": "2026-10-09T00:00:01+00:00",
    "youtube_channel_url": "https://www.youtube.com/@veritasium/videos?hl=en&gl=US",
    "total_time_taken": 1
  },
  "search_parameters": {
    "channel_id": "veritasium",
    "tab": "videos",
    "hl": "en",
    "gl": "US"
  },
  "search_information": {
    "results_count": 1,
    "page": 1,
    "tab": "videos",
    "tab_available": true
  },
  "channel_results": {
    "title": "Veritasium",
    "channel_id": "UCHnyfMqiRRG1u-2MsSQLbXA",
    "link": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA",
    "handle": "@veritasium",
    "rss_link": "https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA",
    "description": "An element of truth - videos about science, education, and anything else we find interesting.",
    "keywords": "\"science videos\" science \"science education\" \"science literacy\" veritasium misconceptions physics education astronomy chemistry biology teaching learning math",
    "thumbnail": "https://yt3.googleusercontent.com/7vCbvtCqtjQ3YLgsJt7Y952MQV1sBvhllSCSxHP8_sVZdcPCBrITfhkN2RdyCuwPnsByq-1GoA=s900-c-k-c0x00ffffff-no-rj",
    "thumbnails": [
      {
        "url": "https://yt3.googleusercontent.com/7vCbvtCqtjQ3YLgsJt7Y952MQV1sBvhllSCSxHP8_sVZdcPCBrITfhkN2RdyCuwPnsByq-1GoA=s900-c-k-c0x00ffffff-no-rj",
        "width": 900,
        "height": 900
      }
    ],
    "banner": "https://yt3.googleusercontent.com/sDCGwJYqtOxT-odxPiErdlwfq3jlzXh0TsYFXtSSD6rld0Be51ZUNcoE17di2u1OiCjQunbcqA=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
    "verified": true,
    "subscribers_text": "21.3M subscribers",
    "subscribers": 21300000,
    "videos_text": "539 videos",
    "video_count": 539
  },
  "videos_results": [
    {
      "position": 1,
      "video_id": "ONAuUyml0yI",
      "title": "We're trying something new...",
      "link": "https://www.youtube.com/watch?v=ONAuUyml0yI",
      "thumbnail": "https://i.ytimg.com/vi/ONAuUyml0yI/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg%3D%3D&rs=AOn4CLCcdxxWzBr1Y2HQgBBsE-7U-LD7pw",
      "published_date": "9d ago",
      "views": "1.2M",
      "metadata": [
        "1.2M",
        "9d ago"
      ],
      "thumbnails": [
        {
          "url": "https://i.ytimg.com/vi/ONAuUyml0yI/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg%3D%3D&rs=AOn4CLCcdxxWzBr1Y2HQgBBsE-7U-LD7pw",
          "width": 480,
          "height": 270
        }
      ],
      "extracted_views": 1200000
    }
  ],
  "filters": [
    {
      "value": "latest",
      "title": "Latest",
      "selected": true
    },
    {
      "value": "popular",
      "title": "Popular",
      "selected": false
    },
    {
      "value": "oldest",
      "title": "Oldest",
      "selected": false
    }
  ],
  "pagination": {
    "next_page_token": "<opaque next-page token>"
  },
  "submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token"
}

More YouTube APIs