The Tarot API returns tarot readings with hosted card images as JSON, in 25 languages. It covers daily tarot, yes or no tarot and love, career and life readings (20 reading types), plus fortune cookie, coffee cup reading and zodiac love compatibility.
Verified live against the DivineAPI API on 2 October 2026.
Part of DivineAPI: 300+ endpoints across 8 domains, Horoscope and Tarot 40+.
1. Get your keys. Start the 14-day free trial (credit card required to activate the trial) at divineapi.com/start-trial, then copy your API key and auth token from the dashboard.
Every request is a POST with multipart/form-data, the auth token in the Authorization: Bearer header and the API key in the api_key form field.
Runnable files: examples/ (curl, Python, Node.js, PHP).
2. curl (draw today's card)
curl -s -X POST "https://astroapi-5.divineapi.com/api/v2/daily-tarot" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-F "api_key=YOUR_API_KEY"3. Python (requests)
import requests
resp = requests.post(
"https://astroapi-5.divineapi.com/api/v2/daily-tarot",
headers={"Authorization": "Bearer YOUR_AUTH_TOKEN"},
files={"api_key": (None, "YOUR_API_KEY")}, # multipart/form-data
timeout=30,
)
body = resp.json()
if body.get("success") != 1: # astroapi-5 always answers HTTP 200
raise SystemExit(body)
card = body["data"]
print(f'{card["card"]} ({card["category"]})')
print("image:", card["image"])
print("love:", card["love"][:100], "...")Node.js (18+, built-in fetch)
async function dailyTarot() {
const form = new FormData();
form.append("api_key", "YOUR_API_KEY");
const res = await fetch("https://astroapi-5.divineapi.com/api/v2/daily-tarot", {
method: "POST",
headers: { Authorization: "Bearer YOUR_AUTH_TOKEN" },
body: form,
});
const body = await res.json();
if (body.success !== 1) throw new Error(JSON.stringify(body)); // check the body, not the HTTP status
return body.data;
}
dailyTarot().then((card) => {
console.log(`${card.card} (${card.category})`);
console.log("image:", card.image);
console.log("career:", card.career.slice(0, 100) + "...");
});4. PHP (cURL)
<?php
$ch = curl_init("https://astroapi-5.divineapi.com/api/v2/daily-tarot");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_AUTH_TOKEN"],
CURLOPT_POSTFIELDS => ["api_key" => "YOUR_API_KEY"], // sent as multipart/form-data
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($body["success"] ?? 0) !== 1) { exit(print_r($body, true)); }
$card = $body["data"];
echo "{$card['card']} ({$card['category']})\n";
echo "<img src=\"{$card['image']}\" alt=\"{$card['card']}\">\n";Daily tarot, live response (trimmed). category is Upright or Reverse; image and image2 are hosted card images.
{
"success": 1,
"data": {
"card": "JUDGEMENT",
"category": "Reverse",
"career": "This card says that you will definitely face problems at work and loss in money...",
"love": "The card indicates that your relationship is definitely going through a rough patch...",
"finance": "This card indicates that it is a reminder to save money...",
"image": "https://divineapi.com/admin/uploads/daily_tarot/154_2.jpg",
"image2": "https://divineapi.com/admin/uploads/daily_tarot/154.jpg"
}
}Yes or no tarot, same call shape (/api/v2/yes-or-no-tarot):
curl -s -X POST "https://astroapi-5.divineapi.com/api/v2/yes-or-no-tarot" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-F "api_key=YOUR_API_KEY"{
"success": 1,
"data": {
"prediction": {
"card": "SEVEN OF CUPS",
"category": "Upright",
"yes_no": "YES",
"result": "You would be capable of bringing your imagination to life...",
"image": "https://divineapi.com/admin/uploads/yes_no_tarot/43_2.jpg",
"image2": "https://divineapi.com/admin/uploads/yes_no_tarot/43.jpg"
}
}
}A v3 reading returns a cards list (/api/v3/in-depth-love-reading):
curl -s -X POST "https://astroapi-5.divineapi.com/api/v3/in-depth-love-reading" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-F "api_key=YOUR_API_KEY"{
"success": 1,
"data": {
"cards": [
{
"card": "THE HERMIT",
"result": "Take your time and enjoy the moment with your partner. There's no need to rush into anything...",
"image": "https://divineapi.com/admin/uploads/tarot_daily_love/10.png"
}
]
}
}- A "card of the day" widget with the card image, upright or reversed, and love, career and finance text.
- A yes or no question box that shows the card and a
YES/NOverdict. - A love section: in-depth love, flirt, ex-flame, heartbreak, love triangle and zodiac love compatibility.
- A past, present and future three-card spread with keywords and advice per card.
- Localised tarot in Hindi, Spanish, Arabic or any of the 25 languages from one integration.
All on astroapi-5.divineapi.com (English) or astroapi-5-translator.divineapi.com (25 languages). Mind the version: some readings are v2, others v3. Paths are from the OpenAPI spec.
Every row takes api_key and optional lan; extra fields are listed.
| Reading | Path | Extra fields | Returns | Docs |
|---|---|---|---|---|
| Daily tarot | /api/v2/daily-tarot |
none | card, category, career, love, finance, image, image2 | docs |
| Yes or no tarot | /api/v2/yes-or-no-tarot |
none | prediction | docs |
| Career daily reading | /api/v3/career-daily-reading |
none | cards | docs |
| Power life reading | /api/v3/power-life-reading |
none | cards | docs |
| Past-present-future reading | /api/v3/past-present-future-reading |
card_image |
prediction | docs |
| Wisdom reading | /api/v2/wisdom-reading |
card_image |
prediction | docs |
| Know your friend reading | /api/v3/know-your-friend-reading |
none | cards | docs |
| In-depth love reading | /api/v3/in-depth-love-reading |
none | cards | docs |
| Flirt love reading | /api/v3/flirt-love-reading |
none | cards | docs |
| Erotic love reading | /api/v3/erotic-love-reading |
none | cards | docs |
| Made for each other or not | /api/v3/made-for-each-other-or-not-reading |
none | cards | docs |
| Ex-flame reading | /api/v3/ex-flame-reading |
none | prediction | docs |
| Heartbreak reading | /api/v2/heartbreak-reading |
card_image |
prediction | docs |
| Love triangle reading | /api/v2/love-triangle-reading |
card_image |
prediction | docs |
| Dream Come True Reading (1 to 5 cards about a wish: love, hopes, goals) | /api/v3/dream-come-true-reading |
none | cards | docs |
| Past lives connection reading | /api/v3/past-lives-connection-reading |
none | cards | docs |
| Divine Angel Reading (angel-card reading with a short message of encouragement) | /api/v3/divine-angel-reading |
none | cards | docs |
| Divine magic reading | /api/v2/divine-magic-reading |
card_image |
prediction | docs |
| Egyptian prediction | /api/v3/egyptian-prediction |
none | cards | docs |
| Which animal are you reading | /api/v2/which-animal-are-you-reading |
full_name, day, month, year |
prediction | docs |
| Reading | Path | Extra fields | Returns | Docs |
|---|---|---|---|---|
| Love compatibility (by zodiac sign) | /api/v2/love-compatibility |
sign_1, sign_2 |
prediction | docs |
| Fortune cookie | /api/v2/fortune-cookie |
none | prediction | docs |
| Coffee cup reading | /api/v2/coffee-cup-reading |
none | prediction | docs |
Horoscopes (daily, weekly, monthly, yearly, Chinese, numerology) are in horoscope-api.
Card images are hosted URLs inside the response, so you can put them straight into an <img> tag.
| Endpoint shape | Image fields |
|---|---|
| Daily tarot, yes or no tarot | image and image2 (the card in its two orientations) |
v3 readings with cards |
image on each card |
| Past-present-future | image on past, present and future |
| Wisdom reading | card1_image, card2_image |
| Which animal are you | image |
| Coffee cup reading | present_image, near_future_image, distant_future_image |
On readings that take card_image, it picks the card art style: 1, 2 or 3 (default 1). Live check on the wisdom reading: 1 returned 13.png, 2 returned 21_2.jpg and 3 returned 11_3.jpg image files.
Past-present-future, live response (card_image=1, trimmed):
{
"success": 1,
"data": {
"prediction": {
"past": {
"card": "THE LOVERS",
"image": "https://divineapi.com/admin/uploads/past_present_future/137_2.jpg",
"summary": "In the past, The Lovers card suggests a time of significant choice and introspection...",
"keywords": ["Choice", "Union", "Commitment"],
"advice": "Reflect on past choices for clarity and growth in your current relationships."
},
"present": { "card": "KNIGHT OF WANDS", "image": "...", "summary": "...", "keywords": ["..."], "advice": "..." },
"future": { "card": "SEVEN OF SWORDS", "image": "...", "summary": "...", "keywords": ["..."], "advice": "..." }
}
}
}To get a reading in Hindi, Spanish or another of the 25 languages, call astroapi-5-translator.divineapi.com with the same v2 or v3 path and add lan. On astroapi-5, a non-English lan returns success: 2. The translator answers in 25 to 35 seconds, so give your HTTP client 60 seconds.
import requests
resp = requests.post(
"https://astroapi-5-translator.divineapi.com/api/v2/daily-tarot",
headers={"Authorization": "Bearer YOUR_AUTH_TOKEN"},
files={"api_key": (None, "YOUR_API_KEY"), "lan": (None, "hi")},
timeout=60, # the translator can take 25-35 s
)
card = resp.json()["data"]
print(card["card"], "|", card["category"])
print(card["image"])Live response in Hindi (trimmed):
{
"success": 1,
"data": {
"card": "दो तलवारें",
"category": "सीधा",
"career": "लोग अपने करियर की योजना बनाने में व्यस्त हो सकते हैं...",
"love": "...",
"finance": "...",
"image": "https://divineapi.com/admin/uploads/daily_tarot/64_2.jpg",
"image2": "https://divineapi.com/admin/uploads/daily_tarot/64.jpg"
}
}Check the codes before you map from ISO, because DivineAPI uses its own: tm is Tamil and ta is Filipino, with ma for Marathi, tl for Telugu, gr for Greek and bah for Indonesian.
| Code | Language | Code | Language | Code | Language |
|---|---|---|---|---|---|
en |
English | de |
German | bn |
Bengali |
hi |
Hindi | it |
Italian | ma |
Marathi |
zh |
Chinese | nl |
Dutch | tm |
Tamil |
ja |
Japanese | pl |
Polish | tl |
Telugu |
ar |
Arabic | tr |
Turkish | ml |
Malayalam |
ru |
Russian | uk |
Ukrainian | kn |
Kannada |
pt |
Portuguese | hu |
Hungarian | ta |
Filipino |
es |
Spanish | gr |
Greek | bah |
Indonesian |
fr |
French |
- v2 or v3: use the exact path from the table. The love, career and life readings are mostly v3; daily tarot, yes or no, wisdom, heartbreak, love triangle, divine magic, which animal, love compatibility, fortune cookie and coffee cup are v2.
- Check
success, not the HTTP status. astroapi-5 always answers HTTP 200:success: 1ok,2validation error,3auth error (readmsg). Do not retry on3; fix the key or token. - Random draws: each call draws a new card. To keep one card per user per day, cache the first response keyed by user and date.
- Three response shapes: flat
data(daily tarot),data.prediction(most v2 readings, plus ex-flame and past-present-future),data.cardslist (the other v3 readings). Read the Returns column above. sign_1/sign_2on love compatibility take zodiac names (for examplearies,leo).
These older single-reading repos are being archived. Their readings now live in this repo:
| Old repo | Endpoint here |
|---|---|
| daily-tarot | /api/v2/daily-tarot |
| yes-or-no-tarot | /api/v2/yes-or-no-tarot |
| fortune-cookie | /api/v2/fortune-cookie |
| coffee-cup-reading | /api/v2/coffee-cup-reading |
The old URLs in those repos are replaced by the paths above. The API key goes in the form body, never in the URL.
pip install divineapi
npm install divineapi
composer require divineapi/divineapi
The examples above use plain HTTP so they work in any language. SDK repos: divineapi-python, divineapi-node, divineapi-php.
MCP server (Horoscope, Tarot and Numerology) for Claude, Cursor, VS Code and other MCP clients:
https://mcp.divineapi.com/horoscope/mcp
Setup steps: mcp-horoscope-numerology.
Part of the Tarot plans: Tarot Basic, Tarot Essentials and Tarot Gold. Coffee Cup Reading, Fortune Cookie and Love Compatibility are separate plans in the website's Trending Now section. Compare what each plan includes at divineapi.com/pricing.
Is every reading random? Card draws are random per call. Love compatibility depends on the two signs you send, and which animal are you depends on the name and date you send.
Do I need to host card images?
No. Each response carries image URLs on divineapi.com; embed them directly.
My Hindi tarot request returns success: 2. What is wrong?
The reading went to astroapi-5, which answers in English only. Send the same path to astroapi-5-translator.divineapi.com with lan=hi.
What happened to the daily-tarot, yes-or-no-tarot, fortune-cookie and coffee-cup-reading repos? They are being archived; their endpoints are listed in Moved here from.
Are card names translated too?
Yes. On the translator host the card name and category come back in the requested language (with lan=hi, for example दो तलवारें and सीधा); the image URLs stay the same.
How can I test tarot readings before buying?
Start the 14-day free trial (credit card required to activate the trial) and call daily-tarot with only your key and token. Tarot Basic, Tarot Essentials and Tarot Gold prices are on divineapi.com/pricing.
| Repo | What it covers |
|---|---|
| astrology-api | Overview of all DivineAPI products |
| horoscope-api | Daily, weekly, monthly, yearly, Chinese and numerology horoscopes |
| birth-chart-api | Western natal chart: planets, houses, aspects, wheel |
| kundli-api | Vedic birth chart (kundli) |
| numerology-api | Numerology numbers and reports |
| panchang-api | Panchang, muhurat, choghadiya |
| mcp-horoscope-numerology | MCP server for horoscope, tarot and numerology |
- Docs: developers.divineapi.com
- Postman collection: documenter.getpostman.com/view/26759678/2sBYAysU8Y
- Help centre: support.divineapi.com
- API status: status.divineapi.com
- Product page: divineapi.com/tarot/tarot-api
DivineAPI was founded in 2021 in New Delhi, India, and serves 600+ businesses.
Code samples in this repository are released under the MIT License (see LICENSE). The DivineAPI name and logo are trademarks of DivineAPI.
