Developers and data engineers can use our SDG classification API to classify text fragments in multiple languages and to relate their text fragment to the SDG goals.
The API is throttled down for public use to 5 requests per second. If you need an increased rate, sent us an e-mail.
The classifier base URL is
https://aurora-sdg.labs.vu.nl/classifier/classify/<model>
The path parameter <model> needs to be replaced by one of the available model designations:
Please refer to our About the models page for further information.
The text to be classified can either be send as text-parameter in a HTTP GET request or as JSON-type content in the body of an HTTP-POST request:
{
"text": "Text to be classified"
}
HTTP GET requests have a limited path length, which depends both on the server and the client used. In order to avoid problems, we strongly suggest to use HTTP-POST requests.
Let us classify the Text “The Aurora SDG classifier rocks” with the help of some common tools.
curl --location --request POST 'https://aurora-sdg.labs.vu.nl/classifier/classify/aurora-sdg-multi' \
--header 'Content-Type: application/json' \
--data-raw '{"text": "The Aurora SDG classifier rocks"}'
import requests
import json
url = "https://aurora-sdg.labs.vu.nl/classifier/classify/aurora-sdg-multi"
payload = json.dumps({"text": "The Aurora SDG classifier rocks"})
headers = {'Content-Type': 'application/json'}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
library(httr)
headers = c('Content-Type' = 'application/json')
body = '{"text": "The Aurora SDG classifier rocks"}';
res <- VERB("POST", url = "https://aurora-sdg.labs.vu.nl/classifier/classify/aurora-sdg-multi", body = body, add_headers(headers))
cat(content(res, 'text'))
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--body-data '{"text": "The Aurora SDG classifier rocks"}}' \
'https://aurora-sdg.labs.vu.nl/classifier/classify/aurora-sdg-multi'
Aurora is a partnership of like-minded and closely collaborating research‑intensive European universities, who use their academic excellence to drive societal change.
Co-funded by the Erasmus+ Programme of the European Union
This project has received funding from the European Union´s Horizon 2020 research and innovation programme under grant agreement No 101035804
© Aurora European Universities | map by Leaflet, © OpenStreetMap contributors, © CARTO | admin | email template.