Introduction
Welcome to the Geotagging API documentation.
The API provides a simple interface to Geotagging.ai’s deep learning models on text-based geolocation identification.
The model accepts texts on the input and returns predicted locations in the form of geocoordinates: lattitude and longitude.
Sample Request:
If I knew the traffic is this bad, would have never moved to Camden
Sample Response:
"lat":51.536388,"lon":-0.140556
The underlying tools are built on a state-of-the-art deep learning infrastructure, on top of open-sourced solutions.
Follow our Social Media and Newsletters for the latest updates on the performance of the models.
Authentication
Geotagging.ai refers to RapidAPI’s services for the administrative processing of subscriptions and billing. Therefore, client authentication keys should also be obtained through RapidAPI.
To obtain your RapidAPI key, follow the link to subscribe.
For additional requests or technical support outside of RapidAPI’s services, contact us at [email protected]
Send Requests
import http.client
conn = http.client.HTTPSConnection("geotagging-ai1.p.rapidapi.com")
payload = "{\n \"text\": \"上海太大了住在这里\"\n}"
headers = {
'content-type': "application/json",
'X-RapidAPI-Key': "KEYXXXXXXXXXXX",
'X-RapidAPI-Host': "geotagging-ai1.p.rapidapi.com"
}
conn.request("POST", "/geotagging", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://geotagging-ai1.p.rapidapi.com/geotagging"
payload := strings.NewReader("{\n \"text\": \"上海太大了住在这里\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
req.Header.Add("X-RapidAPI-Key", "KEYXXXXXXXXXXX")
req.Header.Add("X-RapidAPI-Host", "geotagging-ai1.p.rapidapi.com")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
curl --request POST \
--url https://geotagging-ai1.p.rapidapi.com/geotagging \
--header 'X-RapidAPI-Host: geotagging-ai1.p.rapidapi.com' \
--header 'X-RapidAPI-Key: KEYXXXXXXXXXXX' \
--header 'content-type: application/json' \
--data '{
"text": "上海太大了住在这里"
}'
The above command returns JSON structured like this:
{
"text":"上海太大了住在这里",
"geotagging":
{
"lat":30.830730438232422,
"lon":116.61170196533203,
"confidence":0.9544845223426819,
"version":"2.0"
}
}
}
HTTP Request
POST https://geotagging-ai1.p.rapidapi.com/geotagging
Response fields
Response | Example | Description |
---|---|---|
lat | 30.8307 | Predicted location lattitude |
lon | 116.6117 | Predicted location longitude |
confidence | 0.95 | The measurement of the tool’s confidence of the prediction. Minimum confidence 0, maximum: 1 |
version | 2.0 | As the models are being updated regularly, the precision is being improved. Refer to this field to follow which iteration of the tool are you working with. |
Future Versions:
We are currently working on increasing the number of supported languages and accepting additional formats (.pdf, .html, etc.) for processing.
For questions on private offers or any other additional requests, please contact us at [email protected]
We’re always happy to collaborate with researchers and analysts, so if your work requires any assistance from our side, please reach out.
Restrictions
The models support over 60 languages and don’t have any restrictions on the minimum number of words/characters. The API best performs on arbitrary strings of 250 characters max.
Geotagging.ai API analyzes texts for features relevant to geolocation detection and will return the best prediction possible for the provided text’s geolocation-related features. To assess the results, please refer to the model’s confidence values.
We’re constantly working on extending the list of supported languages.