API Description

YouTube Search API — Search YouTube content by keyword and return matching results.

Authenticate with your Pangolinfo API Key to receive structured JSON data.

Request URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/youtube-search

Request Headers

ParametersParameter valueTypeDescription
Content-Typeapplication/jsonstringData format
AuthorizationBearer xxxstringAuthorization Token

Collection takes up to approximately 75 seconds. Set your client timeout to 90 seconds.

Request Parameters

ParameterRequiredTypeDescription
targetYesstringTarget URL, supported ID or search keyword for this operation.
optionsNoobjectOptional collection settings, described below.

options Parameters

ParameterRequiredTypeDescription
maxPagesNointegerPages to collect. Default: 1; values above 5 are capped at 5. Must be a positive integer.
Default: 1
Minimum: 1
Maximum: 5
typeNostringSearch result type.
Values: [“video”, “channel”]
paramsNostringYouTube search filter encoded as base64 protobuf. Overrides type when provided.
cursorNostring | nullContinuation cursor from the previous response. Pass the value unchanged.

Only the request parameters listed on this page are used; other fields are ignored. Pass pagination cursors back unchanged, without encoding, decoding or conversion.

One page by default, capped at five per request. Page counts must be positive integers; higher values are capped at five.

Response Fields

FieldTypeDescription
codeintegerStatus code; 0 indicates success.
messagestringResponse message; ok on success.
pointCostnumberPoints charged for this request.
dataobjectCollected data, with fields described below.
metaobjectRequest identifier and duration in milliseconds.
billingobjectCharged units, unit price and billing rule version.

data Fields

FieldTypeDescription
videosobject[]Videos
channelsobject[]Channels
countnumberNumber of result items.
paginationobjectContinuation cursor and whether more results are available.

data.videos[] Fields

FieldTypeDescription
urlstring | nullContent URL.
titlestring | nullTitle
durationnumber | nullDuration
videoIdstringVideo id
isShortbooleanIs short
descriptionSnippetstring | nullDescription snippet
durationTextstring | nullDuration text
viewsnumber | nullView count.
shortViewCountTextstring | nullShort view count text
publishedTimeTextstring | nullPublished time text
thumbnailsobject[]Thumbnails
coverstring | nullCover
badgesstring[]Badges
posterobjectPoster

data.videos[].thumbnails[] Fields

FieldTypeDescription
urlstringContent URL.
widthnumberWidth
heightnumberHeight

data.videos[].poster Fields

FieldTypeDescription
nicknamestring | nullAuthor display name.
channelIdstring | nullChannel id
handlestring | nullHandle
avatarstring | nullAvatar URL.
profileUrlstring | nullAuthor profile URL.
badgesstring[]Badges

data.channels[] Fields

FieldTypeDescription
channelIdstringChannel id
titlestring | nullTitle
handlestring | nullHandle
urlstringContent URL.
thumbnailsobject[]Thumbnails
descriptionSnippetstring | nullDescription snippet
subscriberCountTextstring | nullSubscriber count text
subscriberCountnumber | nullSubscriber count
videoCountTextstring | nullVideo count text
videoCountnumber | nullVideo count
badgesstring[]Badges

data.channels[].thumbnails[] Fields

FieldTypeDescription
urlstringContent URL.
widthnumberWidth
heightnumberHeight

data.pagination Fields

FieldTypeDescription
cursorstring | nullContinuation cursor from the previous response. Pass the value unchanged.
hasMorebooleanWhether more results are available.

Request Example

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/youtube-search \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "lofi hip hop"
}'

Response Example

This excerpt shows the first item of each list. Long text and URLs are shortened; pointCost is the charge for the complete response. The playground contains the full schema.

{
  "code": 0,
  "message": "ok",
  "pointCost": 34.4,
  "data": {
    "videos": [
      {
        "url": "https://www.youtube.com/watch?v=rFZHOHl-L8A",
        "title": "lofi hip hop radio 📚 beats to relax/study to",
        "duration": null,
        "videoId": "rFZHOHl-L8A",
        "isShort": false,
        "descriptionSnippet": "Spooky season is officially upon us 2026 Halloween playlist available now: https://lnk.to/halloween-lofi02 | Listen on Spotify, ...",
        "durationText": null,
        "views": 10197,
        "shortViewCountText": null,
        "publishedTimeText": null,
        "thumbnails": [
          {
            "url": "https://i.ytimg.com/vi/rFZHOHl-L8A/hq720.jpg?v=6ad62bed&sqp=-oaymwEgCOgCEMoBSFXyq4qpAxIIARUAAIhCGAFwAcABBrgC9xg=&rs=AOn4CLAvQ4rf_sYMdux1p1ObxxVXesAy0w",
            "width": 360,
            "height": 202
          }
        ],
        "cover": "https://i.ytimg.com/vi/rFZHOHl-L8A/hq720.jpg?v=6ad62bed&sqp=-oaymwEgCNAFEJQDSFXyq4qpAxIIARUAAIhCGAFwAcABBrgC9xg=&rs=AOn4CLAWuRauLyqoHfmvuMYDmbjmeCREpw",
        "badges": [
          "LIVE"
        ],
        "poster": {
          "nickname": "Lofi Girl",
          "channelId": "UCSJ4gkVC6NrvII8umztf0Ow",
          "handle": null,
          "avatar": "https://yt3.ggpht.com/REcZL_LGu0DaDaC-G7VIbN0uE_5l-i_dw6ZvOETRnY3pRhUmfkOq6C1MLephPZkV4VSzQAhEi_4=s88-c-k-c0x00ffffff-no-rj",
          "profileUrl": "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow",
          "badges": [
            "Official Artist Channel"
          ]
        }
      }
    ],
    "channels": [],
    "count": 43,
    "pagination": {
      "cursor": "ErMDEgxsb2ZpIGhpcCBob3AaogNTQlNDQVJaU1JFRlVabTFpUnpsdFlWTkNiMkZZUVdkaFJ6bDNnZ0VMY2taYVNFOUliQzFNT0VHQ0FRdHVOakZWVEVWVk4wTlBNSUlCRFZKRWJqWXhWVXhGVlRkRFR6Q0NBU...",
      "hasMore": true
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-youtube-search-1793954286411167200",
    "durationMs": 7991
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 43,
    "pointCost": 34.4
  }
}

Points Usage

0.8 points per primary result.

Empty results and failed requests are not charged. Duplicate IDs are counted once within a response. Separate calls and pages are billed separately. See Social Media Reviews API billing.

Try it