Skip to content
piracywatch.io
Sign inContact

API reference

Draft

Authentication

Send your key as a bearer token on every request.

curl https://piracywatch.io/api/v1/charts/films?week=2026-W48&limit=10 \
  -H "Authorization: Bearer $PIRACYWATCH_KEY"
const res = await fetch('https://piracywatch.io/api/v1/charts/films?limit=10', {
  headers: { Authorization: `Bearer ${process.env.PIRACYWATCH_KEY}` },
})
const { items } = await res.json()

Keys are created and revoked in Account.

Charts

GET /api/v1/charts/{kind}

ParameterInValue
kindpathfilms, series or games
weekqueryISO week, such as 2026-W48. Default: the latest ranked week
limitquery1 to 100. Default: 10
platformqueryGames only: all, pc, switch or playstation. Default: all

Response

One week of one chart. Items are in rank order.

{
  "week": "2026-W48",
  "kind": "films",
  "platform": "all",
  "items": [
    {
      "rank": 1,
      "prev_rank": 1,
      "index": 100,
      "title": "The Odyssey",
      "year": 2026,
      "cover": "/covers/films/the-odyssey-2026.webp",
      "history": [4, 5, 4, 4, 2, 1, 1, 1]
    },
    {
      "rank": 2,
      "prev_rank": 54,
      "index": 46,
      "title": "You Can See Everything",
      "year": 2026,
      "cover": "/covers/films/you-can-see-everything-2026.webp",
      "history": [null, null, null, 57, 47, 47, 54, 2]
    }
  ]
}
FieldTypeValue
rankintegerRank this week, from 1
prev_rankinteger or nullRank last week. null when new
indexinteger0 to 100. The week’s top title is 100
titlestringTitle
yearintegerRelease year
coverstring or nullCover image path
historyarrayRank for each of the last 8 weeks, oldest first. null when unranked

Paid keys add raw counts and country splits.

Errors

Errors return a JSON body with a code and a message.

{
  "error": {
    "code": "invalid_week",
    "message": "week must look like 2026-W48"
  }
}
StatusCodeWhen
400invalid_weekweek is not an ISO week
400invalid_limitlimit is outside 1 to 100
401missing_keyNo key, or the key is revoked
403plan_requiredThe field or history depth needs a paid plan
404no_dataNothing published for that kind, week and platform
429rate_limitedDaily request limit reached

Rate limits

Each plan has a daily request limit. Every response carries the current state.

HeaderValue
RateLimit-LimitRequests a day on your plan
RateLimit-RemainingRequests left today
RateLimit-ResetSeconds until the limit resets, at 00:00 UTC

Charts change once a week. Cache responses until the next Monday.