API Documentation

YouTube Channel Live API

Query public YouTube channel live. Returns items, next_cursor and hasMore. Empty results and failures are free.

Test API

Query public YouTube channel live. Returns items, next_cursor and hasMore. Empty results and failures are free.

Open product page and API Tester

Endpoint and authentication

POST https://api.goanyapi.com/api/v1/youtube/channel/live

Synchronous response, without tasks or polling. Use an API Key or supported OAuth Bearer credential. No Path or Query parameters.

Input parameters

Parameter Location Type Required Default Constraints and meaning
Authorization Header string Yes — Bearer YOUR_API_KEY
Content-Type Header string Yes application/json application/json
url JSON body string Yes — YouTube channel HTTPS URL, @handle or UC-prefixed channel ID. No prerequisite lookup or separate charge. pattern: ^(?:@[^\s/?#]+|UC[A-Za-z0-9_-]{22}|https://(?:www.|m.)?youtube.com/(?:@[^\s/?#]+|channel/UC[A-Za-z0-9_-]{22}|(?:c|user)/[^\s/?#]+)/?(?:[?#][^\s]*)?)$ minLength: 1
cursor JSON body string No — Omit initially. Pass data.result.next_cursor from this same endpoint unchanged. Stop when hasMore is false or the cursor is missing, empty or unchanged. maxLength: 16000

Lists expose business items only; raw response and item data are not public fields. Items may include channel/channelId, description and subscriberCountText; comments may include author (string), authorChannelId, publishedTimeText, likeCountText and reply_cursor. Optional fields may be null, empty or absent. Legacy saved responses may use author objects, channel objects, publishedTime or likeCount; do not require those legacy fields in new results.

Output fields

Field Type Meaning
code string ok on success; public error code on failure
message string Status message
data.result object / null Public result; null, empty and absent values are preserved
data.creditsUsed integer Actual configured charge; zero for empty results
data.remainingCredits number Balance after settlement
data.result.next_cursor null Next-page cursor; pass unchanged as cursor
data.result.hasMore boolean More results may exist; a usable different next_cursor is also required
data.result.items array Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].type string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].id string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].title string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].url string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].thumbnailUrl string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].viewCountText string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].publishedTimeText string / null Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].durationText string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].channel string / object / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].channelId string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].description string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].subscriberCountText string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].author string / object / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].authorChannelId string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].likeCountText string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].videoId string / null May appear for the corresponding item type; preserved as returned, not guaranteed.

Channel lists return items, next_cursor and hasMore. Course items use type course; playlists use type playlist. If a channel does not provide the requested content tab, the request returns HTTP 502 / request_failed without a charge; this differs from an HTTP 200 empty list.

List length is the current page count, not a total. Page size is not fixed. Continue only when hasMore is true and next_cursor is nonempty and differs from the current cursor. Reply queries start with reply_cursor and continue with next_cursor.

Request example

curl -X POST 'https://api.goanyapi.com/api/v1/youtube/channel/live' -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' --data '{"url":"https://www.youtube.com/@daojie"}'

Real response example

This real sample was captured with an earlier response version and may contain legacy field names. It has not been recaptured or rewritten for this update.

Captured from a real request. Only live data.creditsUsed and data.remainingCredits are omitted. Media and caption URLs may have expired.

{
  "code": "ok",
  "message": "ok",
  "data": {
    "result": {
      "next_cursor": null,
      "hasMore": false,
      "items": [
        {
          "type": "video",
          "id": "OyIboNAxNKA",
          "title": "网络创业起步心法(2025年必知)",
          "url": "https://www.youtube.com/watch?v=OyIboNAxNKA",
          "thumbnailUrl": "https://i.ytimg.com/vi/OyIboNAxNKA/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCns5EkPWJmtF8l1o11cWnRyXXonw",
          "viewCountText": "6.6K",
          "publishedTimeText": "Streamed 4y ago",
          "durationText": "34:27"
        },
        {
          "type": "video",
          "id": "qtadoCfGQLk",
          "title": "元宇宙与加密货币:机会与挑战刀姐首次直播,新年特别节目!",
          "url": "https://www.youtube.com/watch?v=qtadoCfGQLk",
          "thumbnailUrl": "https://i.ytimg.com/vi/qtadoCfGQLk/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDczQvhgyAlnP1vsjOv8G0L4AEsxQ",
          "viewCountText": "1K",
          "publishedTimeText": "Streamed 4y ago",
          "durationText": "14:19"
        }
      ]
    }
  }
}

Billing and status codes

…

Each endpoint uses its own database-configured price. Only nonempty successful results are charged; empty results and failures are free. Pages are billed separately. Missing optional titles or descriptions do not invalidate a record. Media results are empty when both video and captions are empty.

HTTP Meaning
200 Query completed; may be empty
400 Invalid JSON or parameters
401 Authentication failed
402 Insufficient credits
429 Rate limited; honor Retry-After
502 Data request failed
503 API or pricing not configured