---
updatedAt: 2026-06-24T00:17:24.000Z
agentTools:
  projectIndex: https://developer.nearmap.com/llms.txt
---

# /v4 /rollups.json

Returns aggregated (rolled up) values computed from all AI features within the given polygon/address and date range.

***Returns aggregated (rolled up) values computed from all AI features within the given polygon/address and date range.***

***

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "AI Feature API.",
    "description": "Serves Nearmap AI Features.\n",
    "version": "4.0.0",
    "contact": {
      "email": "apiteam@nearmap.com"
    }
  },
  "servers": [
    {
      "description": "Production",
      "url": "https://api.nearmap.com/ai/features/v4"
    }
  ],
  "security": [
    {
      "APIKeyQuery": []
    },
    {
      "APIKeyHeader": []
    },
    {
      "TXV3TokenHeader": []
    }
  ],
  "tags": [
    {
      "name": "rollups"
    }
  ],
  "paths": {
    "/rollups.json": {
      "get": {
        "tags": [
          "rollups"
        ],
        "summary": "/v4 /rollups.json",
        "description": "Returns aggregated (rolled up) values computed from all AI features within the given polygon/address and date range.",
        "operationId": "getRollupsJSONByDate",
        "parameters": [
          {
            "$ref": "#/components/parameters/optionalPolygon"
          },
          {
            "$ref": "#/components/parameters/since"
          },
          {
            "$ref": "#/components/parameters/until"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/bulk"
          },
          {
            "$ref": "#/components/parameters/packs"
          },
          {
            "$ref": "#/components/parameters/classes"
          },
          {
            "$ref": "#/components/parameters/streetAddress"
          },
          {
            "$ref": "#/components/parameters/city"
          },
          {
            "$ref": "#/components/parameters/state"
          },
          {
            "$ref": "#/components/parameters/zip"
          },
          {
            "$ref": "#/components/parameters/country"
          },
          {
            "$ref": "#/components/parameters/reference"
          },
          {
            "$ref": "#/components/parameters/systemVersion"
          },
          {
            "$ref": "#/components/parameters/systemVersionPrefix"
          },
          {
            "$ref": "#/components/parameters/alpha"
          },
          {
            "$ref": "#/components/parameters/beta"
          },
          {
            "$ref": "#/components/parameters/3dCoverageFeature"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/rollups_json_ok"
          },
          "400": {
            "$ref": "#/components/responses/features_bad_request"
          },
          "401": {
            "$ref": "#/components/responses/generic_unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/generic_forbidden"
          },
          "404": {
            "$ref": "#/components/responses/features_not_found"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "APIKeyQuery": {
        "name": "apikey",
        "type": "apiKey",
        "in": "query"
      },
      "APIKeyHeader": {
        "name": "Authorization",
        "type": "apiKey",
        "in": "header",
        "description": "Header value in the format 'Apikey <api_key>'"
      },
      "TXV3TokenHeader": {
        "name": "Authorization",
        "type": "apiKey",
        "in": "header",
        "description": "Header value in the format 'Transaction {transactionToken}'.\ntransactionToken is tx v3 token from the response to a previous call to the property resources service.\n"
      }
    },
    "schemas": {
      "RollupsJSONResult": {
        "type": "object",
        "properties": {
          "systemVersion": {
            "type": "string",
            "description": "The version of the system used to generate the AI data."
          },
          "perspective": {
            "type": "string",
            "description": "The perspective that was used to generate the AI data."
          },
          "resourceId": {
            "type": "string",
            "description": "The ID of the survey resource."
          },
          "surveyId": {
            "type": "string",
            "description": "The ID of the survey associated with the survey resource."
          },
          "surveyDate": {
            "type": "string",
            "description": "The date of the survey capture.",
            "format": "date",
            "example": "2019-09-27"
          },
          "credits": {
            "type": "integer",
            "example": 1,
            "description": "The number of credits used for this request."
          },
          "link": {
            "type": "string",
            "example": "https://apps.nearmap.com/maps/#/@-33.7251728,151.2955012,20.00z,0d/V/20190927",
            "description": "The MapBrowser link to the location that was requested."
          },
          "rollups": {
            "$ref": "#/components/schemas/JSONRollups"
          },
          "geomatchedAddress": {
            "type": "string",
            "example": "10897 S River Front Pkwy Ste 150, South Jordan, UT 84095-5650, USA",
            "description": "Matched address used for geocoded requests."
          },
          "reference": {
            "type": "string",
            "example": "123456",
            "description": "The reference passed in via the X-Nearmap-Ext-Reference request\nheader value, if it is present. It is up to the user to track the\nsemantics of this field. E.g. they may wish to interpret it as an\ninsurance policy ID.\n"
          },
          "extentMinX": {
            "type": "number",
            "description": "Approximate minimum longitude of the AOI extent."
          },
          "extentMinY": {
            "type": "number",
            "description": "Approximate minimum latitude of the AOI extent."
          },
          "extentMaxX": {
            "type": "number",
            "description": "Approximate maximum longitude of the AOI extent."
          },
          "extentMaxY": {
            "type": "number",
            "description": "Approximate maximum latitude of the AOI extent."
          },
          "prerelease": {
            "type": "boolean",
            "description": "Indicates whether or not the system version used to serve the\nrequest is a preview release. If it's not a preview release, then\nit's a regular GA release. This field is only populated if the\nalpha or beta request query parameters are set to true or a preview\nrelease is explicitly requested.\n"
          }
        },
        "required": [
          "systemVersion",
          "perspective",
          "resourceId",
          "surveyId",
          "surveyDate",
          "credits",
          "link",
          "rollups",
          "extentMinX",
          "extentMinY",
          "extentMaxX",
          "extentMaxY"
        ]
      },
      "JSONRollups": {
        "type": "object",
        "description": "The set of aggregated values computed out of AI features at the location requested.\n\nThe rollups can be grouped by one or more combinations of the feature class (e.g. roof),\nprimary feature of the requested location (e.g. primary), feature attributes (e.g. 3D),\nor feature components (e.g. roof pitch).\n",
        "additionalProperties": {
          "$ref": "#/components/schemas/JSONRollup"
        }
      },
      "JSONRollup": {
        "type": "object",
        "description": "A single aggregated value computed out of AI features at the location requested,\nkeyed by a unique and stable ID designed for programmatic use cases.\n",
        "properties": {
          "value": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The computed aggregated value for the rollup.\n\nThis value can be \"null\"; for example, when no roof feature is detected\nin the requested location, its confidence will be set to \"null\".\n",
            "example": 170.9
          },
          "description": {
            "type": "string",
            "description": "A human-readable description of the rollup.",
            "example": "total clipped area (sq. m) of solar panel"
          }
        },
        "required": [
          "value",
          "description"
        ]
      },
      "Error": {
        "title": "Error response",
        "type": "object",
        "description": "Error response.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          }
        }
      }
    },
    "parameters": {
      "since": {
        "name": "since",
        "in": "query",
        "description": "Since is a date (`YYYY-MM-DD`) specifying that the capture must be on or\nafter the given date (if not provided then the first available survey\ndate in the location is assumed).\n",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "2018-08-18"
      },
      "until": {
        "name": "until",
        "in": "query",
        "description": "Until is a date (`YYYY-MM-DD`) specifying that the capture date must be\non or before the given date (if not provided then the current date is\nassumed).\n",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "2021-08-18"
      },
      "bulk": {
        "name": "bulk",
        "in": "query",
        "description": "Bulk determines whether if the request is part of a large batch of\nrequests, meaning requests will not be rate-limited.\n",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "packs": {
        "name": "packs",
        "in": "query",
        "description": "Packs accepts a list of comma-separated product packs. This returns\nspecific features and attributes under the pack. The response will\nreturn all features and attributes that the user is entitled to if no\npacks are provided.\n\nIt cannot be used with the `classes` query parameter. This parameter is\nignored if used with an empty value.\n",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "solar,pool,roof_char"
      },
      "classes": {
        "name": "classes",
        "in": "query",
        "description": "Classes accepts a list of comma-separated feature class IDs. Features\nclasses not requested will be filtered out of the response. The full\nlist of available feature classes can be obtained by using the\n`classes.json` endpoint (Feature class IDs are in the `id` field for\nclasses of type `Feature`). The response will include all feature\nclasses that the user is entitled to if the query parameter is not\nspecified.\n\nIt cannot be used with the `packs` query parameter. This parameter is\nignored if used with an empty value.\n",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "2e0bd9e3-3b67-4990-84dc-1b4812fdd02b,0339726f-081e-5a6e-b9a9-42d95c1b5c8a"
      },
      "optionalPolygon": {
        "name": "polygon",
        "in": "query",
        "description": "Represents the Area Of Interest (AOI) to query against. It is depicted\nby a set of points (longitude/latitude pairs) where the first and last\npoint must be the same. The polygon must not self-intersect.\n\nIt cannot be used with the address geocoding parameters\n(`streetAddress`, `city`, `state`, `zip` and `country`), or with an\n`aoi` defined in the request body for the HTTP POST variant endpoints.\n\nMust be omitted when TXv3 token authorization is used.\n",
        "required": false,
        "example": "-96.15764,41.22445,-96.15716,41.22444,-96.15716,41.22461,-96.15764,41.22461,-96.15764,41.22445",
        "schema": {
          "type": "string"
        }
      },
      "streetAddress": {
        "name": "streetAddress",
        "in": "query",
        "description": "The street address for a geocoded request. Should consist of the street\nnumber, street name, and street type.\n\nIt cannot be used with the `polygon` query parameter.\n\nMust be omitted when TXv3 token authorization is used.\n",
        "required": false,
        "example": "422 Towne Park Trl",
        "schema": {
          "type": "string"
        }
      },
      "city": {
        "name": "city",
        "in": "query",
        "description": "The city, suburb, or locality for a geocoded request.\n\nIt cannot be used with the `polygon` query parameter.\n\nMust be omitted when TXv3 token authorization is used.\n",
        "required": false,
        "example": "Austin",
        "schema": {
          "type": "string"
        }
      },
      "state": {
        "name": "state",
        "in": "query",
        "description": "The two-letter state code for a geocoded request.\n\nIt cannot be used with the `polygon` query parameter.\n\nMust be omitted when TXv3 token authorization is used.\n",
        "required": false,
        "example": "TX",
        "schema": {
          "type": "string"
        }
      },
      "zip": {
        "name": "zip",
        "in": "query",
        "description": "The five-digit ZIP code or nine-digit ZIP+4 code for US addresses or the\nfour-digit postal code for AU addresses for a geocoded request.\n\nIt cannot be used with the `polygon` query parameter.\n\nMust be omitted when TXv3 token authorization is used.\n",
        "required": false,
        "example": "78751",
        "schema": {
          "type": "string"
        }
      },
      "country": {
        "name": "country",
        "in": "query",
        "description": "The two-letter country code for the geocoded request. Only supports US\nand AU. Defaults to US when geocoding is used without supplying the\ncountry code.\n\nIt cannot be used with the `polygon` query parameter.\n\nMust be omitted when TXv3 token authorization is used.\n",
        "required": false,
        "example": "US",
        "schema": {
          "type": "string",
          "enum": [
            "US",
            "AU"
          ]
        }
      },
      "reference": {
        "name": "X-Nearmap-Ext-Reference",
        "in": "header",
        "description": "Allows a reference string to be echoed back opaquely in the body of the response.",
        "required": false,
        "example": "123456",
        "schema": {
          "type": "string"
        }
      },
      "systemVersion": {
        "name": "systemVersion",
        "in": "query",
        "description": "If specified, causes the API to only consider the given system version\nwhen choosing which survey resource to use for serving the request.\n",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "gen5-tranquil_pool-1.0"
      },
      "systemVersionPrefix": {
        "name": "systemVersionPrefix",
        "in": "query",
        "description": "If specified, causes the API to only consider system versions that match\nthe prefix when choosing which survey resource to use for serving the\nrequest.\n",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "gen5"
      },
      "alpha": {
        "name": "alpha",
        "in": "query",
        "description": "When set to true, causes alpha classes to be included in results.\n",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "beta": {
        "name": "beta",
        "in": "query",
        "description": "When set to true, causes beta classes to be included in results.\n",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order by which the surveys are sorted (using capture date) when the\nAPI selects the survey resource to use for serving the request.\n",
        "schema": {
          "enum": [
            "latest",
            "earliest"
          ],
          "default": "latest"
        }
      },
      "3dCoverageFeature": {
        "name": "3dCoverage",
        "in": "query",
        "required": false,
        "description": "Use the 3D attribute boundary when the API selects the survey resource\nto use for serving the request. Othewise, the regular resource boundary\nwill be used.\n",
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "responses": {
      "features_bad_request": {
        "description": "Bad Request. There was a problem with the request parameters.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "Invalid polygon": {
                "value": {
                  "code": "INVALID_POLYGON",
                  "message": "Input polygon must be a valid sequence of x,y coordinates."
                }
              },
              "Invalid since date": {
                "value": {
                  "code": "INVALID_SINCE",
                  "message": "Date must be in YYYY-MM-DD format."
                }
              },
              "Invalid until date": {
                "value": {
                  "code": "INVALID_UNTIL",
                  "message": "Date must be in YYYY-MM-DD format."
                }
              },
              "Invalid date range": {
                "value": {
                  "code": "INVALID_DATE_RANGE",
                  "message": "Since date must be before until date."
                }
              },
              "Both polygon and address set": {
                "value": {
                  "code": "BOTH_POLYGON_AND_ADDRESS_SET",
                  "message": "Only one of 'polygon' or address query parameters may be set, not both."
                }
              },
              "Neither polygon nor address set": {
                "value": {
                  "code": "NEITHER_POLYGON_NOR_ADDRESS_SET",
                  "message": "No polygon or address query parameters provided. At least a polygon or address must be set."
                }
              },
              "Invalid address": {
                "value": {
                  "code": "INVALID_ADDRESS",
                  "message": "All address fields must be set to valid non-empty values."
                }
              },
              "Unknown pack": {
                "value": {
                  "code": "UNKNOWN_PACK",
                  "message": "foo is an unknown product pack"
                }
              },
              "Packs and classes": {
                "value": {
                  "code": "PACKS_AND_CLASSES",
                  "message": "Only one of 'packs' or 'classes' query parameters may be set, not both."
                }
              },
              "AOI exceeds maximum size": {
                "value": {
                  "code": "AOI_EXCEEDS_MAX_SIZE",
                  "message": "AOI exceeds maximum size."
                }
              },
              "Parcel exceeds maximum size": {
                "value": {
                  "code": "PARCEL_EXCEEDS_MAX_SIZE",
                  "message": "Address resolves to a parcel that exceeds maximum size."
                }
              },
              "Unknown feature class": {
                "value": {
                  "code": "UNKNOWN_CLASS",
                  "message": "Unknown class foo."
                }
              },
              "Polygon too complex": {
                "value": {
                  "code": "POLYGON_TOO_COMPLEX",
                  "message": "Polygon or sum of Polygons must be constructed by at most 5000 points."
                }
              },
              "Parcel too complex": {
                "value": {
                  "code": "PARCEL_TOO_COMPLEX",
                  "message": "Address resolves to a parcel geometry that is too complex to serve."
                }
              }
            }
          }
        }
      },
      "generic_unauthorized": {
        "description": "Unauthorized",
        "content": {
          "text/plain": {
            "examples": {
              "Unauthorized": {
                "value": "Unauthorized"
              }
            }
          }
        }
      },
      "generic_forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "Auth failure": {
                "value": {
                  "message": "Forbidden due to auth failure"
                }
              }
            }
          }
        }
      },
      "features_not_found": {
        "description": "Not Found. No data is available matching the request criteria.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "No survey resources found": {
                "value": {
                  "message": "no survey resources found"
                }
              }
            }
          }
        }
      },
      "rollups_json_ok": {
        "description": "OK response to the rollups.json endpoint.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RollupsJSONResult"
            }
          }
        }
      }
    }
  }
}
```