YouTube Videos API

Look up multiple YouTube videos using the documented input format.

POST/v1/youtube/videos
5 credits per successful callCache window 6 hoursFull API reference ↗

Coverage is rolling out during preview. Test the endpoint you need before integrating. Unavailable operations return an explicit error and use no credits.

Try this endpoint

Enter the documented inputs, run a protected browser test, and inspect the JSON response.

POST/v1/youtube/videos
Optional parameters (1)

No API key needed for this protected browser test. Production calls require a server-side SocialQuery key.

Request preview
Copy this request into your server-side integration, or run a test to inspect the response.
curl -X POST 'https://socialquery.dev/v1/youtube/videos' \
  -H "x-api-key: $SOCIALQUERY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"hl":"en","ids":["dQw4w9WgXcQ"]}'

Request contract

Parameters

Pass these fields in the JSON request body. Production requests also require your server-side API key.

hlOptional
The language code for the request, where supported.
Example: en
idsRequired
ids JSON body field for this endpoint.
Example: ["dQw4w9WgXcQ"]
include_localizationsOptional
include_localizations JSON body field for this endpoint.
Example: false

Build a reliable integration.

Keep your key server-side

Pass your SocialQuery key in the x-api-key header. Never expose credentials in a browser bundle.

Check the response

Read success before using data. Preserve request_id when logging errors or contacting support.

Account for coverage

Test the fields you need. Provider availability varies, and unavailable operations use no credits.

More YouTube endpoints

View all →