/v1/resources/{resourceId}.{fileFormat}

Returns roof age information for the resource ID within the supplied AOI

This endpoint enables you to retrieve roof age information for the resource ID within the supplied Area of Interest (AOI).

Endpoint

https://api.nearmap.com/ai/roofage/v1/resources/{resourceId}.{fileFormat}

Path parameters

  • resourceId (string, required): The unique identifier of the survey resource to analyze for roof age data
  • fileFormat (string, required): Output format for the response. Currently only geojson is supported.

Request body parameters

The request body must contain either an address OR an aoi parameter (not both).

ParameterTypeRequiredDefaultDescription
addressAddress object✔*N/AAddress information for the property to analyze. Required if aoi is not specified.
aoiAOI Geometry object✔*N/AGeographic area of interest definition. Required if address is not specified.
cursorstringN/AOptional cursor for pagination. Should be omitted on the first request, and set to the value of nextCursor from the previous response for subsequent requests.
limitinteger1000Optional maximum number of features to return. If not set, a default of 1000 is used. If results exceed the limit, the response will be paginated.

*Either address or aoi is required, but not both.

Address Object

The address object must contain all of the following fields:

FieldTypeRequiredDescription
streetAddressstringThe street address for a geocoded request. Should consist of the street number, street name, and street type.
citystringThe city, suburb, or locality for a geocoded request.
statestringThe two-letter state code for a geocoded request.
zipCodestringThe five-digit ZIP code or nine-digit ZIP+4 code for US addresses or the four-digit postal code for AU addresses for a geocoded request.
countrystringThe two-letter country code for the geocoded request. Only supports US and AU.

Example:

{
  "streetAddress": "422 Towne Park Trl",
  "city": "Austin",
  "state": "TX",
  "zipCode": "78751",
  "country": "US"
}

AOI Geometry Object

The AOI geometry object defines a geographic area of interest using GeoJSON polygon format.

FieldTypeRequiredDescription
geometryGeoJSON GeometryA GeoJSON object representing the requested AOI. Must be a GeoJSON polygon with no interior rings.

Example:

{
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-97.72889712645727, 30.30097004106024],
      [-97.72891413685106, 30.30094441770939],
      [-97.7286977067365, 30.300846611442992],
      [-97.7286821440362, 30.300871609858902],
      [-97.72889712645727, 30.30097004106024]
    ]]
  }
}

Response

The response returns roof age information in GeoJSON format with the following structure:

  • features: Array of feature objects containing roof age data
  • nextCursor: Cursor for fetching the next page of results (only present when there are more results)
  • type: Response type (typically "FeatureCollection")
  • resourceId: The resource ID used for the request
  • address: Canonical address information (when address was provided in request)

Each feature in the response includes properties such as:

  • installationDate: Predicted roof installation date
  • trustScore: Confidence score for the prediction
  • evidenceType: Type of evidence used for the prediction
  • numberOfCaptures: Number of image captures used in analysis