InsightSocial API
YouTube

Search › Advanced

GET
/v1/youtube/search/advanced

Returns video search results with the full filter set: sort order, length, live status, license, category, country, language, and publish date window.

Use it when a plain keyword search is too blunt; results are always videos, so use search when you also want channels or playlists back.

Metered: 20–220 credits. We reserve the ceiling when the call starts and charge what it actually used when it finishes.

Re-running the exact same call within 1h is free.

Paginates by cursor — see Pagination.

x-api-key<token>

Your key from the dashboard. It starts with isk_.

In: header

Query Parameters

query*string

Search query.

order?string

Sort order: date, rating, relevance (default), title, videoCount, viewCount. order=date is exact (measured: zero inversions against the timestamps). order=viewCount is YouTube's popularity-weighted ranking: the top result is the true maximum but mid-list order is approximate, so for exact ranking add includeExtras=true and sort the page on engagement.views client-side. Both are far more faithful than /v1/youtube/search's sortBy=popular, which is not view-ordered at all.

duration?string

Video length: short (<4m), medium (4-20m), long (>20m), any. Genuinely applied (unlike /v1/youtube/search's duration, which the platform ignores). short plus a client-side post.content.duration_seconds <= 180 filter is the documented Shorts approximation: see the endpoint description for why it is an approximation and not a Shorts filter.

event_type?string

Broadcast type: live, upcoming, completed.

license?string

License filter: creativeCommon, youtube, any.

category?string

YouTube video category id (e.g. 10 = Music).

region?string

ISO 3166-1 alpha-2 country code.

language?string

Preferred result language (ISO 639-1).

published_after?string

RFC-3339 datetime lower bound (e.g. 2026-01-01T00:00:00Z). Exact and genuinely applied. This is the endpoint to use for date-window work.

published_before?string

RFC-3339 datetime upper bound. Exact and genuinely applied.

channel_id?string

Restrict results to a single channel id.

max_results?integer

Maximum number of videos to return (1-50). Honored exactly: a page of 50 returns 50 (live-verified).

cursor?string

Pagination cursor from a previous response: fetches the next page.

video_caption?string

Caption filter: any, closedCaption, none.

video_definition?string

Quality filter: any, high, standard.

video_dimension?string

Dimension filter: 2d, 3d, any.

video_embeddable?string

Restrict to embeddable videos: true, any.

video_type?string

Type filter: any, episode, movie.

topic_id?string

Restrict to a Freebase topic id (e.g. /m/04rlf for music).

location?string

Latitude,longitude center for a geo search (e.g. 37.42307,-122.08427). Must be used together with location_radius.

location_radius?string

Radius around location with a unit suffix (e.g. 50km, 10mi). Must be used together with location.

includeExtras?string

Set to true to add the view, like and comment counts (post.engagement.views / .likes / .comments) and the video length (post.content.duration_seconds) to every result. Left off, those four are null. YouTube's search index returns snippets only, so the counts come from a second lookup.

include?"channel"

Set to channel (one token only) to add each row's channel stats in this one call. channel puts the channel's subscriber count on post.ext.author_followers (YouTube's own figure, which it rounds to three significant figures above 1,000) and fills the channel's post.author.display_name, .avatar_url and .username where missing. Each join adds 0.2 to 0.7 seconds on a fresh page (one lookup per 50 ids, never more than 8 seconds). Read data.hydration for the rows, lookups, credits held and kept, and the time.

Value in

  • "channel"
min_views?integer

Keep only rows with at least this many views (post.engagement.views). A row whose view count is unknown is discarded, so every returned row meets the floor. Filtering runs on our side after each page is fetched, so every page walked is billed as usual; data.walk.discarded counts what was removed and why.

Range0 <= value
max_age_days?integer

Keep only rows published within this many days (post.published_at), 1 to 3650. A row with no date is discarded. Filtering runs on our side after each page is fetched, so every page walked is billed as usual; data.walk.discarded counts what was removed and why.

Range1 <= value <= 3650
sort_rows?"views"

views: return the kept rows ordered by view count, highest first, across every page walked. Rows without a view count go last.

Value in

  • "views"
max_pages?integer

1 to 5 (default 1). Walk up to this many pages in one call and return the rows from all of them (after any filter). Each page walked is billed as one call to this endpoint; the whole walk counts once against your rate limit. The walk stops early at the last page, or when the request's time budget runs low; data.walk.stopped says why (end, max_pages, time_budget, page_error) and data.next_cursor continues from where it stopped.

Range1 <= value <= 5
seen?string

An id you choose (1 to 64 letters, digits, ., _ or -). Rows your account already received under the same seen id are removed from the page, and the page price falls with the share of repeats: page credits x new rows / rows on the page, rounded up, so a page of nothing but repeats is free. Use one id across a set of related searches; data.walk.repeats counts what was removed.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/youtube/search/advanced?query=string"
{  "success": true,  "platform": "instagram",  "endpoint": "/v1/instagram/profile/posts",  "data": {    "items": [      "…"    ],    "dropped": 0  },  "pagination": {    "next_cursor": "is2.eyJwIjoyfQ",    "has_more": true,    "page_size": 12  },  "credits_used": 20,  "credits_remaining": 9980,  "request_id": "req_1a2b3c4d5e6f",  "cached": false,  "idempotent_replay": false,  "charge_reason": "miss",  "free_call": false}