API Reference
The RiftScribe REST API provides access to the Riftbound card database. Public endpoints are freely accessible. Private endpoints power internal features and may change without notice.
Base URL: https://riftscribe.gg● Live spec loadedQuick Start
Fetch all cards with a single request:
curl "https://riftscribe.gg/api/cards?limit=10"
Search for a card by name:
curl "https://riftscribe.gg/api/cards/search?q=dragon"
Public Endpoints
OpenNo authentication required. All responses are JSON.
GET
/api/cardsPublicList cards
List cards with optional filtering by set, faction, rarity, and name search.
Query Parameters
qSearch query for card nameset_idFilter by set IDfactionFilter by factionrarityFilter by rarityis_bannedFilter by ban statuslimitMaximum number of cards to returnoffsetNumber of cards to skip▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/api/cards?q=dragon&set_id=OGN"
GET
/api/cards/searchPublicSearch cards by name (typeahead)
Search cards by name with fuzzy matching for typeahead/autocomplete functionality.
Uses PostgreSQL pg_trgm for efficient fuzzy text search. Results are ordered by:
1. Exact matches first (case-insensitive)
2. Prefix matches
3. Similarity score (fuzzy matches)
4. Alphabetical by name
Minimum query length: 2 characters
Maximum results: 20
Query Parameters
qrequiredSearch query (minimum 2 characters)typesFilter by card typeslimitMaximum results▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/api/cards/search?q=dragon"
GET
/api/cards/filtersPublicGet available filter values
Get all available distinct values for filtering cards.
Returns distinct values for:
- Sets: All set IDs in the database
- Factions: All faction values
- Rarities: All rarity levels
Useful for populating filter dropdowns with available options.
▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/api/cards/filters"
GET
/api/cards/{card_id}PublicGet a single card with details
Get detailed information for a single card.
Supported ID formats:
- Full ID: `OGN-001-298` (set-collector_number-internal_id)
- Short format: `OGN-1` or `OGN-001` (set-collector_number)
The API will normalize collector numbers, so `OGN-1` and `OGN-001` both work.
Path Parameters
card_idrequired▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/api/cards/OGN-1"
Private Endpoints
InternalThese endpoints power internal features like Riftboundle. Not intended for third-party use and may change without notice.
GET
/health/livenessPrivateLiveness probe
Check if the application is running. Used by Kubernetes liveness probes.
▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/health/liveness"
GET
/health/readinessPrivateReadiness probe
Check if the application is ready to serve traffic. Used by Kubernetes readiness probes.
▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/health/readiness"
GET
/api/riftboundle/todayPrivateGet today's puzzle
Get or create today's Riftboundle puzzle.
Returns puzzle metadata without revealing the solution.
Puzzles are generated deterministically based on the date.
▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/api/riftboundle/today"
POST
/api/riftboundle/guessPrivateSubmit a guess
Submit a guess for a Riftboundle puzzle.
The API validates the puzzle, evaluates the guess against the solution,
and stores the attempt. Returns attribute-by-attribute feedback without
revealing the solution unless the guess is correct.
Evaluation results:
- `exact`: The attribute matches exactly
- `close`: The attribute is close (for numeric values)
- `wrong`: The attribute does not match
▸ Show example▾ Hide example
curl \ -X POST \ "https://riftscribe.gg/api/riftboundle/guess"
GET
/api/riftboundle/statePrivateGet puzzle state
Get the current state of a puzzle for a user.
Returns all previous attempts and whether the puzzle is solved/finished.
Useful for refreshing the page or resuming an in-progress game.
Query Parameters
puzzle_idrequireduser_idrequired▸ Show example▾ Hide example
curl \ "https://riftscribe.gg/api/riftboundle/state?puzzle_id=1&user_id=my-session-id"
OpenAPI Spec
Machine-readable spec at /openapi.json. Interactive Swagger UI at /docs.