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.
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. |
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.
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 --reloadWhen 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