GET /v1/youtube/stored/post

YouTube stored video API: views, likes and channel by video ID

Returns one video we have stored, with its channel: title, description, views, likes, publish time, duration, category, the paid partnership flag and collaborator handles. Send q as a video id or a watch, Shorts or youtu.be URL. It reads our database only, so a miss is a 404, is not billed and never starts a crawl; read a fresh one with the YouTube video details API.

Price
$0.0005 per call
Batch
Yes, through /v1/batch
Failed calls
Not charged

Example request

curl
curl 'https://api.virev.ai/v1/youtube/stored/post?q=0e3GPea1Tyg' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "GET",
    "https://api.virev.ai/v1/youtube/stored/post",
    params={
        "q": "0e3GPea1Tyg",
    },
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
q requiredquerystringYouTube video id, or a watch, Shorts or youtu.be URL. Example 0e3GPea1Tyg.

Example response

The example response of the API reference, with lists cut to their first 3 items and long text shortened.

json
{
  "data": {
    "youtube_video_id": "0e3GPea1Tyg",
    "title": "$456,000 Squid Game In Real Life!",
    "description": "MAKE SURE YOU WATCH UNTIL GLASS BRIDGE IT'S INSANE!\n\nWatch Beast Games now on Prime Video!!! https://www.beastgames.com\n\nThank you GoPro for supplying us with cameras to get some of these shots. You can get them here: https://prf.hn/l/6bNbQ…",
    "views": 942007314,
    "likes": 20070730,
    "comments": null,
    "posted_at": "2021-11-24T21:00:01+00:00",
    "length_seconds": 1541,
    "is_short": false,
    "is_live_content": false,
    "category": "Entertainment",
    "keywords": [],
    "thumbnail_url": "https://i.ytimg.com/vi/0e3GPea1Tyg/maxresdefault.jpg",
    "is_paid_partnership": false,
    "comments_disabled": false,
    "likes_hidden": false,
    "channel_handle": "MrBeast",
    "channel_id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "channel_title": "MrBeast",
    "channel_followers": 509000000,
    "channel_is_verified": true,
    "collab_handles": []
  },
  "meta": {
    "cost": "$0.0005",
    "balance": "$3.3567",
    "request_id": "req_38a875101766a6b44e7d36b875f31fcc"
  }
}

How it works

One stored video with its channel: title, description, counts, publish time, duration, the paid partnership flag and its collaborators.

Strictly DB: this reads what the crawler already stored and never crawls. A miss is a 404 and is not billed. Fetch a fresh one with /v1/youtube/video.

Errors

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
404The video is not stored. You are not charged.
429Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.

YouTube API guide