Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.discovr.media/llms.txt

Use this file to discover all available pages before exploring further.

Retrieves all items from the history list for a specific profile. Items are returned in descending order by creation date (newest first). Supports cursor-based pagination using the nextPageToken query parameter. Pagination:
  • Use nextPageToken from the previous response to fetch the next page
  • If hasMore is true, there are more items available on subsequent pages.
Duplicates: Unlike other lists, the history list allows duplicate entries. Each watch event creates a new history entry. TV Shows: For TV shows, history entries include season information and optionally episode information. When a TV history item has no episode field, it represents a “Default for Episode” entry. Frontend clients should treat these entries as applying to all episodes in the season where episode.air_date < historyItem.updatedAt. This allows updating multiple episodes with a single history entry. The matching logic is a client-side concern and not exposed by the API. Media Assets: All items include media assets (id, title, poster_path, backdrop_path) automatically.

Parameters

NameTypeRequiredDescription
nextPageTokenstringNoOpaque token from previous page for pagination
limitintegerNoMaximum number of items to return (1-50, default: 10)

Returns

HistoryListResponse — List of history items retrieved successfully
{
  "items": [
{
  "id": "string",
  "mediaType": "movie" /* enum: "movie", "tv" */,
  "title": "string",
  "poster_path": "string",
  "backdrop_path": "string",
  "updatedAt": "string" /* date-time */,
  "progress": 0.0,
  "completed": false,
  "watched_count": 0,
  "season": 0,
  "episode": 0,
  "imported": "string",
  "createdAt": "string" /* date-time */
}
],
  "hasMore": false,
  "nextPageToken": "string"
}

Example

import { DiscovrClient } from "discovr";
import type { HistoryListResponse } from "discovr";

const discovr = new DiscovrClient("your-client-id", {
  basePath: "https://api.discovr.media",
});

// After sign-in and profile selection …
const response: HistoryListResponse = await discovr.getHistoryItems({ nextPageToken: "example", limit: 10 });
console.log(response);