Quick and dirty Python script for importing games from a CSV file into Backloggd.com.
- Clone this repository or download the files.
- Install the required Python packages:
pip install -r requirements.txtTo use this script, you need a backloggd.json file in the same directory. To get the required information, follow these steps:
- Go to the Backloggd website and log in.
- Press F12 to open the browser inspector.
- Click on the Network tab.
- In the filters, select Fetch/XHR.
- On the website, find any game, click Edit Log, make a temporary change (like changing the rating or status), and click Save.
- Look for a new request generated in the inspector (it will likely just be a number, which is the Game ID).
- Verification: Click on that request and check the Request URL in the General section. It should look like this:
https://backloggd.com/api/user/1234/log/5678
Once you have the correct request selected:
backloggd_id: This is the number right after/user/in the Request URL (e.g.,1234in the example above)._backloggd_session:- Scroll down to the Request Headers section.
- Under the Cookie field, look for the part that says
_backloggd_session=followed by a long string of numbers and letters. That whole string is your session value.
csrf: Look forX-Csrf-Tokenin the Request Headers. This is your CSRF token.
To get your Client ID and Client Secret, you need to register an application on the Twitch Developer Console:
- Log in to the Twitch Developer Console.
- Click Register Your Application.
- Fill in the fields as follows:
- Name: Anything (e.g., "Backloggd Importer")
- OAuth Redirect URLs:
https://localhost - Category:
Application Integration - Client Type:
Confidential
- Once created, click Manage on your application.
- Scroll to the bottom to find your Client ID (
id). - Click New Secret to generate and copy your Client Secret (
secret).
Create a file named backloggd.json in the same directory as the script and paste the following structure with your collected values:
{
"id": "example_client_id_12345",
"secret": "example_client_secret_67890",
"backloggd_id": "1234",
"csrf": "aB1c2D3e4F5g6H7i8J9k0L1m2N3o4P5q6R7s8T9u0V1w2X3y4Z5",
"_backloggd_session": "BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2ZDY0ZjY2"
}Your CSV should have the following columns:
Game,Year Released,Rating,Status,Date Played
Elden Ring,2022,5,completed,2022-05-25
Hollow Knight,2017,4.5,playing,
Silksong,2024,,wishlist,
Hades,2020,4,backlog,
Cyberpunk 2077,2020,3.5,playing,03/15/2022| Column | Required | Description |
|---|---|---|
| Game | ✅ Yes | Game name (used for IGDB search) |
| Year Released | ✅ Yes | Release year (helps IGDB find the correct game) |
| Rating | ❌ No | Your rating on a 5-star scale (use decimals for half stars: 4.5, 3.5, etc.). Leave empty for no rating. |
| Status | ❌ No | Game status: completed, playing, backlog, or wishlist. Defaults to completed if not specified. |
| Date Played | ❌ No | The date you played/finished the game. Leave empty for none. (See below.) |
Ratings use a 5-star scale:
- Leave empty for no rating
- Use 0-5 scale (e.g.,
3,4,5) - Supports half stars using decimals:
3.5,4.5, etc. - The script automatically converts your 5-star rating to Backloggd's 10-point scale (e.g.,
4.5stars →9/10)
This is the date you played or finished the game. It shows up on the game's entry in your Backloggd log. It's optional — leave it blank to skip.
The script accepts several common formats and normalizes them to YYYY-MM-DD before sending:
| Format | Example |
|---|---|
YYYY-MM-DD (recommended) |
2022-05-25 |
YYYY/MM/DD |
2022/05/25 |
MM/DD/YYYY (US) |
05/25/2022 |
DD/MM/YYYY |
25/05/2022 |
YYYY.MM.DD |
2022.05.25 |
Note: For ambiguous
DD/MMvsMM/DDdates, USMM/DD/YYYYis tried first (so03/15/2022= March 15). UseYYYY-MM-DDto avoid ambiguity.
completed- Finished the game (default if not specified)playing- Currently playingbacklog- Want to playwishlist- Interested in
Additional valid statuses: played, abandoned, retired, shelved
python backloggd.pyThis will import games from games.csv using the default settings.
The script now supports various command-line options for flexibility:
python backloggd.py [csv_file] [options]Positional Arguments:
csv_file- Path to CSV file (default:games.csv)
Optional Arguments:
--config CONFIG- Path to config file (default:backloggd.json)--not-found FILE- Path to not-found log file (default:notfound.txt)--start-row N- Row number to start from (default: 1, skips header row 0)--dry-run- Preview import without making changes to Backloggd--verbose- Show detailed debug output-h, --help- Show help message
Preview import without making changes:
python backloggd.py --dry-runImport from a custom CSV file:
python backloggd.py my_games.csvResume from a specific row (useful if import was interrupted):
python backloggd.py --start-row 50Show detailed debug output:
python backloggd.py --verboseUse custom config file:
python backloggd.py --config custom_config.jsonCombine multiple options:
python backloggd.py my_games.csv --dry-run --verbose --start-row 10- ✅ Progress Tracking - Shows "Processing game X of Y" with current progress
- ✅ Input Validation - Validates year (1950-2050), rating (0-5), and status
- ✅ Error Handling - Graceful handling of network errors, rate limits, and authentication issues
- ✅ Logging - Outputs to both console and
backloggd_import.logfile - ✅ Dry-Run Mode - Preview what will be imported without making changes
- ✅ Resume Support - Resume from any row if import is interrupted
- ✅ Not Found Tracking - Games not found in IGDB are written to
notfound.txt
Games not being found:
- Check spelling in your CSV file (common typos: "Deadsapce" → "Dead Space", "Rouge Legacy" → "Rogue Legacy")
- Include the release year to help matching
- Check
notfound.txtfor a list of games that couldn't be matched
Authentication errors:
- Your CSRF token and session cookie may have expired
- Follow the setup instructions again to get fresh credentials
Rate limiting:
- The script automatically handles rate limits with exponential backoff
- IGDB: Waits 120 seconds when rate limit is hit
- Backloggd: Waits 300 seconds when rate limit is hit
Checking logs:
- Review
backloggd_import.logfor detailed execution history - Use
--verboseflag for more detailed console output