lichess-org / lichess-org/api

Add Filter for Standard Starting Position in User Game Export API

Open
#266 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
597
Forks
176
Avg merge
1d 4h
Merged PRs (30d)
6

Description

The [User Game Export API](https://lichess.org/api#tag/Games/operation/apiGamesUser
) (`https://lichess.org/api/games/user/{username}`) currently lacks an option to filter games based on the starting position. It would be helpful to have a query parameter to distinguish between games that start from the standard chess position and games with custom starting positions.

## Current Behavior

There is no way to differentiate games that start from a standard position and those which start from a custom position.

## Expected Behavior

A new query parameter, such as startingPosition or fromPosition, can be used to filter games starting from the standard position.

Alternatively, include a way to filter starting positions in perfType, which currently allows us to filter for chess variants such as "chess960", "crazyhouse", etc. The variant already displays [Variant "From Position"]. This would make it a little more consistent.

## Proposed API call

```
https://lichess.org/api/games/user/{username}?perfType="blitz,fromPosition"
```

Returns all blitz games that did not start in the standard position.

## Use Case

I often give my students positions as exercises from which they have to win or draw the computer. I’d like to be able to filter and find those games more easily.

Vice versa, it’d probably also be useful to reliably receiving games from normal starting positions without having to manually filter out those that are not.

Thank you for considering this request.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the User Game Export API documentation and the endpoint https://lichess.org/api/games/user/{username}; review how its existing perfType filtering is described. Define and document a filter for standard versus custom starting positions, then verify that the documented query distinguishes those game types while preserving other filters such as blitz.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.