YepAPI
SERP

YouTube SERP

YouTube search results via SERP — video rankings, channel data, and metadata.

POST/v1/serp/youtube
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/serp/youtube', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ query: 'nextjs tutorial for beginners', depth: 10 }),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/serp/youtube \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "nextjs tutorial for beginners", "depth": 10}'

Request Body

ParameterTypeRequiredDescriptionDefault
querystringYesSearch query to look up on YouTube
depthnumberNoNumber of results to return10
location_codenumberNoTarget country code (e.g., 2840 for US). See Location Codes.2840
languagestringNoISO language code (e.g., en, es)"en"

Response

{
  "ok": true,
  "data": {
    "query": "nextjs tutorial",
    "totalResults": 0,
    "results": []
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.querystringThe search query that was executed on YouTube
data.totalResultsnumberTotal number of video results found
data.resultsobject[]Array of YouTube search result items (may be empty for some queries)
data.results[].positionnumberPosition in search results (1-indexed)
data.results[].typestringResult type (e.g., youtubeSearch, video)
data.results[].titlestringVideo title
data.results[].urlstringURL of the YouTube video
data.results[].descriptionstringVideo description or snippet
data.results[].domainstringDomain (typically youtube.com)
Under the Hood

Under the hood, this queries our SERP engine. We normalize the response format and flatten nested structures for consistency.

On this page