Skip to main content
The userRatings() method retrieves a user’s movie and TV show ratings from their ČSFD profile. It supports pagination, filtering by content type, and bulk fetching.

Method Signature

csfd.userRatings(
  username: string | number,
  config?: UserRatingsOptions,
  options?: CSFDOptions
): Promise<CSFDUserRatings[]>

Parameters

username
string | number
required
ČSFD username or user ID. Can be in format "912", "912-bart", or just the numeric ID 912
config
UserRatingsOptions
Configuration for filtering and pagination
options
CSFDOptions
Optional request configuration

Return Type

CSFDUserRatings[]
array
Array of user rating objects

Usage Examples

import { csfd } from 'node-csfd-api';

// Get latest page of ratings (~50 items)
const ratings = await csfd.userRatings('912-bart');

ratings.forEach(rating => {
  console.log(`${rating.title} (${rating.year}): ${rating.userRating}/5`);
});
[
  {
    "id": 812944,
    "title": "David Attenborough: Život na naší planetě",
    "year": 2020,
    "type": "film",
    "url": "https://www.csfd.cz/film/812944-david-attenborough-zivot-na-nasi-planete/",
    "colorRating": "good",
    "userDate": "01.11.2020",
    "userRating": 5
  },
  {
    "id": 912552,
    "title": "Coronation",
    "year": 2020,
    "type": "film",
    "url": "https://www.csfd.cz/film/912552-coronation/",
    "colorRating": "good",
    "userDate": "28.10.2020",
    "userRating": 4
  }
]

Content Type Filtering

You can filter ratings by content type using includesOnly or exclude:

Available Content Types

  • 'film' - Feature films
  • 'series' - TV series
  • 'season' - Individual seasons
  • 'episode' - Individual episodes
  • 'tv-film' - TV movies
  • 'tv-show' - TV shows
  • 'theatrical' - Theatrical productions
  • 'concert' - Concert recordings
  • 'student-film' - Student films
  • 'amateur-film' - Amateur films
  • 'music-video' - Music videos
includesOnly and exclude are mutually exclusive. If both are provided, includesOnly takes precedence.
Rate Limiting: When using allPages: true, always set an appropriate allPagesDelay (recommended: 2000ms or higher) to avoid being detected and blocked by ČSFD. Consider implementing exponential backoff for large datasets.
For exporting user ratings to CSV or JSON, use the built-in CLI tool:
npx node-csfd-api export ratings 912-bart

Build docs developers (and LLMs) love