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: 10–110 credits. We reserve the ceiling when the call starts and charge what it actually used when it finishes.
Paginates by cursor: see Pagination.
Request
- Base URL: https://api.insightsocial.app
- URL: https://api.insightsocial.app/v1/youtube/search/advanced
- Auth: API key in header x-api-key
Query parameters
Search query.
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.
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.
Broadcast type: live, upcoming, completed.
License filter: creativeCommon, youtube, any.
YouTube video category id (e.g. 10 = Music).
ISO 3166-1 alpha-2 country code.
Preferred result language (ISO 639-1).
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.
RFC-3339 datetime upper bound. Exact and genuinely applied.
Restrict results to a single channel id.
Maximum number of videos to return (1-50). Honored exactly: a page of 50 returns 50.
Pagination cursor from a previous response: fetches the next page.
Safe-search filter: none, moderate, strict.
Caption filter: any, closedCaption, none.
Quality filter: any, high, standard.
Dimension filter: 2d, 3d, any.
Restrict to embeddable videos: true, any.
Type filter: any, episode, movie.
Restrict to a Freebase topic id (e.g. /m/04rlf for music).
Latitude,longitude center for a geo search (e.g. 37.42307,-122.08427). Must be used together with location_radius.
Radius around location with a unit suffix (e.g. 50km, 10mi). Must be used together with location.
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.
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).
Only rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off each page. This list is not in date order, so the walk does not stop at the date: keep following next_cursor, and each page costs what a page costs even when every row on it is filtered out. A row with no date is kept.
Only rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off each page and the walk does not stop, so older pages follow. A row with no date is kept.
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.
Keep only rows published within this many days (post.published_at), 1 to 3650. A row with no date is discarded.
views: return the kept rows ordered by view count, highest first, across every page walked. Rows without a view count go last.
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.
Set to 1 to get the price of this call without making it: data.dry_run carries credits_min and credits_max. Nothing is charged.
Response
Success.
Changes
No recorded changes to this operation across all 1 revision of this API.