The US Distance to Wild Fire
API by GeoRiskServices.com allows you to calculate the distance of a given location to the nearest U.S. wild fires. Whether you are using geographic coordinates (latitude and longitude) or a physical address, this API provides flexibility and precision. Here’s how to use it effectively.
API Endpoint
The API can be accessed via the following endpoint:
https://www.allthingsdev.co/apimarketplace/endpoints/geo-risk-services/67b9249d563cbd684a8bf1fc
JSON Schema Overview
Required Parameters
The API accepts one of the following sets of input:
Latitude and Longitude:
lat
: Latitude (number, between -90 and 90).lon
: Longitude (number, between -180 and 180).
Address:
address
: A string representing a physical address (e.g., “1600 Pennsylvania Ave NW, Washington, DC”).
Optional Parameters
perf
: Boolean – Enables performance-related metrics. Default:false
.lines
: Boolean – Includes detailed line information in the response. Default:false
.anno
: Boolean – Includes annotations in the response. Default:true
.
Example Schema
{
"lat": 37.774929,
"lon": -122.419418,
"perf": true,
"lines": false,
"anno": true
}
Or using an address:
{
"address": "1600 Pennsylvania Ave NW, Washington, DC",
"lines": true
"perf": true,
"lines": false,
"anno": true
}
Step-by-Step Guide to Using the API
Step 1: Prepare Your Request
Choose the input method:
Use
lat
andlon
for geographic coordinates.Use
address
for a physical address.
Step 2: Send a POST Request
Send a POST request to the API endpoint with the JSON payload.
Using Latitude and Longitude:
curl --location 'https://Geo-Risk-Services.proxy-production.allthingsdev.co/usdistance2wf' \
--header 'Content-Type: application/json' \
--header 'x-apihub-key: fj1jXaBtgygVVeOXYx6F1mNcd70F00XmnLnbEvGnNr831j-t5f' \
--header 'x-apihub-host: Geo-Risk-Services.allthingsdev.co' \
--header 'x-apihub-endpoint: 75c7ce15-5f8e-4bc4-8609-0c7a10ffb306' \
--header 'Content-Type: application/json' \
--data '{
"lat":37.786638045869964,
"lon":-122.39713960721643,
"perf":true,
"lines":true,
"anno":false,
"fire_year":2016,
"fire_dist_miles":250
}'
Using an Address:
curl --location 'https://Geo-Risk-Services.proxy-production.allthingsdev.co/usdistance2wf' \
--header 'Content-Type: application/json' \
--header 'x-apihub-key: fj1jXaBtgygVVeOXYx6F1mNcd70F00XmnLnbEvGnNr831j-t5f' \
--header 'x-apihub-host: Geo-Risk-Services.allthingsdev.co' \
--header 'x-apihub-endpoint: 75c7ce15-5f8e-4bc4-8609-0c7a10ffb306' \
--header 'Content-Type: application/json' \
--data '{
"lat": 37.649415305,
"lon": -108.3617372,
"perf": true,
"lines": true,
"anno": true,
"fire_year": 2016,
"fire_dist_miles": 250
}'
Step 3: Interpret the Response
The API responds with the distance to the nearest wildfire-prone area.
Example Response:
{
"status": "success",
"db_perf_ms": 948,
"api_perf_ms": 1297,
"error": "",
"input_params": {
"lat": 37.649415305,
"lon": -108.3617372,
"address": "",
"perf": true,
"lines": true,
"anno": true,
"fire_year": 2016,
"fire_dist_miles": 250
},
"results": [
{
"src": "USFS",
"acres": 2142.83,
"agency": "USFS",
"dist_m": 0,
"dist_km": 0,
"fire_yr": "2016",
"wf_name": "LONG DRAW",
"ln_to_wf": {
"type": "LineString",
"coordinates": [
[
-108.3617372,
37.649415305
],
[
-108.3617372,
37.649415305
]
]
},
"dist_miles": 0
},
{
"src": "USFS",
"acres": 364.41,
"agency": "USFS",
"dist_m": 16116.79,
"dist_km": 16.12,
"fire_yr": "2016",
"wf_name": "KNOLLS",
"ln_to_wf": {
"type": "LineString",
"coordinates": [
[
-108.3617372,
37.649415305
],
[
-108.540368166,
37.621540978
]
]
},
"dist_miles": 10.01
},
{
"src": "USFS",
"acres": 175.75,
"agency": "USFS",
"dist_m": 22642.15,
"dist_km": 22.64,
"fire_yr": "2016",
"wf_name": "SAGE HEN",
"ln_to_wf": {
"type": "LineString",
"coordinates": [
[
-108.3617372,
37.649415305
],
[
-108.572738979,
37.534649946
]
]
},
"dist_miles": 14.07
},
{
"src": "BLM",
"acres": 23.83,
"agency": "BLM",
"dist_m": 55939.69,
"dist_km": 55.94,
"fire_yr": "2016",
"wf_name": "Squaw",
"ln_to_wf": {
"type": "LineString",
"coordinates": [
[
-108.3617372,
37.649415305
],
[
-108.993689661,
37.647760658
]
]
},
"dist_miles": 34.76
},
{
"src": "WFDSS",
"acres": 78.7,
"agency": "BIA",
"dist_m": 69514.76,
"dist_km": 69.51,
"fire_yr": "2016",
"wf_name": "Black Ridge",
"ln_to_wf": {
"type": "LineString",
"coordinates": [
[
-108.3617372,
37.649415305
],
[
-107.975361998,
37.106674611
]
]
},
"dist_miles": 43.19
}
],
"annotations": {
"annotations": [
{
"org": "US Census",
"org_link": "https://www.census.gov/",
"data_service": "https://geocoding.geo.census.gov/geocoder/",
"grs_last_udpate": "2024-08-17T22:22:32.631807+00:00"
},
{
"org": "USGS",
"org_link": "https://www.usgs.gov",
"data_service": "https://apps.nationalmap.gov/epqs/",
"grs_last_udpate": "2024-09-01T01:25:43.77738+00:00"
}
]
}
}
distance_to_wildfire
: Distance from the location to the nearest wildfire-prone area.units
: The unit of measurement for the distance (e.g., miles, kilometers).annotations
: Additional details about the nearest wildfire zone.
Use Cases
Emergency Planning: Identify wildfire risks for preparedness.
Real Estate Analysis: Assess proximity to wildfire zones for property evaluations.
Insurance: Determine wildfire risk levels for underwriting purposes.
Tips for Efficient Use
Use geographic coordinates (
lat
,lon
) for more precise results.Enable
perf
only if you need performance-related metrics.Experiment with
lines
andanno
to customize the response.
The US Distance to Wildfire API is an essential tool for understanding and mitigating wildfire risks, offering fast and reliable geospatial insights.