List the entity types a project can track
curl --request GET \
--url https://api.mentionlab.io/api/entity-typesimport requests
url = "https://api.mentionlab.io/api/entity-types"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.mentionlab.io/api/entity-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mentionlab.io/api/entity-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mentionlab.io/api/entity-types"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mentionlab.io/api/entity-types")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/entity-types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"key": "countries_cities",
"displayName": "Countries & Cities",
"status": "available",
"mentionVocab": {
"chosen": "Top pick",
"mentioned": "Favorably positioned",
"named": "Named",
"negative_mentioned": "Unfavorably positioned",
"negative_named": "Listed among the weaker options"
},
"levelVocab": [
"region",
"country",
"city"
]
}
]{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Entity Types
List the entity types a project can track
Every type with its labels, and whether the organisation can create a project of it now.
GET
/
api
/
entity-types
List the entity types a project can track
curl --request GET \
--url https://api.mentionlab.io/api/entity-typesimport requests
url = "https://api.mentionlab.io/api/entity-types"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.mentionlab.io/api/entity-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mentionlab.io/api/entity-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mentionlab.io/api/entity-types"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mentionlab.io/api/entity-types")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/entity-types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"key": "countries_cities",
"displayName": "Countries & Cities",
"status": "available",
"mentionVocab": {
"chosen": "Top pick",
"mentioned": "Favorably positioned",
"named": "Named",
"negative_mentioned": "Unfavorably positioned",
"negative_named": "Listed among the weaker options"
},
"levelVocab": [
"region",
"country",
"city"
]
}
]{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Response
Stable key, as a project's entityType stores it
Available options:
brands, brands_and_products, countries_cities, organisations, people, places, facilities, events Example:
"countries_cities"
Label for the type picker
Example:
"Countries & Cities"
available: the organisation can create a project of this type now
Available options:
available, coming_soon Example:
"available"
Label of each mention stance, worded for this type
Show child attributes
Show child attributes
Example:
{
"chosen": "Top pick",
"mentioned": "Favorably positioned",
"named": "Named",
"negative_mentioned": "Unfavorably positioned",
"negative_named": "Listed among the weaker options"
}
Tiers an entity of this type is tagged with (an entity's level), top-down; null when the type has none
Example:
["region", "country", "city"]