DefineRota Elevation API, coğrafi koordinatlar için yükseklik verisi sağlayan RESTful bir servistir. SRTM 30m çözünürlüklü veriler ve bilinear interpolasyon ile yüksek hassasiyetli sonuçlar sunar.
Tüm API istekleri için geçerli bir token gereklidir. Token'ınızı iki şekilde gönderebilirsiniz:
GET /v1/srtm30m?locations=39.925,32.866&token=YOUR_TOKEN
X-API-Token: YOUR_TOKEN
Base URL: https://api.definerota.com
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
| locations | string | Zorunlu | Koordinatlar. Format: lat,lng veya çoklu: lat1,lng1|lat2,lng2 |
| token | string | Zorunlu | API erişim token'ınız |
API, JSON formatında yanıt döndürür:
{
"status": "OK",
"results": [
{
"dataset": "srtm30m",
"elevation": 874.52,
"location": {
"lat": 39.925,
"lng": 32.866
}
}
]
}
{
"status": "ERROR",
"error": "Token gerekli",
"code": 401
}
const token = 'YOUR_TOKEN';
const lat = 39.925;
const lng = 32.866;
fetch(`https://api.definerota.com/v1/srtm30m?locations=${lat},${lng}&token=${token}`)
.then(response => response.json())
.then(data => {
if (data.status === 'OK') {
console.log('Yükseklik:', data.results[0].elevation);
}
});
import requests
token = 'YOUR_TOKEN'
lat, lng = 39.925, 32.866
response = requests.get(
f'https://api.definerota.com/v1/srtm30m',
params={'locations': f'{lat},{lng}', 'token': token}
)
data = response.json()
if data['status'] == 'OK':
print('Yükseklik:', data['results'][0]['elevation'])
curl -X GET "https://api.definerota.com/v1/srtm30m?locations=39.925,32.866&token=YOUR_TOKEN"
# Koordinatları | ile ayırın
curl "https://api.definerota.com/v1/srtm30m?locations=39.925,32.866|41.015,28.979|38.423,27.142&token=YOUR_TOKEN"
API kullanımınız paketinize göre limitlenir:
| Paket | Günlük Limit | Aylık Limit | Koordinat/İstek |
|---|---|---|---|
| Başlangıç | 500 | 10.000 | 20 |
| Profesyonel | 2.500 | 50.000 | 50 |
| Kurumsal | 10.000 | 250.000 | 100 |
| Sınırsız | ∞ | ∞ | 100 |