Request and Response - Precisely Data Integrity Suite

Data Integrity Suite APIs

Product
Data_Integrity
Spatial_Analytics
Data_Enrichment
geo_addressing_1
Services
Spatial Analytics
Data Enrichment
Geo Addressing
ft:title
Data Integrity Suite APIs
ft:locale
en-US
PublicationType
pt_developer
copyrightfirst
2023
copyrightlast
2026

This section describes how this API works. You may want to try it out with a Free Trial Account.

This method will consume credits.
  1. HTTP Request
    • URL Composition
      • Base URL: https://api.cloud.precisely.com
      • Search At Location : /v1/spatial/searchAtLocation
    • Supported Methods: POST only
    • Rate Limit (Transactions per second): 100
    • Authentication and Input Fields: Data Integrity Suite's APIs provide multiple authentication methods. Whether you want to pass the API Key and Secret directly as part of the Basic Authentication header or use bearer tokens, you can do either using the same header. The two ways of authentication are:

      1. Basic Authentication (Using API Key and secret)
      2. Bearer Token Authentication

      For more information about authentication, see How to Authenticate and follow the instructions.

  2. Response
    • Content-type: application/geo+json

Description

The Search At Location endpoint performs a spatial search on a specified table using geometry (point, polygon, or line) to find matching features.

POST URL Format

The following format is used for HTTP POST requests:

HTTP POST:
https://api.cloud.precisely.com/v1/spatial/searchAtLocation?limit=10&offset=0 

POST BODY:
{ 
    "spatialOperation": "String", 
    "tableName": "String", 
    "attributes": Array ["attribute_1", "attribute_2", "attribute_3"], 
    "location": { 
        "format": "String", 
        "value": "Object (longitude1 latitude1, longitude2 latitude2)" 
    }, 
    "bufferDistance": "String" 
} 

Request Body Parameters

This operation takes these request body parameters.

Parameter Type Required Description
operation String No The type of spatial query. Possible values are:
  • INTERSECTS: The geometry to be returned partially overlaps the specified input geometry. (Default)
  • WITHIN: The features to be returned is entirely within the specified input geometry.
  • CONTAINS: The geometry to be returned entirely contains the specified input geometry.
tableName String Yes Name of the table containing the spatial data.
attributes String Yes The attribute names of the table to be returned in the response. More than one attribute is defined by a comma separated list. This is a simple way of limiting the amount of information in the response to include only the information requested. Each feature in the resulting feature collection will only contain the specified attributes.
Note: If (*) is specified as a value, all the attributes of the table are returned. For example,
"attributes": ["*"],
location.format String No Format of the input geometry. Possible values are:
  • WKT (Default)
  • GEOJSON
  • LonLat

    For example, "[-122.777231, 38.009251]"

  • Address

    For example, "1 GLOBAL VW, TROY NY 12180-8371, UNITED STATES OF AMERICA"

location.value Object Yes

Input geometry or address for proximity search.

  • Geometry must include the geometry type and the coordinates that should be specified in EPSG:4326 with the Longitude (for the X coordinate) and Latitude (for the Y coordinate).

    For example, "value":"POLYGON(((-96.8,30.5),(-97.7,30.5),(-97.7,29.9),(-96.8,29.9),(-96.8,30.5)))"

  • Address can be provided as a postal address string, including street, city, state, postal code, and country.

    For example, "value":"1 GLOBAL VW, TROY NY 12180-8371, UNITED STATES OF AMERICA"

location.country String No Country of the address given. This parameter is mandatory if location.format is set to address.
attributeFilter String No Specifies a filter expression to refine results based on scalar attribute values. The filter supports logical operators (AND, OR, NOT) and comparison operators such as =, <>, <, <=, >, >=, IS NULL, LIKE, BETWEEN, and IN.

For example, "elevation < 160 AND bldgtype = 'R'"

