Skip to main content
The Csfd class is the primary interface for accessing ČSFD data. It provides methods to fetch movies, search content, retrieve creator information, and access user data.

Import

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

// Or create a custom instance
import { Csfd } from 'node-csfd-api';

Default Instance

The library exports a pre-configured csfd instance that you can use immediately:
import { csfd } from 'node-csfd-api';

const movie = await csfd.movie(535121);

Constructor

While you typically use the default csfd instance, you can create a custom instance with default options:
new Csfd(
  userRatingsService,
  userReviewsService,
  movieService,
  creatorService,
  searchService,
  cinemaService,
  defaultOptions?
)
defaultOptions
CSFDOptions
Default options applied to all API calls

Methods

setOptions()

Update the default options for all subsequent API calls.
csfd.setOptions({
  language: 'en',
  request: {
    headers: {
      'User-Agent': 'MyApp/1.0'
    }
  }
});
options
CSFDOptions
required
Options to set

Available Methods

The Csfd class provides the following methods to interact with ČSFD data:

movie()

Get detailed information about a movie or TV series

search()

Search for movies, TV series, creators, and users

creator()

Get creator biography and filmography

userRatings()

Retrieve user ratings from their profile

userReviews()

Get user reviews from their profile

cinema()

Get cinema showtimes for a district

Example

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

// Set default language
csfd.setOptions({ language: 'en' });

// All methods will now use English when available
const movie = await csfd.movie(535121);
const results = await csfd.search('Tarantino');
const creator = await csfd.creator(2120);

Build docs developers (and LLMs) love