Dango API Documentation 📲 👾 💭

This is the documentation for the Dango emoji API. Don’t have an API key? Head over to the main API page and we’ll get you set up.

The Dango API is designed to be extremely simple to use, despite the complexity of the algorithms running under the hood. It consists of a set of HTTP endpoints, when sending requests to these endpoints, set the x-api-key: API_KEY header on your request, replacing API_KEY with your key.

Responses are JSON formatted.

Emoji Endpoint

URL: https://customer.getdango.com/dango/api/emoji

Dango uses neural networks to extract the meaning of a piece of text and suggest relevant emoji. More details are available in this blog post.

Returns the set of the most relevant emoji, along with a relevance score, for the input query.

Parameters
q
Required.

Query text

URL escaped text from which Dango should suggest emoji.

syn
Optional
Default 0

Whether to include synonyms.

Dango knows many words that stand in directly for emoji (for instance “pizza” -> 🍕). For some applications you might want to separately display these emoji synonyms from the regular neural-network predictions.

If you specify syn=1 your results will include the set of emoji synonyms associated with any words in the input query.

Kaomoji Endpoint

URL: https://customer.getdango.com/dango/api/query/kaomoji

Returns the set of the most relevant kaomoji (such as ¯\_(ツ)_/¯) for the input query.

Parameters
q
Required.

Query text

URL escaped text from which Dango should suggest kaomoji.

cURL Example

An example query using cURL:

Example command:

 > curl --header "x-api-key: YOUR_API_KEY"\
   "https://customer.getdango.com/dango/api/emoji?q=hello%20there&syn=1"

replacing YOUR_API_KEY with the API key that you received when signing up for the API.

Example response:

{
  "synonyms": [
    "👋"
  ],
  "results": [
    { "text": "👋", "score": 0.19969795644 },
    { "text": "🙋", "score": 0.039068382233 },
    { "text": "😊", "score": 0.015570233576 },
    { "text": "☺", "score": 0.014774873853 },
    { "text": "😃", "score": 0.013890515082 },
    { "text": "😄", "score": 0.013060585596 },
    { "text": "🖐", "score": 0.011797319166 },
    { "text": "✌", "score": 0.011733632535 },
    { "text": "📞", "score": 0.011519859545 },
    { "text": "😀", "score": 0.0111714378 }
  ]
}

Python Example

An example query in Python using the Requests library:

import requests
import json
r = requests.get("https://customer.getdango.com/dango/api/emoji",
                 params={"q": "hello there", "syn": "1"},
                 headers = {'x-api-key': 'YOUR_API_KEY'})
api_response = json.loads(r.text)
print(api_response['results'][0])

replacing YOUR_API_KEY with the API key that you received when signing up for the API.

Output:

{'text': '👋', 'score': 0.19969795644}

API Terms

Your use of this API is governed by the Dango API Terms.