Note: Only queryable fields can be used in the filter expression.
bufferDistance String No The buffered distance around the input geometry. If specified, the parameter must include the value and the measurement unit. For example, specify 100 m to buffer the input geometry by 10 meters before performing the spatial operation.

This parameter supports positive, zero, or negative values for polygon input geometries. Negative values apply an inward buffer, which shrinks the polygon by the specified distance (for example, -10 m).

The valid distance units are:
  • mi: miles
  • km: kilometers
  • ft: feet
  • m: meters
  • nm: nautical miles

Query Parameters

This operation takes these query parameters.

Parameter Type Required Description
sortBy String No The attribute name used to order the returned results. If not specified, results are ordered by primary key ('incremental_s_no') of the table.
sortOrder String No The order to sort the returned results. Used in conjunction with the sortBy parameter. Possible values are:
  • ASC: low to high (Default value if not specified)
  • DESC: high to low
limit Integer No Maximum number of results to be returned.
  • Default, if not specified: 10
  • Min Value: 1
  • Max Value: 1000
offset Integer No Offset to apply to the limit. For example, an offset of 100 and limit of 50, returns records 100 to 149.
  • Default, if not specified: 0
  • Min Value: 0
  • Max Value: 1000

Examples

Request

https://api.cloud.precisely.com/v1/spatial/searchAtLocation?limit=10&offset=0                             
{
    "spatialOperation": "INTERSECTS",
    "tableName": "risks/flood_risk",
    "attributes": [
        "incremental_s_no", "statecode", "type", "prim_zone"
    ],
    "location": {
        "format": "WKT",
        "value": "MULTIPOLYGON (((-122.399306 37.712211, -122.398975 37.712132, -122.399007 37.712049, -122.399338 37.712127, -122.399316 37.712185, -122.399306 37.712211)))"
    },
    "bufferDistance": "2 mi",
    "attributeFilter": "prim_zone LIKE 'SH%'"
}  
https://api.cloud.precisely.com/v1/spatial/searchAtLocation?limit=10&offset=0  
{
    "spatialOperation": "WITHIN",
    "tableName": "/risks/wildfire_risk_fire_perimeter",
    "attributes": [
        "incremental_s_no", "state", "firename", "acres", "year"
    ],
    "location": {
        "format": "WKT",
        "value": "MULTIPOLYGON (((-122.399306 37.712211, -122.398975 37.712132, -122.399007 37.712049, -122.399338 37.712127, -122.399316 37.712185, -122.399306 37.712211)))"
    },
    "bufferDistance": "30 mi",
    "attributeFilter": "year BETWEEN '2020' and '2024'"
}  
https://api.cloud.precisely.com/v1/spatial/searchAtLocation?limit=10&offset=0 
{
    "spatialOperation": "INTERSECTS",
    "tableName": "properties/parcels",
    "attributes": [
         "prclid", "elevation"
    ],
    "location": {
        "format": "address",
        "value": "1 GLOBAL VW, TROY NY 12180-8371, UNITED STATES OF AMERICA",
        "country": "USA"
    },
    "bufferDistance": "1 km",
    "attributeFilter": "elevation > 200 AND elevation <= 400"
}
https://api.cloud.precisely.com/v1/spatial/searchAtLocation?limit=10&offset=0 
{
    "spatialOperation": "WITHIN",
    "tableName": "properties/parcels",
    "attributes": [
         "prclid", "elevation"
    ],
    "location": {
        "format": "address",
        "value": "1 GLOBAL VW, TROY NY 12180-8371, UNITED STATES OF AMERICA",
        "country": "USA"
    },
    "bufferDistance": "1 km",
    "attributeFilter": "elevation > 200 AND elevation <= 500"
}

