Random YouTube API

Follow these steps to access the API:

  1. Register an account.
  2. Go to the settings page and click on the API option.
  3. Create a new API token (you can set the Token Name to anything you like).
  4. Now you can access the API endpoint.

The API endpoint is /api/getvid and you will need to append the api_token parameter to the query string.

For example:

https://randomyoutube.net/api/getvid?api_token=insertyourtokenhere

The response will be a JSON-formatted record containing the random video ID, eg:

{"vid":"dQw4w9WgXcQ"}

Please note that the API is rate-limited for free accounts and the API will only have access to the same 10,000 random videos each month that are available via the watch page. Paid accounts have access to the entire database of random videos and there is no rate-limiting on the API.