---
updatedAt: 2025-10-13T07:01:30.000Z
agentTools:
  projectIndex: https://developer.soilhive.ag/llms.txt
---

# /soil-data-by-geometry

Provides immediate access to soil data at specific small geographical area of interest defined by geometry parameter. It allows users to specify an area (a polygon, multipolygon, point, or multipoint), desired soil property, year range and data sources for synchronous soil data retrieval.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "SoilHive API Services",
    "version": "1.1.0"
  },
  "tags": [
    {
      "name": "Soil data"
    }
  ],
  "servers": [
    {
      "url": "https://api.soilhive.ag/v1",
      "description": "SoilHive API services"
    }
  ],
  "components": {
    "securitySchemes": {
      "Varda-JWT": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "A JWT access token is required."
      }
    },
    "responses": {
      "400": {
        "description": "Request is malformed. Please check parameters/payload.",
        "content": {
          "application/problem+json": {
            "schema": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "example": "Bad request"
                },
                "detail": {
                  "type": "string",
                  "example": "Parameter is missing"
                },
                "instance": {
                  "type": "string",
                  "example": "URI of this resource"
                }
              }
            }
          }
        }
      },
      "403": {
        "description": "Forbidden. Request is not authorized.",
        "content": {
          "application/problem+json": {
            "schema": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "example": "Forbidden"
                },
                "detail": {
                  "type": "string",
                  "example": "Key not authorized"
                },
                "instance": {
                  "type": "string",
                  "example": "URI of this resource"
                }
              }
            }
          }
        }
      },
      "413": {
        "description": "Payload size exceeded the threshold limit",
        "content": {
          "application/problem+json": {
            "schema": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "example": "Content Too Large"
                },
                "detail": {
                  "type": "string",
                  "example": "Payload size exceeded the threshold limit"
                },
                "instance": {
                  "type": "string",
                  "example": "URI of this resource"
                }
              }
            }
          }
        }
      },
      "500": {
        "description": "There is some internal server error. Please try again.",
        "content": {
          "application/problem+json": {
            "schema": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "example": "Internal sever error"
                },
                "detail": {
                  "type": "string",
                  "example": "An unspecified internal server error has occurred"
                },
                "instance": {
                  "type": "string",
                  "example": "URI of this resource"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "Varda-JWT": []
    }
  ],
  "paths": {
    "/soil-data-by-geometry": {
      "post": {
        "tags": [
          "Soil data"
        ],
        "description": "Provides immediate access to soil data at specific small geographical area of interest defined by geometry parameter. It allows users to specify an area (a polygon, multipolygon, point, or multipoint), desired soil property, year range and data sources for synchronous soil data retrieval.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "geometry",
                  "datasets"
                ],
                "properties": {
                  "geometry": {
                    "type": "string",
                    "description": "POINT, MULTIPOINT, POLYGON, MULTIPOLYGON, GEOMETRYCOLLECTION in Well-known text (WKT) format",
                    "example": "POLYGON ((38.790107 -3.152675, 38.789184 -3.15396, 38.791019 -3.155203, 38.792403 -3.153575, 38.790107 -3.152675))"
                  },
                  "spatialFilters": {
                    "type": "array",
                    "description": "List of spatial filters",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  },
                  "soilProperties": {
                    "type": "array",
                    "description": "Array of soil properties",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  },
                  "datasets": {
                    "type": "array",
                    "description": "Array of datasets",
                    "items": {
                      "type": "integer",
                      "example": 19
                    }
                  },
                  "startYear": {
                    "type": "integer",
                    "description": "The start year for the time range",
                    "example": 1918
                  },
                  "endYear": {
                    "type": "integer",
                    "description": "The end year for the time range",
                    "example": 2024
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request was fulfilled. Successful response payload returned",
            "content": {
              "application/ld+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "@context": {
                      "type": "string",
                      "description": "The JSON-LD context of this resource",
                      "example": "https://api.soilhive.ag/v1/core.jsonld"
                    },
                    "@id": {
                      "type": "string",
                      "description": "The node identifier of the resource",
                      "example": "https://api.soilhive.ag/v1/soil-data-by-geometry"
                    },
                    "type": {
                      "type": "string",
                      "description": "A schema.org DataFeed and a Linked Data Platform Container",
                      "example": "DataFeed"
                    },
                    "description": {
                      "type": "string",
                      "description": "A schema.org description<br>Description of the resource",
                      "example": "List of soil data rows"
                    },
                    "dataFeedElement": {
                      "type": "array",
                      "description": "A schema.org  dataFeedElement. Contains the array of soil data rows",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "A schema.org DataFeedItem and a Linked Data Platform Page",
                            "example": "DataFeedItem"
                          },
                          "item": {
                            "type": "array",
                            "description": "A schema.org item. Represents a row of data",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "A schema.org PropertyValue"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "A schema.org name. The name of the column"
                                },
                                "value": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "description": "A schema.org value. The value of the data point"
                                    },
                                    {
                                      "type": "number",
                                      "description": "A schema.org value. The value of the data point"
                                    }
                                  ]
                                },
                                "identifier": {
                                  "type": "integer",
                                  "description": "API resource identifier"
                                },
                                "unitCode": {
                                  "type": "string",
                                  "description": "A schema.org unitCode. The unit associated to the data point value"
                                }
                              }
                            },
                            "example": [
                              {
                                "type": "PropertyValue",
                                "name": "DataSource",
                                "value": "GSOCMap"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "Property",
                                "value": "soc_mean"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "Depth",
                                "value": "0-30",
                                "unitCode": "cm"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "Value",
                                "value": 230,
                                "unitCode": "dg/kg"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "Conversion",
                                "value": "varies"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "Sampling Date",
                                "value": "2022-24-01"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "Publication Date",
                                "value": "2022"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "GIS Data Type",
                                "value": "raster"
                              },
                              {
                                "type": "PropertyValue",
                                "name": "Resolution",
                                "value": 1,
                                "unitCode": "km2"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  }
}
```