Simple REST API for the tarot cards of the Rider-Waite-Smith deck
Simple REST API for the tarot cards of the Rider-Waite-Smith deck
For all your cybermysticism needs.
Provides information parsed from AE Waite's The Pictorial Key to the Tarot, meeting the OpenAPI 3 spec. This was created as a friendly introduction to REST APIs.
See below for quick start
JS:
fetch("https://tarotapi.dev/api/v1/cards/random?n=10")
.then(function (response) {
return response.json();
})
.then(function (response) {
// handle ten random cards
})
.catch(function (error) {
// handle what went wrong
});
| GET path | Result | Params |
|---|---|---|
/api/v1/ or /api/v1/cards |
return all cards | |
/api/v1/cards/:name_short |
return card with specified name_short |
minors: /swac, /wa02, ..., /cupa, /pequ, /waqu, /swki, majors /ar01, /ar02, .../ar[n] |
/api/v1/cards/search |
search all cards | q={text}, meaning={text}, meaning_rev={text} |
/api/v1/cards/random |
get random card(s) | optional n={integer <= 78} |
Get all cards with word "peace" in meaning (reversed or upright):
https://tarotapi.dev/api/v1/cards/search?meaning=peace
Get 10 random cards:
https://tarotapi.dev/api/v1/cards/random?n=10
Get the Knight of Wands:
https://tarotapi.dev/api/v1/cards/wakn
(Novice-friendly!)
You are welcome to just grab the JSON file that serves as the data source and use it for your own projects.
Clone or fork this repository and install dependencies locally. Requires Node 10.0.0 or higher, and npm 6.0.0 or higher.
git clone https://github.com/ekelen/tarot-api.git
# or [email protected]:ekelen/tarot-api.git
# -OR- click fork on this project's Github page, then:
git clone https://github.com/YOUR-USERNAME/tarot-api.git
Then:
cd tarot-api
npm install
npm run dev
If you are looking for images to complement your tarot app, the Rider Waite 1909 deck is public domain. You can find images of the cards here: https://www.sacred-texts.com/tarot/xr/index.htm
onrender URL should still work (faster).courts endpoint (no specific rank parameter required)nodemonrequire typo fixNo open issues yet, or sync has not completed.