Skip to content

Legacy API

Ajay Ramachandran edited this page Jan 15, 2021 · 2 revisions

These API endpoints are deprecated but still function. See the full API document at https://github.com/ajayyy/SponsorBlock/wiki/API-Docs/


GET /api/getVideoSponsorTimes

Input:

{
  videoID: string
}

Response:

{
  sponsorTimes: [[startTime: float, endTime float]], // Time in seconds
  UUIDs: string[] //The ID for this sponsor time, used to submit votes
}

Error codes:

404: Not Found


GET or POST /api/postVideoSponsorTimes

Input:

{
  videoID: string,
  startTime: float,
  endTime: float,
  userID: string //This should be a randomly generated UUID stored locally (not the public one)
}

Response:

{
  Nothing (status code 200)
}

Error codes:

400: Bad Request (Your inputs are wrong/impossible)

429: Rate Limit (Too many for the same user or IP)

409: Duplicate