Chess Puzzle Analyzer - Fetch & Analyze Lichess Puzzles via API

Chess Puzzle Analyzer - Fetch & Analyze Lichess Puzzles via API

by mrahil

Instantly fetch and analyze any Lichess chess puzzle by ID. Get moves, positions, stats, and themes in a structured format for developers, trainers, and apps.

228 runs
7 users
Try This Actor

Opens on Apify.com

About Chess Puzzle Analyzer - Fetch & Analyze Lichess Puzzles via API

Need to pull detailed chess puzzle data without the manual hassle? This actor is your direct line to the Lichess puzzle database via the rahilchess API. Just feed it a puzzle ID (from 1 to 4 million), and it fetches everything for you: the complete move sequence, FEN positions, puzzle themes, and performance statistics like rating and popularity. It returns it all in a clean, structured format, ready to use. I use this when I'm building chess applications or dashboards and need reliable puzzle data fast. It saves me from writing and maintaining my own API integration code. For chess coaches, it's great for sourcing specific puzzles for training based on difficulty or theme. For enthusiasts, it's a fun way to explore the database programmatically. If you're working on anything that needs integrated puzzle analysis—whether it's a study app, a content site, or a personal project—this actor handles the data layer cleanly and efficiently.

What does this actor do?

Chess Puzzle Analyzer - Fetch & Analyze Lichess Puzzles via API is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

Chess Puzzle Analyzer - Fetch & Analyze Lichess Puzzles via API

An Apify Actor that programmatically retrieves and analyzes chess puzzles from the Lichess API. It's built on the Python Apify SDK template, providing a structured foundation for web scraping and data processing tasks.

Overview

This Actor connects to the Lichess puzzle database, fetches puzzles based on configurable parameters, and outputs structured data for analysis. It's designed for developers, analysts, or chess enthusiasts who need to collect puzzle data in an automated, scalable way.

Key Features

  • Lichess API Integration: Directly fetches puzzles from the official Lichess puzzle API.
  • Structured Data Output: Saves results into an Apify Dataset for easy export and integration.
  • Configurable Input: Control puzzle selection via input parameters like rating range, themes, and limits.
  • Built on Apify SDK: Utilizes the Python Apify SDK for robust queue management, error handling, and storage.
  • Input Schema: Validates run configuration using a defined JSON schema.

How to Use

You can run the Actor directly in the Apify Console or integrate it via API.

  1. Configure Input: Set your desired parameters in the Actor's input (e.g., minRating, maxRating, themes, maxPuzzles).
  2. Run the Actor: Start a run in the console or via the API. The Actor will fetch puzzles matching your criteria.
  3. Get Results: Download the structured puzzle data from the Dataset tab in various formats (JSON, CSV, Excel, etc.) or retrieve it via the Apify API.

Local Development

To modify or extend the Actor locally, pull the source code using the Apify CLI:

# Install the CLI
npm -g install apify-cli

# Pull the Actor to your current directory
apify pull <YourActorId>

Find your Actor's unique ID or name in the Apify Console. Develop within the async with Actor: block in main.py, leveraging the Apify SDK and any Python libraries.

Input / Output

Input (Configuration):
The Actor accepts a JSON input specifying puzzle fetch criteria. Typical parameters include:
* maxPuzzles: The total number of puzzles to retrieve.
* minRating / maxRating: The Elo rating range for puzzles.
* themes: An array of puzzle themes (e.g., ["middlegame", "pin"]).

Output (Dataset):
Each item in the output dataset represents a Lichess puzzle and contains structured fields such as:
* PuzzleId: The unique Lichess puzzle identifier.
* FEN: The board position in Forsyth–Edwards Notation.
* Moves: The solution sequence in UCI format.
* Rating: The puzzle's Elo rating.
* RatingDeviation: The uncertainty of the rating.
* Popularity: A popularity score.
* Themes: A list of associated tactical themes.
* GameUrl: A link to the source game.

Resources

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Chess Puzzle Analyzer - Fetch & Analyze Lichess Puzzles via API now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
mrahil
Pricing
Paid
Total Runs
228
Active Users
7
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support