Posts
List YouTube videos: a channel's uploads, a search, a hashtag, related videos, or the trending charts.
GET | POST /v1/youtube/postsSend parameters as a query string with GET, or as a JSON body with POST. Both are equivalent.
What to Pass
| Pass | Reads | Notes |
|---|---|---|
username or userId | A channel's uploads | type: videos (default), shorts, live, community |
query | A video search | type: videos (default) or shorts |
hashtag | Videos under a hashtag | |
relatedTo | The videos YouTube recommends beside one | |
| nothing | The trending charts | country (default US); 2 units |
Pass one source per call. Every identifier also takes the page URL.
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
country | string | Default feed only: the country whose trending feed to read (ISO alpha-2, default US). | |
cursor | string | Opaque cursor from the previous page's cursor. Pass it alone for the next page. | |
hashtag | string | Videos under a hashtag, with or without #. | |
query | string | Search videos by keyword. | |
relatedTo | string | A video id or URL; returns the videos YouTube recommends beside it. | |
type | enum | username/userId: which channel tab — videos (default), shorts, live or community · query: videos (default) or shorts. videos shorts live community | |
userId | string | Channel id (UC…). | |
username | string | Channel @handle (with or without @), or the channel URL (/@handle, /channel/UC…, /c/…, /user/…). |
Request
curl "https://gateway.apinoa.com/v1/youtube/posts?username=%40mkbhd&type=shorts" \
-H "x-api-key: $APINOA_API_KEY"Response
Returns Page of Post in data. A real response, shortened: arrays keep their first entries and long text is cut.
{
"success": true,
"data": {
"platform": "youtube",
"items": [
{
"platform": "youtube",
"id": "_4ELeWAgMwo",
"url": "https://www.youtube.com/watch?v=_4ELeWAgMwo",
"author": {
"platform": "youtube",
"id": "UCBJycsmduvYEL83R_U4JriQ",
"handle": "mkbhd",
"displayName": "Marques Brownlee",
"url": "https://www.youtube.com/channel/UCBJycsmduvYEL83R_U4JriQ",
"avatarUrl": "https://yt3.googleusercontent.com/qu4TmIaYUlS41-dJ9gZ7DUR3nilvmB5_11i6OKSdvNnBNiyOusZP1bMN6ICnuxtjFBb6ioKgRQ=s900-c-k-c…"
},
"title": "ASMR iPhone Duo Unboxing",
"media": [
{
"type": "video",
"url": "https://www.youtube.com/watch?v=_4ELeWAgMwo",
"thumbnailUrl": "https://i.ytimg.com/vi/_4ELeWAgMwo/oar3.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLDEzqDprq0dEj0…"
}
],
"metrics": {
"views": 2100000
},
"ext": {
"isShort": true
}
}
],
"cursor": "4PUpJI-hNYFf8QYTuifBDYgNyLZERTjzoZKnbWwvxtxd6TFzjKx55Gw3YS9-IN4MUE1IAmpHzO19I7UGyZlIYr_d0r7eOHkiDMA6R0H8z6gujuSriodxpkF…"
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_CURSOR | The cursor is not one this operation returned. Start again without it. |
| 400 | INVALID_PARAMS | A parameter is missing, unknown or out of range. The message names it. |
| 401 | UNAUTHORIZED | The x-api-key header is missing, or the key is revoked or unknown. |
| 402 | INSUFFICIENT_BALANCE | The balance does not cover this call. Top up in the dashboard. |
| 404 | NOT_FOUND | The account, post or group does not exist, or is private, deleted or age-restricted. |
| 429 | MARKETPLACE_SATURATED | Too many concurrent calls. Retry after the Retry-After seconds. |
| 502 | UPSTREAM_ERROR | The platform answered with something unusable. Retry with backoff. |
Every code is listed in Errors. Failed calls are not billed.
Pricing
Price $0.001 per call, plus $0.001 for each extra call it makes — at most 1 more, so $0.002 in total. List price; the rate steps down above 1,000 calls a day.