delegator logo

need some answers?

try the magic eight ball

Make executive decisions easily and efficiently.

  • Accurate, well-formed results, guaranteed
  • Answers any and all questions, regardless of difficulty
  • Free API with response formats and examples
  • Perfect for vital decision making
  • All glory to the Hypnotoad!
  • Great perception and insight, for all occasions
8ball

Endpoint: https://8ball.delegator.com/magic/:format/:question
Example: https://8ball.delegator.com/magic/JSON/Should I pay this employee?
Example: https://8ball.delegator.com/magic/XML/Will I win the lottery?
Example: https://8ball.delegator.com/magic/JSON/Are showers a mandatory thing?

how to use it!

Crystal

1
#!/usr/bin/env crystal
2
require "http/client"
3
require "json"
4
require "uri"
5
6
params = URI.escape("How do I know this is real magic?")
7
response = HTTP::Client.get("https://8ball.delegator.com/magic/JSON/" + params)
8
puts JSON.parse(response.body)

Ruby

1
#!/usr/bin/env ruby
2
require 'json'
3
require 'net/http'
4
5
params = URI.encode_www_form_component('Can I ask you a question?')
6
uri = URI.join('https://8ball.delegator.com/magic/JSON/', params)
7
response = Net::HTTP.get(uri)
8
puts JSON.parse(response)

JavaScript

1
/* global fetch */
2
3
let params = encodeURIComponent("Is today going to be a good day?");
4
let uri = "https://8ball.delegator.com/magic/JSON/" + params;
5
fetch(uri)
6
  .then(response => response.json())
7
  .then(json => {
8
    console.log(json);
9
  });

Python

1
#!/usr/bin/env python3
2
import http.client
3
import json
4
import urllib.parse
5
6
conn = http.client.HTTPSConnection("8ball.delegator.com")
7
question = urllib.parse.quote('Will a black cat cross me today?')
8
conn.request('GET', '/magic/JSON/' + question)
9
response = conn.getresponse()
10
print(json.loads(response.read()))

example data

Question Answer Type
Do I have toothpaste on my sweater? Signs point to yes Affirmative
Like what you see? Don't count on it Contrary
Will the world end this weekend? Reply hazy, try again later Neutral
Are you feeling lucky? You may rely on it Affirmative
Should I ask for a raise? Outlook not so good Contrary
Did the cat drag it in? Very doubtful Contrary
Will there be more snow? It is certain Affirmative
Should I try to skateboard? Concentrate and ask again Neutral
Is it safe to talk in the meeting? Without a doubt Affirmative
Will OP Deliver? Don't count on it Contrary