Get started in 3 steps
Get a key
Create a free API key in your dashboard and send it as an
X-API-Key header. Every call needs one, and it
lets us warn you before anything changes.
Your first call
Send your key in the X-API-Key header. Keep it in an
environment variable, not in your code.
curl -G https://soil.narc.gov.np/soil/api/soildata \ -H "X-API-Key: $NARC_API_KEY" \ -d lat=28.5737 -d lon=80.8068
import os
import requests
res = requests.get(
"https://soil.narc.gov.np/soil/api/soildata",
params={"lat": 28.5737, "lon": 80.8068},
headers={"X-API-Key": os.environ["NARC_API_KEY"]},
timeout=10,
)
print(res.json())