Response

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025432,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025433,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025434,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025436,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025466,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025470,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025473,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025480,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025484,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 2025485,
                "statecode": "06",
                "type": "P2P",
                "prim_zone": "SHX"
            }
        }
    ],
    "responseParameters": {
        "recordsReturned": 10,
        "recordsMatched": 31,
        "bufferGeometryWKT": "POLYGON ((-122.3623846977 37.712132, -122.363631482 37.7196238719, -122.3672868687 37.7266051851, -122.3731017491 37.7326001747, -122.3806798489 37.737200292, -122.3895047329 37.7400920466, -122.3898357329 37.7401710466, -122.399306 37.7411573702, -122.4087762671 37.7401710466, -122.4176011511 37.737279292, -122.4251792509 37.7326791747, -122.4309941313 37.7266841851, -122.434649518 37.7197028719, -122.434659518 37.7196768719, -122.434681518 37.7196188719, -122.4359283023 37.712127, -122.434681518 37.7046351281, -122.4310261313 37.6976538149, -122.4252112509 37.6916588253, -122.4176331511 37.687058708, -122.4088082671 37.6841669534, -122.4084772671 37.6840889534, -122.399007 37.6831026298, -122.3895367329 37.6840889534, -122.3807118489 37.686980708, -122.3731337491 37.6915808253, -122.3673188687 37.6975758149, -122.363663482 37.7045571281, -122.363631482 37.7046401281, -122.3623846977 37.712132))"
    },
    "Metadata": [
        {
            "name": "incremental_s_no",
            "type": "Long"
        },
        {
            "name": "statecode",
            "type": "String"
        },
        {
            "name": "type",
            "type": "String"
        },
        {
            "name": "prim_zone",
            "type": "String"
        }
    ]
} 
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 9477,
                "state": "CA",
                "firename": "WHIPPLE",
                "acres": 26.82621177,
                "year": "2023"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 18128,
                "state": "CA",
                "firename": "2021 Painted Rock 21CASCUT160070",
                "acres": 148.33145224,
                "year": "2021"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 19089,
                "state": "CA",
                "firename": "San Andreas Dam Face",
                "acres": 6.62218693,
                "year": "2021"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 8610,
                "state": "CA",
                "firename": "BRUNO",
                "acres": 6.78972376,
                "year": "2020"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 16894,
                "state": "CA",
                "firename": "DEVILS GULCH",
                "acres": 16.94404067,
                "year": "2020"
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 16913,
                "state": "CA",
                "firename": "ISLAND",
                "acres": 1.43540186,
                "year": "2020"
            }
        }
    ],
    "responseParameters": {
        "recordsReturned": 6,
        "recordsMatched": 6,
        "bufferGeometryWKT": "POLYGON ((-121.8501196839 37.712132, -121.8688214752 37.8245100786, -121.9236523532 37.9292297768, -122.0108756841 38.0191546203, -122.1245473419 38.0881563796, -122.2569207912 38.1315326989, -122.2572517912 38.1316116989, -122.399306 38.1464065536, -122.5413602088 38.1316116989, -122.6737336581 38.0882353796, -122.7874053159 38.0192336203, -122.8746286468 37.9293087768, -122.9294595248 37.8245890786, -122.9294695248 37.8245630786, -122.9294915248 37.8245050786, -122.9481933161 37.712127, -122.9294915248 37.5997489214, -122.8746606468 37.4950292232, -122.7874373159 37.4051043797, -122.6737656581 37.3361026204, -122.5413922088 37.2927263011, -122.5410612088 37.2926483011, -122.399007 37.2778534464, -122.2569527912 37.2926483011, -122.1245793419 37.3360246204, -122.0109076841 37.4050263797, -121.9236843532 37.4949512232, -121.8688534752 37.5996709214, -121.8688214752 37.5997539214, -121.8501196839 37.712132))"
    },
    "Metadata": [
        {
            "name": "incremental_s_no",
            "type": "Long"
        },
        {
            "name": "state",
            "type": "String"
        },
        {
            "name": "firename",
            "type": "String"
        },
        {
            "name": "acres",
            "type": "Double"
        },
        {
            "name": "year",
            "type": "String"
        }
    ]
} 
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU7PI2DF",
                "elevation": 207,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6NLI7B",
                "elevation": 231,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU7EB86R",
                "elevation": 238,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6AOUO2",
                "elevation": 227,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6YQLLS",
                "elevation": 218,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6XBVKI",
                "elevation": 232,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU68V6YC",
                "elevation": 236,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6WR9VB",
                "elevation": 244,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU5WURLB",
                "elevation": 206,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU5L1PQ4",
                "elevation": 239,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        }
    ],
    "responseParameters": {
        "recordsReturned": 10,
        "recordsMatched": 124,
        "bufferGeometryWKT": "POLYGON ((-73.7166765976 42.682242, -73.7162597478 42.6845696167, -73.7150376063 42.6867386101, -73.7130934598 42.6886011671, -73.7105597988 42.6900303572, -73.707609288 42.6909287837, -73.704443 42.6912352203, -73.701276712 42.6909287837, -73.6983262012 42.6900303572, -73.6957925402 42.6886011671, -73.6938483937 42.6867386101, -73.6926262522 42.6845696167, -73.6922094024 42.682242, -73.6926262522 42.6799143833, -73.6938483937 42.6777453899, -73.6957925402 42.6758828329, -73.6983262012 42.6744536428, -73.701276712 42.6735552163, -73.704443 42.6732487797, -73.707609288 42.6735552163, -73.7105597988 42.6744536428, -73.7130934598 42.6758828329, -73.7150376063 42.6777453899, -73.7162597478 42.6799143833, -73.7166765976 42.682242))"
    },
    "Metadata": [
        {
            "name": "prclid",
            "type": "String"
        },
        {
            "name": "elevation",
            "type": "Integer"
        },
        {
            "name": "geocoding_latitude",
            "type": "Double"
        },
        {
            "name": "geocoding_longitude",
            "type": "Double"
        }
    ]
} 
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU7PI2DF",
                "elevation": 207,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6NLI7B",
                "elevation": 231,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6AOUO2",
                "elevation": 227,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6YQLLS",
                "elevation": 218,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6XBVKI",
                "elevation": 232,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU68V6YC",
                "elevation": 236,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU6WR9VB",
                "elevation": 244,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU5WURLB",
                "elevation": 206,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU5L1PQ4",
                "elevation": 239,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        },
        {
            "type": "Feature",
            "properties": {
                "prclid": "C000CU5ZN3XA",
                "elevation": 242,
                "geocoding_longitude": -73.704443,
                "geocoding_latitude": 42.682242
            }
        }
    ],
    "responseParameters": {
        "recordsReturned": 10,
        "recordsMatched": 95,
        "bufferGeometryWKT": "POLYGON ((-73.7166765976 42.682242, -73.7162597478 42.6845696167, -73.7150376063 42.6867386101, -73.7130934598 42.6886011671, -73.7105597988 42.6900303572, -73.707609288 42.6909287837, -73.704443 42.6912352203, -73.701276712 42.6909287837, -73.6983262012 42.6900303572, -73.6957925402 42.6886011671, -73.6938483937 42.6867386101, -73.6926262522 42.6845696167, -73.6922094024 42.682242, -73.6926262522 42.6799143833, -73.6938483937 42.6777453899, -73.6957925402 42.6758828329, -73.6983262012 42.6744536428, -73.701276712 42.6735552163, -73.704443 42.6732487797, -73.707609288 42.6735552163, -73.7105597988 42.6744536428, -73.7130934598 42.6758828329, -73.7150376063 42.6777453899, -73.7162597478 42.6799143833, -73.7166765976 42.682242))"
    },
    "Metadata": [
        {
            "name": "prclid",
            "type": "String"
        },
        {
            "name": "elevation",
            "type": "Integer"
        },
        {
            "name": "geocoding_latitude",
            "type": "Double"
        },
        {
            "name": "geocoding_longitude",
            "type": "Double"
        }
    ]
}