A landmark detection API analyzes a photo and identifies famous structures, monuments, and natural wonders — along with GPS coordinates. Build travel apps, geo-tagging tools, or geographic analysis platforms with a single API call.
Why Landmark Detection?
- Auto geo-tagging — Infer location from visual content when GPS metadata is missing
- Travel apps — Point-and-identify features, auto-populated travel journals
- Cultural heritage — Catalog historical photo collections by location
- Content verification — Verify claimed photo locations against detected landmarks
Python Example
import requests
api_url = "https://landmarks-detection.p.rapidapi.com/detect-landmarks"
headers = {
"x-rapidapi-host": "landmarks-detection.p.rapidapi.com",
"x-rapidapi-key": "YOUR_API_KEY",
}
response = requests.post(
api_url,
headers={**headers, "Content-Type": "application/x-www-form-urlencoded"},
data={"url": "https://example.com/photo.jpg"},
)
data = response.json()
for lm in data["body"]["landmarks"]:
name = lm["description"]
score = lm["score"]
for loc in lm["locations"]:
lat, lng = loc["latitude"], loc["longitude"]
print(f"{name} (confidence: {score:.0%}) at {lat:.4f}, {lng:.4f}")
Response Format
{
"statusCode": 200,
"body": {
"landmarks": [
{
"description": "Statue Of Liberty",
"score": 0.82,
"locations": [
{ "latitude": 40.6892, "longitude": -74.0445 }
]
}
]
}
}
Each detection includes the landmark name, confidence score, and GPS coordinates (latitude/longitude) that you can use directly with Google Maps, Mapbox, or Leaflet.
Use Cases
- Travel photo organizer — Auto-sort vacation photos by landmark (Colosseum, Trevi Fountain, etc.)
- Real estate — Enhance listings by identifying nearby landmarks
- AR navigation — Trigger contextual overlays when users point their camera at landmarks
- Education — Interactive geography quizzes from student-uploaded photos
Tips
- Use clear, well-framed photos where the landmark is prominently visible
- Leverage GPS coordinates for reverse geocoding, weather data, or nearby POIs
- Combine with image labeling for both specific landmarks and general scene context
👉 Read the full tutorial with cURL, JavaScript examples and more use cases
Top comments (0)