百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tarot-api

> 编程语言
开源

Rider-Waite-Smith牌塔罗牌的简单 REST API

399 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Rider-Waite-Smith牌塔罗牌的简单 REST API

Tarot Card API

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.


API Usage

  1. See full documentation + play with the API on SwaggerHub

  2. See below for quick start

Quick start

JS:

javascript
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
  });

Condensed documentation

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}

Examples:

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


Local development

(Novice-friendly!)

  1. You are welcome to just grab the JSON file that serves as the data source and use it for your own projects.

  2. Clone or fork this repository and install dependencies locally. Requires Node 10.0.0 or higher, and npm 6.0.0 or higher.

bash
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:

bash
cd tarot-api

npm install

npm run dev

External resources

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


Updates

2023/12/19

  • 'Tis the season for a nice domain name and a more reliable server. You can now use https://tarotapi.dev (and https://tarotapi.dev/api/v1 etc). The old onrender URL should still work (faster).

2023/05/12

  • Important render.com stopped supporting my pretty URL (), so the project must be accessed at https://tarot-api-3hv5.onrender.com/.

2023/12/30

  • Important Heroku stopped offering free dynos (), so you must replace all references to https://rws-cards-api.herokuapp.com to tarot-api.onrender.com https://tarot-api-3hv5.onrender.com (see May update) if you are using this API in your app.

2022/06/18

  • Updated Swagger docs
  • Added a courts endpoint (no specific rank parameter required)
  • Bumped nodemon
  • require typo fix

2021/01/25

  • Linted, finished, and published the Swagger documentation
  • Removed unused packages
  • Reorganized source files to remove extraneous files from build
  • Updated other documentation

2020/10/17

  • Now supports CORS, so you can use this pretty much anywhere ‍♂️

Issues· 6 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptget-requestrest-apitarot-apitarot-readings

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言