YouTube Channel Courses API
Query public YouTube channel courses. Returns items, next_cursor and hasMore. Empty results and failures are free.
Query public YouTube channel courses. Returns items, next_cursor and hasMore. Empty results and failures are free.
Open product page and API TesterEndpoint and authentication
POST https://api.goanyapi.com/api/v1/youtube/channel/coursesSynchronous 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[].videoCountText | 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[].publishedTimeText | 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/courses' -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": "course",
"id": "PLxVm5249zXQaqzl7MW7Gx0Y3d_AzLP8mi",
"title": "谷歌分析全教程",
"url": "https://www.youtube.com/playlist?list=PLxVm5249zXQaqzl7MW7Gx0Y3d_AzLP8mi",
"thumbnailUrl": "https://i.ytimg.com/vi/2dnOEFVHMI0/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDQZ7cf6lsByXT1SwDzxUD3aYL9zA",
"videoCountText": "7 videos"
}
]
}
}
}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 |