Magic 8 Ball
Returns a Magic 8 Ball Response
GET /api/tools/magic-8-ball
https://api.cookie-api.com/api/tools/magic-8-ball
Authentication Learn how to get your API Key and use it in your requests!
URL Parameters | |
---|---|
question | The question you want to get an answer for |
curl --location 'http://api.cookie-api.com/api/tools/magic-8-ball?question=Is%20the%20earth%20round%3F' \--header 'Authorization: API_Key'
import requests
url = 'http://api.cookie-api.com/api/tools/magic-8-ball'params = {'question': 'Is the earth round?'}headers = {'Authorization': 'API_Key'}
response = requests.get(url, params=params, headers=headers)print(response.json())
const fetch = require('node-fetch');
const url = 'http://api.cookie-api.com/api/tools/magic-8-ball';const params = new URLSearchParams({ question: 'Is the earth round?'});
fetch(`${url}?${params}`, { method: 'GET', headers: { 'Authorization': 'API_Key' }}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));
package main
import ( "fmt" "io/ioutil" "log" "net/http" "net/url")
func main() { baseUrl := "http://api.cookie-api.com/api/tools/magic-8-ball" params := url.Values{} params.Add("question", "Is the earth round?")
req, err := http.NewRequest("GET", baseUrl+"?"+params.Encode(), nil) if err != nil { log.Fatal(err) } req.Header.Add("Authorization", "API_Key")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) }
fmt.Println(string(body))}
const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/api/tools/magic-8-ball?question=Is%20the%20earth%20round%3F', method: 'GET', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, (res) => { let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });});
req.on('error', (e) => { console.error(e);});
req.end();
require 'net/http'require 'json'require 'uri'
uri = URI.parse("http://api.cookie-api.com/api/tools/magic-8-ball?question=Is%20the%20earth%20round%3F")request = Net::HTTP::Get.new(uri)request["Authorization"] = "API_Key"
response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(request)}
puts JSON.parse(response.body)
use reqwest::header::HeaderMap;use reqwest::blocking::get;use std::collections::HashMap;
fn main() { let url = "http://api.cookie-api.com/api/tools/magic-8-ball?question=Is%20the%20earth%20round%3F"; let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let client = reqwest::blocking::Client::new(); let res = client.get(url).headers(headers).send().unwrap();
println!("{}", res.text().unwrap());}
Responses
{ "answer": "Not at all", "question": "Is the earth round?", "success": true}
Magic 8 Ball Responses
Below you will find all possible responses from the Magic 8 Ball Endpoint
YesNoMaybeAsk again laterDefinitelyAbsolutely notI don't think soYes, but not likelyNo, definitelyIt is certainDon't count on itWithout a doubtYes, definitelyVery doubtfulYes, in due timeNo wayThe outlook is goodThe outlook is not so goodMost likelyNot at allYes, but be cautiousI'm not sure, try againDefinitely yesDefinitely noProbablyProbably notThe answer is hazy, try againMy sources say noMy sources say yesIt's unclear, try again laterYou may rely on itYes, but with some effortNo, but there's still hopeIt’s uncertainConcentrate and ask againYes, but it will take timeNo, and there's no hopePerhapsYes, if you really want itNo, and you should reconsiderAbsolutelyMaybe notI'm not sure, but it's possibleYes, but only if conditions are rightNo, but things could changeThe future is unclearIt seems likelyThe stars are alignedThe stars are not alignedYes, but it will require effortNo, and you should avoid itAsk someone elseThe signs point to yesThe signs point to noIt’s a possibilityHighly unlikelyDefinitely notYes, but be preparedNo, and it's best to avoid itMaybe, but it's uncertainThe answer lies withinTrust your intuitionThe universe says yesThe universe says noYes, but with some reservationsNo, and it's not worth itEverything points to yesEverything points to noThe outcome is positiveThe outcome is negativeProceed with cautionGo ahead and tryThe time is not rightThe time is rightYes, but expect some obstaclesNo, and it's unlikelyThe future is brightThe future is dimIt’s a good ideaIt’s not a good ideaThe answer will surprise youYou’re on the right trackYou’re not on the right trackYes, but consider alternativesNo, and it’s a bad ideaMaybe, but proceed carefullyYes, if you take the right stepsNo, and it's not advisableThe decision is up to youLook for signs around youYes, if the conditions are metNo, but it's worth a tryEverything indicates yesEverything indicates noYes, but with a few challengesNo, and it's best to avoidYes, but be prepared for changesNo, and it's unlikely to changeIt’s not clear right nowThe response is unclearYes, with a strong possibilityNo, with a high certaintyYes, but it will take effortNo, and the chances are slimYes, but things might changeNo, and it's better to waitThe outlook is uncertainThe situation is fluidYes, if you act soonNo, and it’s not worth pursuingYes, but with considerable effortNo, and it's unlikely to succeedThe situation looks promisingThe situation looks direYes, but consider all factorsNo, and it’s not advisableYes, if you take it slowNo, and it’s best to avoidYes, but be cautiousNo, and it’s better to reconsider