😱 OMGClickbait API

OMGClickbait API is a free service to detect clickbaits. You don't need an API key to use it.

Base URL

The API base url is located at : https://www.omgclickbait.com/api/v1.0

Endpoints
POST /is_clickbait

Input :

{
    "title": "26 astuces pour paraître plus grande ! La 11ème va vous surprendre !"
}
Output :
{
    "language": "fr",
    "pred": "__label__clickbait"
}

GET /is_clickbait?t=YOUR TITLE

Output :

{
    "language": "fr",
    "pred": "__label__good_news"
}


Examples
To check if a title is clickbait, you have to send the data to this adress: http://0.0.0.0:5006/api/v1.0/is_clickbait
Here is a python code to show you the results returned by the API.

import requests
import json

url = 'https://www.omgclickbait.com/api/v1.0/is_clickbait'

# Let's try a good piece of news
title_ok = "La génération Z, une génération qui donne tout en matière de communauté"
r = requests.post(url, verify=False, json={"title": title_ok})
result_ok = json.loads(r.text)
print(result_ok)

# Let's try a clickbait
title_clickbait = "26 astuces pour paraître plus grande ! La 11ème va vous surprendre !"
r = requests.post(url, verify=False, json={"title": title_clickbait})
result_clickbait = json.loads(r.text)
print(result_clickbait)
This returned the following results in json format:

{'language': 'fr', 'prediction': '__label__good_news'}
{'language': 'fr', 'prediction': '__label__clickbait'}
Anatomy of a json
The returned json is composed of 2 fields, as follows:
{
  'language': 'fr',  # The language of the given title
  'prediction': '__label__good_news'  # The prediction of the title's class
}