YouTube Video Info API

Read available YouTube title, duration, thumbnail, channel, and view metadata. Fields depend on the upstream result, and format cost estimates are not a source format list.

First request

GET

Use the shared API host unless the dashboard shows an account-specific hostname.

curl --get "https://p.savenow.to/ajax/api.php" \
  --data "function=i" \
  --data "api=YOUR_API_KEY" \
  --data-urlencode "u=https://www.youtube.com/watch?v=VIDEO_ID"

Request metadata without creating a download

GET /ajax/api.php with function=i, api=YOUR_API_KEY, and a YouTube URL in u returns metadata directly. A fresh successful lookup uses the configured info price; cached results can be served without another charge.

Treat optional fields as nullable

The response can include id, title, duration, durationString, view counts, upload dates, thumbnail, and channel fields. Upstream providers do not return every field for every video, so check each value before using it.

Cost estimates are not source formats

download_cost_estimates lists configured cost estimates for output keys. It is not a list of raw YouTube streams, source qualities, or format-specific download URLs.

Add basic metadata to a download

When the application also needs a media file, use /ajax/download.php with add_info=1. The accepted response can include info.title and info.image, then follows the regular progress flow.

Authentication and limits

Keep the API key server-side. The info function accepts YouTube URLs and requires enough key balance for a fresh lookup. Use the download endpoint for a media file or another source platform.

Feature details

Metadata response

Metadata-only response

The function=i endpoint returns provider-supplied video metadata and download_cost_estimates without creating a media job.

Basic download metadata

Use add_info=1 when a download request should also return info.title and info.image. This still creates and bills a normal download job.

Handle missing fields

Check each field before rendering it. Title, duration, channel, upload date, or thumbnail values can be absent when provider data is incomplete.

Job and error handling

Info lookup

The info-only function responds with JSON directly. Surface a failed lookup as an error rather than treating it as an empty media record.

Download plus info

A download with add_info=1 returns an id. Poll /ajax/progress.php; at progress 1000, use download_url only when success is 1 or true and the URL is non-empty.

Parameters

function=i Required Selects the YouTube metadata lookup function.
api Required Personal dashboard API key used by the info request. Keep it on the server.
u Required YouTube watch, Shorts, or youtu.be URL to inspect.
title, duration, thumbnail, channel Optional response fields Available metadata depends on upstream provider results. Validate each field before using it.
download_cost_estimates Response Configured cost estimates by output key and duration, not a source format inventory.
add_info=1 Download option On /ajax/download.php, include basic info.title and info.image fields in a normal download response.

Request examples

Metadata-only request

bash
curl --get "https://p.savenow.to/ajax/api.php" --data "function=i" --data "api=YOUR_API_KEY" --data-urlencode "u=https://www.youtube.com/watch?v=VIDEO_ID"

Node.js metadata request

javascript
const apiKey = process.env.VDA_API_KEY;
if (!apiKey) throw new Error('Set VDA_API_KEY on the server.');

const params = new URLSearchParams({
  function: 'i',
  api: apiKey,
  u: 'https://www.youtube.com/watch?v=VIDEO_ID',
});

const response = await fetch(`https://p.savenow.to/ajax/api.php?${params}`);
if (!response.ok) throw new Error(`Info request failed: ${response.status}`);

const info = await response.json();
console.log({ title: info.title, duration: info.duration, thumbnail: info.thumbnail });

Python metadata request

python
import os
import requests

response = requests.get(
    "https://p.savenow.to/ajax/api.php",
    params={
        "function": "i",
        "api": os.environ["VDA_API_KEY"],
        "u": "https://www.youtube.com/watch?v=VIDEO_ID",
    },
    timeout=30,
)
response.raise_for_status()
info = response.json()
print({"title": info.get("title"), "duration": info.get("duration"), "thumbnail": info.get("thumbnail")})

Download with basic metadata

bash
curl --get "https://p.savenow.to/ajax/download.php" --data "format=mp3" --data "add_info=1" --data "apikey=YOUR_API_KEY" --data-urlencode "url=https://www.youtube.com/watch?v=VIDEO_ID"

Poll the download job

bash
curl --get "https://p.savenow.to/ajax/progress.php" --data "id=DOWNLOAD_ID"

Important details

Keep the API key on your server

Read the key from protected server configuration. Do not put it in browser JavaScript, a public URL, or a repository.

Get an API key

Review both request paths

The API docs describe add_info on downloads and the progress response. The info-only function is a separate YouTube metadata lookup.

Open API docs

Check lookup pricing

A fresh successful metadata lookup uses the configured info price. A download with add_info=1 uses normal format and duration pricing.

Review pricing

Related guides

Continue building

OpenAPI docs

Download YAML or JSON specs and inspect downloader, progress, and subtitle endpoints.

Read docs

Embed resources

Keep button, card, widget, and REST paths reachable for existing users and migrations.

View resources

Common questions

What fields does the YouTube info endpoint return?

It returns provider-supplied metadata such as id, title, duration, thumbnail, channel, view counts, and upload dates when available. Treat optional fields as nullable.

Does it return every source format?

No. download_cost_estimates contains configured output cost estimates. It is not a list of raw YouTube streams or available source qualities.

Does metadata lookup start a download?

The function=i endpoint returns metadata without creating a download job. Use add_info=1 on /ajax/download.php when the same request should also create a media download.

Can I use this endpoint for TikTok or Instagram?

The metadata-only function accepts YouTube URLs. Use the regular download endpoint for another source only after checking that source is supported.