Skip to content

Theminemat/rcdb_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎢 Roller Coaster Databse (RCDB) Scraper Rest API

Minimal FastAPI-based scraper for RCDB. This project provides a small API to fetch entries from rcdb.com. You can use the base URL https://rcdb.api.minemat.de for free and without registration. Or you can also selfhost it on your own server as explained below.

Overview

The API exposes endpoints to retrieve coaster data and perform quick searches for coasters and parks. Use the public API base URL for free https://rcdb.api.minemat.de

Key Endpoints

HTTP VERB PATH DESCRIPTION EXTRA
GET /coasters/id/{coaster_id} Fetches https://rcdb.com/{coaster_id}.htm and returns parsed coaster data as JSON. Returns 404 when the entry is not found (HTTPException detail: "Not found"). Responses are cached in-process for the lifetime of the server.
GET /coasters/search?q=...&limit=... Performs a RCDB quick search for coasters and returns {'query': q, 'results': [...]}. Query params: q (required), limit (optional, default: 20). Results are deduplicated.
GET /parks/search?q=...&limit=... Performs a RCDB quick search for parks and returns {'query': q, 'results': [...]}. Query params: q (required), limit (optional, default: 20). Results are deduplicated.

Detailed Documentation

Direct scrape endpoint

The /coasters/id/{coaster_id} endpoint scrapes https://rcdb.com/{coaster_id}.htm and returns a JSON object containing fields such as id, name, park, locations, stats, pictures, history, etc. See scraper.py for the exact extraction logic.

Selfhosted Setup (Windows PowerShell)

python -m venv .venv; .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
# to start the app for testing
python main.py
# to start the API during development
uvicorn main:app --reload

Run / Development

When main.py is executed directly it starts a Uvicorn server on port 7835. Example (PowerShell):

# activate venv as shown above, then:
uvicorn main:app --reload --port 7835

About

Rest API to scrape data from the Roller Coaster Database (RCDB)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages