Farm apps, input companies, lenders and carbon projects all ask the same first question about a field: what is the soil like? A soil data API answers it without a sampling trip, for one point or a whole field. This guide shows how to call ours, what comes back and how to read it, using real requests and responses.
What you can ask for
The ASPACE soil API covers Europe and the Middle East at 30 m resolution. At any coordinate you can ask for:
- pH (
ph), organic carbon (oc,soc) and total nitrogen (n) - Texture: clay, sand and silt (
clay,sand,silt) - Exchangeable bases: potassium, calcium, magnesium and sodium (
k,ca,mg,na)
The default depth is the topsoil, 0–30 cm. Deeper layers exist for some properties and places. Two free calls tell you what is there before you spend anything: GET /v1/soil/properties lists every property and depth, and GET /v1/soil/coverage lists the countries.
Three ways to ask
- One property at one point:
POST /v1/soil/pixel, 1 credit. Use it for a pin on a map, a form that asks for a location, or a batch of sample points. - Every property at one point:
GET /v1/soil/profile, 5 credits. The whole 0–30 cm picture in one answer. - A whole field:
POST /v1/soil/rasterwith the field's outline. You get a GeoTIFF of the property across the field plus its minimum, maximum and mean. Field maps are counted in hectare-seasons, not credits: a field counts once per 12 months, however often you call it.
There is also POST /v1/soil/groups (8 credits), which returns the same point grouped the way an agronomist reads a soil test: soil condition, nutrient status, root-zone constraints and nutrient-holding capacity.
Your first call
Sign up in the developer console with your email and a 6-digit code, then create a key. The free plan gives you 1,000 credits a month. Send the key in the X-API-Key header:
curl -X POST https://spectral.aspace.company/v1/soil/pixel \
-H "X-API-Key: $ASPACE_KEY" -H "Content-Type: application/json" \
-d '{"lat": 40.67, "lon": 16.15, "property": "ph"}'
That point is a field in Basilicata, southern Italy. Here is the answer, shortened to the fields you will use most:
{
"property": "ph",
"depth": "0-30cm",
"value": 7.79,
"nodata": false,
"uncertainty": {
"lower": 7.15,
"upper": 8.44,
"level": 0.68
},
"evidence": "benchmarked",
"evidence_note": "Tested on lab samples the map never saw, but agreement with independent lab samples is moderate (concordance 0.41): graded Good, not High.",
"vintage": {
"label": "Italy 30 m regional refit",
"generated": "2026-10-27",
"resolution_m": 30
}
}
How to read the answer
value and depth. A pH of 7.8 in the top 30 cm: slightly alkaline, as many soils in southern Italy are. Units for the other properties come in the response: g/kg for organic carbon and nitrogen, % for clay, sand and silt, mg/kg for the bases.
uncertainty. In Italy, pH, organic carbon and nitrogen come with a likely range: here the true value is likely between 7.15 and 8.44, with a 68 % chance (about 2 in 3). Show that range to your users. It tells them when a lab test is worth paying for. Elsewhere uncertainty is null, and the evidence grade below does that job.
evidence. How much testing stands behind the value: lab-tested (scored on lab samples the map never saw), benchmarked (chosen against other sources on independent lab data) or early-estimate (no independent test yet). Our confidence scale explains each one in plain words, and the accuracy page has the test figures. If your app makes decisions from soil values, use this field: treat an early estimate as a starting point, not a dose.
nodata. true means we have no value there. It is never a zero: show it as "not available".
vintage. Which model and map tile served the value, when it was made and at what resolution. Keep it with the value if you store it, so you can tell later where a number came from.
The same point outside Italy works the same way. A field in the Beauce, south of Chartres in France, reads pH 6.97, evidence benchmarked, with uncertainty: null.
The whole profile at once
curl "https://spectral.aspace.company/v1/soil/profile?lat=40.67&lon=16.15" \
-H "X-API-Key: $ASPACE_KEY"
For the Basilicata field, this returns the 14 soil properties in one list, 9 of them with a value here: organic carbon 15.8 g/kg, nitrogen 1.5 g/kg, clay 44 %, sand 12 %, silt 36 %, plus potassium, calcium and magnesium. Each one carries its own evidence, uncertainty and vintage, as in the point call. Here organic carbon is lab-tested, pH, nitrogen and texture benchmarked, and the bases early-estimate: fine for a first look, but a lab test should drive a potassium dose. Clay, sand and silt are mapped separately, so they don't always add up to exactly 100 %. A checks list flags values that contradict each other at the point, such as total carbon below organic carbon.
A whole field
Send the field's outline as GeoJSON:
curl -X POST https://spectral.aspace.company/v1/soil/raster \
-H "X-API-Key: $ASPACE_KEY" -H "Content-Type: application/json" \
-d '{"property": "ph", "depth": "0-30cm",
"geometry": {"type": "Polygon", "coordinates": [[
[16.148, 40.672], [16.153, 40.672], [16.153, 40.668],
[16.148, 40.668], [16.148, 40.672]]]}}'
The answer gives the field's statistics (here pH 7.39 to 7.99, mean 7.76, over 281 cells of 30 m) and two GeoTIFF links:
overlay_url: the raw values, for your own analysis.-9999marks cells with no data.map_url: a coloured version in Web Mercator, ready to lay on a web map.
The free plan includes 25 hectare-seasons, enough to try it on a real field. One request can cover up to 5,000 ha.
Tune it to your own lab results
If you or your users have lab results (0–30 cm samples from the last three years), POST /v1/soil/calibrate takes them and returns a correction per farm and property. Pass it with your raster calls and the map moves to agree with your labs, while keeping the variation the map sees across the field. A lab-tested property tuned with three or more labs is graded calibrated.
What to check in any soil data API
If you are comparing providers, these questions separate a map you can build on from one you can't:
- Resolution. A 30 m cell is 0.09 ha, so a map shows differences inside a field. A 250 m cell is 6.25 ha, often a whole field in one value.
- A range or a grade on every value. A number without one gives your users nothing to judge it by.
- Testing on lab samples the model never saw, published, with the figures. Ours are on the accuracy page.
- "No data" kept apart from zero.
- Provenance on every value, so you can explain a number to an auditor a year later.
- Pricing that fits your use. We charge point reads in credits and field maps in hectare-seasons, so repeated calls on the same field don't multiply the bill.
- Terms for commercial use. Our free plan is for testing and non-commercial use. Paid plans cover apps in production.
Start
Get a free key and make your first call in a few minutes, or see every endpoint and the credit table on the developers page. The console also has a Postman collection and the OpenAPI file, with a working example for every endpoint.