Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Coffee Cup Reading API

Introducing the Coffee Cup Reading API, a fascinating tool that brings the art of tasseography (coffee cup divination) into your website or application. This API delivers symbolic interpretations and spiritual insights drawn from coffee grounds, offering users a mystical and reflective experience.


Step by Step Coffee Cup Reading API Postman Testing Integration

Step by Step Coffee Cup Reading API Postman Testing Integration


API Endpoint for English

POST https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading

Guide: If you only need English, use this endpoint.


API Endpoint for other languages

POST https://astroapi-5-translator.divineapi.com/api/v2/coffee-cup-reading

Guide: If you want the response in any other language use this translator endpoint.


Supported Language Codes

Use the lan field in the request body to specify the desired response language.

Supported Reference Article:
https://support.divineapi.com/general-api-support/translating-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
zhChinese
jaJapanese
arArabic
ruRussian
ptPortuguese
esSpanish
frFrench
deGerman
itItalian
nlDutch
plPolish
trTurkish
ukUkrainian
huHungarian
grGreek
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada
taFilipino/Tagalog
bahIndonesian

Guide: To manage translations and localization, update settings using the DivineAPI Translator.


Headers

NameTypeDescription
Authorization*StringYour API Access Token. Example: Bearer {token}

Request Body

NameTypeDescription
api_key*StringYour DivineAPI key, available from your dashboard.
lanStringLanguage code as per the table above. Default is en.

200: OK Successful

{
    "success": 1,
    "data": {
        "prediction": {
            "present_title": "Mountain",
            "present_image": "https://divineapi.com/public/api-assets/coffee_cup/67.png",
            "present_content": "While facing your deepest fears in pursuit of achieving more and more, a point arrives in the journey when you are confronted with the mountains. Mountains in a coffee cup reading are representative of hurdles that limit seeking your movement. But only if you keep walking further with the right vision, can you be able to turn the same hurdles into wonderful possibilities for yourself. ",
            "near_future_title": "Aircrafts",
            "near_future_image": "https://divineapi.com/public/api-assets/coffee_cup/24.png",
            "near_future_content": "Vacations, travel, and journeys are usually determined by aviation. Expect to be whisked away to a vacation spot. You're in for some new adventures. This could also indicate that something positive is about to happen in your life. You may go through a life-altering transformation within. With wide arms, embrace the change.",
            "distant_future_title": "Crown",
            "distant_future_image": "https://divineapi.com/public/api-assets/coffee_cup/43.png",
            "distant_future_content": "That studded jewelry on your head may be seen as a prize for a position, but it is more than simply a favor; it is a blessing disguised. The concealment is in the number of duties that the ornament carries. It is more than simply a beautiful identity; it is a loaded stone of expectations and obligations that calls humanity's destiny into question. The true difficulty is to remain grounded in the face of this high-headed element."
        }
    }
}

Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="{Your API Key}"' \
--form 'lan="en"'

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading',
  'headers': {
    'Authorization': 'Bearer {Your Auth Token}'
  },
  formData: {
    'api_key': '{Your API Key}',
    'lan': 'en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

JavaScript jQuery AJAX

var form = new FormData();
form.append("api_key", "{Your API Key}");
form.append("lan", "en");

var settings = {
  "url": "https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {Your Auth Token}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading"

payload = {'api_key': '{Your API Key}',
'lan': 'en'}

headers = {
  'Authorization': 'Bearer {Your Auth Token}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl -X POST "https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading" \
  -H "Authorization: Bearer {Your Auth Token}" \
  --form 'api_key="{Your API Key}"' \
  --form 'lan="en"'
const FormData = require('form-data');
const axios = require('axios');

const form = new FormData();
form.append('api_key', '{Your API Key}');
form.append('lan', 'en');

const response = await axios.post('https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading', form, {
  headers: {
    ...form.getHeaders(),
    'Authorization': 'Bearer {Your Auth Token}',
  }
});

console.log(response.data);
import requests

url = "https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading"
headers = {
    "Authorization": "Bearer {Your Auth Token}",
}
payload = {
    "api_key": "{Your API Key}",
    "lan": "en",
}

response = requests.post(url, headers=headers, data=payload)

print(response.json())
const formData = new FormData();
formData.append('api_key', '{Your API Key}');
formData.append('lan', 'en');

const response = await fetch('https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading', {
  method: 'POST',
  headers: {
      'Authorization': "Bearer {Your Auth Token}",
    },
  body: formData,
});

const data = await response.json();
console.log(data);
<?php

use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('POST', 'https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading', [
    'headers' => [
        'Authorization' => 'Bearer {Your Auth Token}',
    ],
    'multipart' => [
        ['name' => 'api_key', 'contents' => '{Your API Key}'],
        ['name' => 'lan', 'contents' => 'en'],
    ],
]);

echo $response->getBody();
package main

import (
    "bytes"
    "fmt"
    "mime/multipart"
    "net/http"
    "io"
)

func main() {
    body := &bytes.Buffer{}
    writer := multipart.NewWriter(body)
    writer.WriteField("api_key", "{Your API Key}")
    writer.WriteField("lan", "en")
    writer.Close()

    req, _ := http.NewRequest("POST", "https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading", body)
    req.Header.Set("Content-Type", writer.FormDataContentType())
    req.Header.Set("Authorization", "Bearer {Your Auth Token}")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body2, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body2))
}
import okhttp3.*;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient();

        RequestBody body = new MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("api_key", "{Your API Key}")
            .addFormDataPart("lan", "en")
            .build();

        Request request = new Request.Builder()
            .url("https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading")
            .post(body)
            .addHeader("Authorization", "Bearer {Your Auth Token}")
            .build();

        Response response = client.newCall(request).execute();
        System.out.println(response.body().string());
    }
}
import Foundation

