POST

API health

24h health
Normal
  • Healthy / normal
  • Available
Normal

Last 24 hours

Last 30 days

Search YouTube Shorts across the whole site by keyword, with optional sort and date_range. Each Short has title, channel, view count, the time YouTube shows and is_backfill for related Shorts YouTube adds when matches run short. About 50 per page and the count varies; pass next_page_token back as page_token for more.

Send POST https://api.everyinfra.com/api/v1/social with platform set to youtube and action set to shorts_search. Price $0.79 per 1,000 requests ($0.000792 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

#
Please help me write a data collection script with the EveryInfra YouTube Shorts search endpoint (youtube/shorts_search).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to youtube and action to shorts_search, and put the parameters inside params.
- Required parameters:
  - keyword: Search words, up to 200 characters. Searches Shorts across the whole site, not one channel.
- Optional parameters:
  - date_range: Upload time: last_hour, today, this_week, this_month or this_year; leave it out for any time. A value that is not recognized returns 422 and is not charged. (allowed: last_hour / this_month / this_week / this_year / today)
  - page_token: Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged.
  - sort: Order: relevance (default), newest, most_viewed or top_rated. A value that is not recognized returns 422 and is not charged. (allowed: most_viewed / newest / relevance / top_rated)
- Returns a list of records. Main fields of each record: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified (Whether the channel has a verified badg…), view_count; 17 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=youtube.
- Example request body:
{
  "platform": "youtube",
  "action": "shorts_search",
  "params": {
    "keyword": "minecraft"
  }
}
- Price: $0.79 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesyoutubePlatform identifier, fixed value.
actionbodystringYesshorts_searchCapability identifier, fixed value.
keywordbody.paramsstringYes-Search words, up to 200 characters. Searches Shorts across the whole site, not one channel.
date_rangebody.paramsstring (enum)No-Upload time: last_hour, today, this_week, this_month or this_year; leave it out for any time. A value that is not recognized returns 422 and is not charged.Allowed valueslast_hourthis_monththis_weekthis_yeartoday
page_tokenbody.paramsstringNo-Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged. About 50 Shorts per page, and the count varies a lot between pages; each page is one call and limit has no effect. Tokens last 24 hours, and the last page has no next_page_token.
sortbody.paramsstring (enum)No-Order: relevance (default), newest, most_viewed or top_rated. A value that is not recognized returns 422 and is not charged.Allowed valuesmost_viewednewestrelevancetop_rated

Code samples

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "youtube",
  "action": "shorts_search",
  "params": {
    "keyword": "minecraft"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

#
Captured November 21, 2026 at 07:24 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.
json
{  "id": "req_…",  "platform": "youtube",  "action": "shorts_search",  "results": [    {      "type": "short",      "id": "d1dIVnplTNg",      "url": "https://www.youtube.com/shorts/d1dIVnplTNg",      "title": "Making a WORKING Dance Floor in Minecraft",      "view_count": 253000,      "thumbnail_url": "https://i.ytimg.com/vi/d1dIVnplTNg/oar2.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHyq4qpAw8IARUAAIhCcAHAAQbIAQE=&rs=AOn4CLDijdFz3Us_02xjf448y4idELAlsA",      "is_backfill": false,      "platform": "youtube"    },    {      "type": "short",      "id": "NwOg9bYZkjY",      "url": "https://www.youtube.com/shorts/NwOg9bYZkjY",      "title": "minecraft facts",      "view_count": 54000,      "thumbnail_url": "https://i.ytimg.com/vi/NwOg9bYZkjY/oar2.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHyq4qpAw8IARUAAIhCcAHAAQbIAQE=&rs=AOn4CLBmQHsuE5Wv_98Q4stufQgifrs1ZQ",      "is_backfill": false,      "platform": "youtube"    }  ],  "next_page_token": …,  "pagination": { … },  "count": 56,  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Response fields

#

Business data is in results. The table lists the fields a record can contain. Values the platform does not show are never made up.

FieldMeaning
typeRecord type; values depend on the capability (for example video / image / text).
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
urlLink to the record on the platform.
titleTitle. null when the platform has no titles (for example text-only posts).
textBody text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so).
author_nameAuthor's display name.
author_usernameAuthor's username (@handle), usually usable in URLs.
author_idAuthor's unique ID on the platform.
author_urlLink to the author's profile on the platform.
author_avatar_urlKeeps the platform's own meaning
author_is_verifiedWhether the channel has a verified badge.
view_countViews or plays. null means not disclosed, not 0.
durationKeeps the platform's own meaning
published_textPublish time as written on the YouTube page, in relative form (e.g. 2 years ago), returned as is; null when the page shows none.
thumbnail_urlThumbnail link, lower resolution than image_url.
badgesBadges shown on the video, as an array of strings (e.g. 4K, CC, New); an empty array when there are none.
is_backfillIn Shorts search, whether YouTube added this item as related content because there were not enough matches.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

Google Analytics needs consent. Privacy