SponsorBlock API
SponsorBlock's public API returns crowdsourced sponsor, intro and self-promo timestamps for YouTube videos, with a privacy-preserving hash-prefix lookup. Live example included.
Endpoint tested and returned HTTP 200 on 21 Aug 2026
What is the SponsorBlock API?
SponsorBlock is a free, key-free API serving crowdsourced timestamps that mark sponsored segments, intros, outros, self-promotion and other skippable sections of YouTube videos. Lookups can be made by video id or, for privacy, by the first few characters of the video id's SHA-256 hash.
The hash-prefix lookup is the design decision worth studying even if you never use the data. Asking `GET /api/skipSegments?videoID=abc123` tells the server exactly which video your user is watching. Asking `GET /api/skipSegments/aaaa` — the first four hex characters of the SHA-256 of the video id — returns segments for every video whose hash starts that way, typically a few dozen, and you match the one you want locally. The server learns almost nothing. It is k-anonymity applied to a video API, the same technique Have I Been Pwned uses for password lookups, and it costs you one extra hash and a small over-fetch.
The dataset itself is substantial and entirely community-submitted: millions of segments across YouTube, each with a category, a start and end time in seconds, a vote count and a `locked` flag showing whether a moderator has pinned it. Because it is crowdsourced, quality varies and votes matter — a segment on two votes is a suggestion, one that is locked is settled. The same server also hosts DeArrow, which crowdsources less clickbaity titles and thumbnails through `/api/branding`, so one integration covers both.
Quick facts
- Base URL
https://sponsor.ajay.app- Authentication
- No key for reads. Submitting or voting on segments requires a locally generated user id, which is a write path and outside the scope of this page.
- Rate limit
- No published limit, but the project runs on donations. Use the hash-prefix endpoint and cache — it is cheaper for both sides.
- Pricing
- Free and open source, database licensed for reuse with attribution.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the SponsorBlock API
Every request below was executed against the live API on 21 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Fetch segments by SHA-256 hash prefix (privacy-preserving)
GET https://sponsor.ajay.app/api/skipSegments/aaaa
curl 'https://sponsor.ajay.app/api/skipSegments/aaaa'const res = await fetch("https://sponsor.ajay.app/api/skipSegments/aaaa");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://sponsor.ajay.app/api/skipSegments/aaaa", timeout=20)
res.raise_for_status()
print(res.json())[
{
"videoID": "EC3rcN0JBS0",
"segments": [
{
"category": "sponsor",
"actionType": "skip",
"segment": [
0,
103.054
],
"UUID": "49c2c363ec44052654e9a26fa55b062ee7d8cbe500baf008ecec4d1305b597fb7",
"videoDuration": 1718,
"locked": 0,
"votes": 2,
"description": ""
}
]
},
{
"videoID": "yS3KbqttD7U",
"segments": [
{
"category": "sponsor",
"actionType": "skip",
"segment": [
0,
9.816
],
"UUID": "aa00494238306addc983719abc123121c375e6c10cd9522fc9ccff3b52b3b9b06",
"videoDuration": 655,
"locked": 0,
"votes": 0,
"description": ""
}
]
},
{
"videoID": "I9O2SKdljhc",
"segments": [
{
"category": "sponsor",
"actionType": "skip",
"segment": [
0,
25
],
"UUID": "0191806b81cf6a0b050c1060a044d0fdcc897c5e87d04c7b02deb569b8786b88",
"videoDuration": 0,
"locked": 0,
"votes": 0,
"description": ""
}
]
},
{
"videoID": "5c9S0YzVqbM",
"segments": [
{
"category": "sponsor",
"actionType": "skip",
"segment": [
0,
14.414
],
"UUID": "2e0f4ca54427e4c6fab87bbd4d616e0f44b90c1513581f5608d04c2dd55645f57",
"videoDuration": 1090,
"locked": 0,
"votes": 0,
"description": ""
}
]
},
{
"videoID": "gQc9hydTVak",
"segments": [
{2. Fetch crowdsourced titles and thumbnails via DeArrow
GET https://sponsor.ajay.app/api/branding?videoID=jNQXAC9IVRw
curl 'https://sponsor.ajay.app/api/branding?videoID=jNQXAC9IVRw'const res = await fetch("https://sponsor.ajay.app/api/branding?videoID=jNQXAC9IVRw");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://sponsor.ajay.app/api/branding?videoID=jNQXAC9IVRw", timeout=20)
res.raise_for_status()
print(res.json()){
"titles": [
{
"title": "Me at the zoo",
"original": true,
"votes": 10,
"locked": true,
"UUID": "c1f72c2a-1237-4f72-9cb1-8e5cf542aadb"
},
{
"title": "Visiting the San Diego Zoo, talking about elephants",
"original": false,
"votes": 3,
"locked": false,
"UUID": "5eb7581d-3f73-4038-8fcf-a88faf970657"
},
{
"title": "Me at the zoo (oldest YouTube video)",
"original": false,
"votes": 0,
"locked": false,
"UUID": "68a0dbc9-c859-46ad-bf2a-ec5145990883"
}
],
"thumbnails": [
{
"timestamp": null,
"original": true,
"votes": 3,
"locked": false,
"UUID": "47d9b22e-8624-41a0-ba1b-8f49861c6617"
},
{
"timestamp": 0,
"original": false,
"votes": 0,
"locked": false,
"UUID": "d71d9919-a1d2-456f-8fac-139a5aed999b"
},
{
"timestamp": 10.780416,
"original": false,
"votes": 0,
"locked": false,
"UUID": "dfe9fc2b-a304-4f65-88e5-259f26046471"
}
],
"casualVotes": [
{
"id": "descriptive",
"count": 1,
"title": "me at the zoo"
}
],
"randomTime": 0.8537647312041372,
"videoDuration": null
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hashPrefix | path segment | Optional | First 4 to 32 hex characters of the SHA-256 of the video id. Returns every matching video's segments so the server never learns which one you wanted. aaaa |
videoID | string | Optional | Direct lookup on `/api/skipSegments?videoID=` or `/api/branding?videoID=`. Simpler, but reveals the video to the server. jNQXAC9IVRw |
categories | JSON array | Optional | Which segment types to return, as a JSON-encoded array. ["sponsor","intro"] |
actionTypes | JSON array | Optional | Filter by action: `skip`, `mute`, `full` or `poi`. ["skip"] |
Response fields
[].videoIDstring- The YouTube video id. Present on hash-prefix responses so you can match locally.
[].segments[].categorystring- `sponsor`, `selfpromo`, `interaction`, `intro`, `outro`, `preview`, `music_offtopic` or `filler`.
[].segments[].actionTypestring- What a player should do: `skip`, `mute`, `full` (whole video) or `poi` (a point of interest).
[].segments[].segmentarray of two floats- Start and end time in seconds. Floats, not integers — do not round before seeking.
[].segments[].votesinteger- Community vote score. Low or negative scores signal a disputed segment.
[].segments[].lockedinteger- 1 when a moderator has locked the segment as correct. Trust these over unlocked ones.
[].segments[].videoDurationfloat- Video length in seconds at submission time — useful for detecting re-uploads where timestamps no longer apply.
[].segments[].UUIDstring- Unique segment id, needed if you later vote on it.
What you can build with the SponsorBlock API
- Add sponsor skipping to a custom video player or embed
- Analyse how much of a channel's runtime is sponsored content
- Build a browser extension or media-centre plugin without your own dataset
- Study k-anonymity in practice as a privacy-engineering example
- Pull crowdsourced non-clickbait titles and thumbnails through the DeArrow branding endpoint
Common errors and how to fix them
404 on a videoID lookup
Nobody has submitted segments for that video.
Fix: This is the normal case for most videos, not an error. Treat 404 as 'no segments' and carry on.
Hash prefix returns unrelated videos
That is the design.
Fix: A short prefix matches many video ids. Hash the id you care about yourself and filter the response locally.
Timestamps do not line up
The video was re-uploaded or edited after the segments were submitted.
Fix: Compare the returned `videoDuration` against the actual video and discard segments where they disagree.
Bad segments in the results
Anyone can submit; not everything is accurate.
Fix: Weight by `votes` and prefer `locked` segments. Filtering out anything below a vote threshold removes most of the noise.
SponsorBlock API — frequently asked questions
Is the SponsorBlock API free to use?
Yes. Reading segments needs no key or account, and the database is licensed for reuse with attribution. Submitting segments is a separate write path that requires a locally generated user id.
How does the privacy-preserving lookup work?
You hash the video id with SHA-256 and send only the first few hex characters as a path segment. The server returns segments for every video whose hash shares that prefix, and you pick out the one you wanted locally — so the server never learns which video you were watching.
What do the segment categories mean?
`sponsor` is paid promotion, `selfpromo` is the creator promoting their own merchandise or Patreon, `intro` and `outro` are title and end cards, `interaction` is 'like and subscribe' reminders, `preview` is a recap, `music_offtopic` marks non-music sections of music videos, and `filler` is tangential content.
Can I trust every segment?
Not blindly. It is crowdsourced, so weight by the `votes` field and prefer segments with `locked` set to 1, which means a moderator has confirmed them. A segment with two votes and no lock is a suggestion.
Tools that pair with this API
YouTube Chapter Timestamp Generator
Build a YouTube chapter list from titles and durations — start times are added up for you and checked against YouTube's chapter rules before you copy.
YouTube Embed Code Generator
Generate a YouTube iframe embed with start and end times, autoplay, loop, privacy-enhanced mode and a responsive aspect-ratio wrapper for any page.
Time Duration Calculator
Add or subtract hours, minutes and seconds, or sum a list of durations into a total shown in h:m:s and in total seconds. Free and 100% in-browser.
Alternatives to SponsorBlock API
If SponsorBlock does not fit, these video & streaming apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| TVmaze | Free TV show API with no key: series info, full episode guides, cast, air dates and daily schedules with images. Genuinely open, no signup. Tested example. | No key | Yes | 19 Aug 2026 |
| Noembed | Free oEmbed proxy API with no key: get embed HTML, thumbnails and metadata for YouTube, Vimeo, Twitter and 200+ other sites from one endpoint. Tested. | No key | Yes | 19 Aug 2026 |
| IPTV-org | Free IPTV-org API with no key: 10,000+ TV channels worldwide with countries, languages, categories, logos and stream metadata as static JSON. Tested example. | No key | Yes | 19 Aug 2026 |
| YouTube oEmbed | Free YouTube oEmbed endpoint with no API key: video title, author, thumbnail and embed HTML from any video URL. No quota, unlike the Data API. Tested. | No key | No | 20 Aug 2026 |
| Stream.cz GraphQL | Stream.cz exposes a public, unauthenticated GraphQL API over its Czech video catalogue: shows, episodes, search and playout data, with introspection enabled. Live example included. | No key | No | 21 Aug 2026 |
| Stromberg API | A free, key-free API for the German sitcom Stromberg: quotes joined to the character who said them and the episode it came from, plus full cast and episode collections. | No key | Yes | 21 Aug 2026 |
SponsorBlock is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 21 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.