Products/YouTube/Trending

YouTube Trending Scraper icon

YouTube Trending Scraper REST API and Apify actor

YouTube's music charts, for any country.

Pick a country and a chart, get every entry with its rank, last rank, weeks on chart, artists and views. Straight from YouTube Charts.

0.50 USD per 1,000 chart entries. 5 USD free credits, no card. Credit packs.

GET /v1/youtube/trending
curl -G "https://api.vakitek.co.uk/v1/youtube/trending" \
  -H "X-API-Key: $VAKITEK_API_KEY" \
  --data-urlencode "country=US" \
  --data-urlencode "chart=top_videos_weekly" \
  --data-urlencode "max_results=5"
data[0], one row per chart entry200 OK
{
  "rank": 1,
  "previousRank": 3,
  "weeksOnChart": 24,
  "title": "Dai Dai",
  "channelName": "shakiraVEVO",
  "artists": ["Shakira", "Burna Boy"],
  "viewCount": 2338755,
  "viewCountChangePercent": -3.6,
  "country": "US",
  "chart": "top_videos_weekly",
  ...
}
Real response, US Top music videos this week, 12 Nov 2026. Trimmed.

What you get

Three official charts

trending (30 entries, rank only), top_videos_weekly and top_videos_daily (100 entries, with viewCount).

How each entry moved

rank, previousRank (null for a new entry), weeksOnChart and viewCountChangePercent versus last period.

Artists and channel

artists as a list, channelName, channelId, the video url and its releaseDate.

Clear failure rows

A country code that is not real, or not supported for this chart, returns a free INVALID_INPUT row.

Not included: a general list of trending videos: YouTube removed its Trending page in 2025, so these are its music charts. Limits and error codes.

Pay per chart entry

0.50 USD/ 1,000 chart entries

Video details at no extra cost on Apify. Error rows are free. No minimum per run, no monthly plan.

Trending now for 2 countries0.03 USD
60 chart entries x 0.0005 USD

One wallet for all 10 YouTube APIs. Credits never expire. Credit packs from 10 USD. Runs on Apify are billed by Apify.

Questions

Is this every trending video on YouTube?

No. YouTube removed its general Trending page in 2025. These are its official music charts, the closest official source still published.

Why are view counts empty on some rows?

The trending chart carries a rank only. The two top videos charts always have viewCount.

Can I track a chart every day?

Yes. Call the API from your own scheduler, or schedule the Apify actor with your countries and chart.

Is it legal to scrape YouTube charts?

We read public YouTube pages only, with no login. YouTube's Terms of Service restrict automated access, so check your use against them and your local law.

Do I need Apify?

No. The REST API is separate: sign up with your email, copy your key, call it. Apify is the no-code option, billed by Apify on your Apify account at the same unit price plus its 0.00005 USD start event per run.

Pull your first chart in a minute.

API reference: endpoints, limits and error codes

Base URL https://api.vakitek.co.uk. Send your key in the X-API-Key header. Every response is JSON with data (one row per item), meta (request id, count, latency, paging cursor) and billing (what was charged).

GET /v1/youtube/trending

One country and one chart per call. One row per chart entry.

countryISO code (US, FR, JP) or globaldefault US
charttrending, top_videos_weekly or top_videos_dailydefault trending
max_resultsChart entries to return1 to 100, default 100

global works for the two top videos charts only. Several countries per run, video details (likes, comment count, publish date, description) and schedules are on the Apify actor.

Limits

Rate limit
120 requests per minute per API key (default). Over that you get 429. Need more? Write to support.
Batch
Transcript and Channel email take up to 25 videos or channels per POST. More returns 422.
Page size
Search up to 100 rows, Shorts and channel videos up to 200 rows per call, then follow meta.next_cursor.
Concurrency
No per-key cap. The service runs a limited number of scrapes at the same time and queues the rest, so very parallel clients wait longer. Start with 4 calls in flight.
Latency
1 to 9 seconds per call in our checks on 23 Oct 2026 (one call per endpoint). Set your client timeout to 120 seconds.
Wallet
Checked before each call. When it is empty you get 402 and nothing runs. Runs on Apify are billed by Apify, not from this wallet.
Data
We keep request metadata (route, status, counts, timing) for billing and support. We do not keep a copy of the rows we return.

HTTP status codes

StatusBodyMeaningWhat to do
200{data, meta, billing}Done. Some rows may carry an error code (free).Retry only rows whose code says retry later.
401UNAUTHORIZEDMissing or wrong X-API-Key.Fix the key. Do not retry.
402INSUFFICIENT_CREDITSYour wallet is empty.Buy a pack, then retry.
422INVALID_INPUTA parameter is wrong, or more than 25 items in a batch.Fix the request. Do not retry.
429RATE_LIMITEDOver 120 requests per minute.Wait, then retry with backoff: 1 s, 2 s, 4 s.
502UPSTREAM_ERRORYouTube or our service failed for the whole call. Not billed.Retry once after a few seconds.
Row codeWhat happenedRetryYou pay
chart entryA chart entry came back. The only billed row.n/a0.50 USD / 1,000
INVALID_INPUTThe country code is not a real country, or not supported for this chartno retryfree
NO_RESULTSThe chart came back empty for this countryno retryfree
PARSE_ERRORYouTube changed its page and we could not read it. We get alerted and fix itno retryfree
BLOCKEDYouTube refused us for now, even after trying every proxy tierretry laterfree
UPSTREAM_ERRORSomething went wrong on YouTube's side or oursretry laterfree
UPSTREAM_UNAVAILABLEOur API was unreachableretry laterfree
TIME_BUDGET_EXCEEDEDThe time budget ran out before this country finishedretry laterfree
Get a free API key Pricing