let url = URL(string: "https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer {Your Auth Token}", forHTTPHeaderField: "Authorization")

let boundary = "Boundary-\(UUID().uuidString)"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")

var bodyData = Data()
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"api_key\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("{Your API Key}\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"lan\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("en\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)--\r\n".data(using: .utf8)!)
request.httpBody = bodyData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()
import okhttp3.*

fun main() {
    val client = OkHttpClient()

    val body = MultipartBody.Builder()
        .setType(MultipartBody.FORM)
        .addFormDataPart("api_key", "{Your API Key}")
        .addFormDataPart("lan", "en")
        .build()

    val request = Request.Builder()
        .url("https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading")
        .post(body!!)
        .addHeader("Authorization", "Bearer {Your Auth Token}")
        .build()

    client.newCall(request).execute().use { response ->
        println(response.body?.string())
    }
}
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer {Your Auth Token}");

        var content = new MultipartFormDataContent();
        content.Add(new StringContent("{Your API Key}"), "api_key");
        content.Add(new StringContent("en"), "lan");

        var response = await client.PostAsync("https://astroapi-5.divineapi.com/api/v2/coffee-cup-reading", content);
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
Response 200
{
    "success": 1,
    "data": {
        "prediction": {
            "present_title": "Trees",
            "present_image": "https://divineapi.com/public/api-assets/coffee_cup/89.png",
            "present_content": "A Tree is a living creature that grows slowly and steadily but evolves into something beautiful in its own right time. The presence of the Tree in your saucer depicts the same in terms of your life. You are currently evolving in your shell. With time you will be blessed with the fruits of your labor. When you do, you will enjoy life to its fullest. You will be at peace with yourself with happiness settling around you. Things may take time to come into action, but they surely will portray and play out just the way you envisioned. You are strong and confident and change will take its own pace, just the way you like. In the meantime, go with the flow!",
            "near_future_title": "Car",
            "near_future_image": "https://divineapi.com/public/api-assets/coffee_cup/36.png",
            "near_future_content": "Excellent success awaits you in the future. Your fortune and fate are on your side. There is the possibility of certain travel possibilities. Time is beneficial to you, and you will be happy to be in the presence of a beautiful moment. The future will bring fresh chances and good fortune.",
            "distant_future_title": "Compass",
            "distant_future_image": "https://divineapi.com/public/api-assets/coffee_cup/40.png",
            "distant_future_content": "For some, the goal is more important than the voyage itself, but once you discover and consider it, you'll understand that this is all about getting to the appropriate places. Attempting to point out directions may appear simple, but it is also risky since it is only the clue you are permitted to take, but the endpoint and route are something you will have to work out on your own."
        }
    }
}