> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shovels.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Properties By Id

> **Beta.** Query parameters, response fields, and the absence-trust surface may still change in response to how the endpoint is used in practice. Treat the shape as unstable while it is in beta. Returns properties by their address id. Provide up to 50 `id` query parameters in one call; rows come back in request order and unknown ids are omitted (no per-id 404). A non-address geolocation id (city, county, or jurisdiction) is rejected.



## OpenAPI

````yaml https://api.shovels.ai/spec/v2/openapi.production.yaml get /properties
openapi: 3.1.0
info:
  title: The Shovels API v2
  description: >

    The Shovels REST API makes it easy for technology developers in the
    property, climate, and

    construction industries to access detailed information about building
    permits, contractors and

    construction activity. Our API is designed to be intuitive and fast. We look
    forward to seeing what

    you build with it:

    [let us
    know](https://docs.google.com/forms/d/e/1FAIpQLSfs5Z6NZyPdnRpL96bMduH95OhfFZgLz9Hkc0-Y7pukUxSLxQ/viewform)

    and we'll check it out!


    ## Key Features

    The API offers access to two primary objects: **Permits** and
    **Contractors**.

    - **Permits**: Official documents issued by city or county authorities
    required before commencing

    construction or alterations to a building.

    - **Contractors**: Skilled professionals in the building trades who
    undertake permitted

    construction projects on various properties.


    And some additional resources:

    - **Lists**: Endpoints for predefined values like tags and property types
    for query parameters.

    - **Addresses**: Endpoint for searching and resolving valid US addresses.

    - **Meta**: Endpoints for metadata about the API and the data behind it.


    ## Getting started


    To begin using the API, please contact our sales team at

    [sales@shovels.ai](mailto:sales@shovels.ai) or grab a

    [free API key](https://app.shovels.ai/create-account/).


    > **Info**: The free API key has a limited number of calls.

    If you hit the limit and need more, please reach out to
    [sales@shovels.ai](mailto:sales@shovels.ai)

    or call us at [1-800-511-7457](tel:+18005117457).


    ### Authentication

    Our API uses a straightforward header-based authentication method:

    ```

    X-API-Key: YOUR_API_KEY_HERE

    ```


    Example Request:


    ```sh

    curl -X GET "https://api.shovels.ai/v2/meta/release" \
            -H "X-API-Key: YOUR_API_KEY_HERE"
    ```


    ## API Details


    ### Quick Overview


    A few quick details about our API:


    | Type                |
    Description                                                                |

    |---------------------|----------------------------------------------------------------------------|

    | SSL only            | We require that all requests are done over
    SSL.                            |

    | UTF-8 encoding      | We use UTF-8
    everywhere.                                                   |

    | Method              | GET for all read
    calls.                                                    |

    | Date format         | All dates in the API are strings in the following
    format: YYYY-MM-DD.      |


    ### Response Types


    The API supports the following response codes:


    | Code | Description |

    |------|-------------|

    | **200 OK** | Everything worked as expected. |

    | **400 Bad Request** | There was something wrong with your request.
    Double-check your input. |

    | **401 Unauthorized** | You need to log in to access this. Make sure your
    API key is correct. |

    | **402 Payment Required** | Credit or trial limit exceeded. Response
    includes an upgrade link. |

    | **403 Forbidden** | You don't have permission to access this. |

    | **404 Not Found** | We couldn't find what you're looking for. Check the
    URL or resource ID. |

    | **422 Unprocessable Entity** | There's an issue with the data you
    sent.         Check [Error Handling](#error-handling) if you get this error.
    |

    | **429 Too Many Requests** | You're sending requests too quickly. Slow down
    and try again later. |

    | **500 Internal Server Error** | Yikes, something went wrong on our end.
    Please let us know         at [support@shovels.ai](support@shovels.ai) |


    ### Data Format


    The API returns data in JSON format, either as pages or single objects.


    Paginated responses have the following structure:

    ```json

    {
      "items": [...],
      "size": 50,
      "next_cursor": "eyJkYXR..." | null
    }

    ```

    Where objects are returned as an array in the 'items' field.


    ### Cursor-Based Pagination


    The API uses cursor-based pagination for all paginated endpoints. This
    method uses an opaque

    cursor token to maintain your position in the result set, offering better
    performance,

    consistency, and stability, especially for large datasets.


    ```json

    {
      "items": [...],
      "size": 50,
      "next_cursor": "eyJkYXR.lIjoiMjA.yMy0"
    }

    ```


    To use cursor-based pagination:

    - For the first page: Simply make a request without any pagination
    parameters (or optionally
      specify `size` to control page size)
    - For subsequent pages: Include the `next_cursor` value from the previous
    response using the
      `cursor` parameter

    Example:

    ```

    GET /v2/permits/search?size=10

    GET /v2/permits/search?size=10&cursor=eyJkYXR.lIjoiMjA.yMy0

    ```


    When there are no more results, the `next_cursor` value will be `null`.


    ### Versioning


    The current version of the API is v2, which is reflected in the endpoints
    URL structure:

    `/v2/`. We plan to evolve our API by releasing new versions to ensure
    backward compatibility while

    maintaining a steady pace of continuous improvements.


    ### Error Handling


    Proper error messages and HTTP codes are provided to help you troubleshoot
    issues effectively. Refer

    to the [Response Types](#response-types) section for an overview of HTTP
    error codes and how to

    handle them. Below we describe how to interpret HTTP 422 code.


    #### 422 Unprocessable Entity

    A 422 Unprocessable Entity response occurs when the server understands the
    request but cannot

    process it due to invalid data. This helps you identify issues with your
    input.


    The response includes:


    - **loc**: The location of the error. The first value indicates the location
    and the second
      specifies the problematic field. Common values for the first value include:
        - **body**: The error is in the request body.
        - **query**: The error is in the query parameters.
        - **path**: The error is in the URL path.
        - **header**: The error is in the request headers.
    - **msg**: A message describing the error.

    - **type**: The type of error.


    This information helps you correct your request by pinpointing the exact
    issue. Here are some

    examples:


    **Request Body Error**

    ```json

    {
      "detail": [
        {
          "loc": ["body", "first_name"],
          "msg": "Field is required",
          "type": "value_error.missing"
        }
      ]
    }

    ```


    **Query Parameter Error**

    ```json

    {
      "detail": [
        {
          "loc": ["query", "page"],
          "msg": "Page must be a positive integer",
          "type": "type_error.integer"
        }
      ]
    }

    ```

    **Path Parameter Error**

    ```json

    {
      "detail": [
        {
          "loc": ["path", "id"],
          "msg": "Invalid ID format",
          "type": "value_error.id"
        }
      ]
    }

    ```

    **Header Error**

    ```json

    {
      "detail": [
        {
          "loc": ["header", "X-API-Key"],
          "msg": "API key is missing",
          "type": "value_error.missing"
        }
      ]
    }

    ```

    These examples show how different types of errors are reported, helping you
    to diagnose and fix

    issues in your API requests.


    ## Credit Limits


    API usage is tracked using credits. Each record returned counts as one
    credit.


    ### Response Headers


    Successful JSON responses that return records include credit headers:

    - `X-Credits-Request`: Credits consumed by this request

    - `X-Credits-Limit`: Your monthly credit limit (omitted if unlimited)

    - `X-Credits-Remaining`: Credits remaining in your limit (omitted if
    unlimited)


    ### Checking Usage


    Use `GET /v2/usage` to check your current credit usage:


    ```json

    {
      "credits_used": 847293,
      "credit_limit": 1000000
    }

    ```


    ### Exceeding Limits


    When you exceed your credit limit, the API returns HTTP 402 with a
    structured `detail` object:


    ```json

    {
      "detail": {
        "error": "Monthly credit limit exceeded.",
        "limit": 1000000,
        "upgrade_url": "https://pay.shovels.ai/p/login/14k6qo1KG7MjdlSaEE"
      }
    }

    ```


    When a trial API key exceeds its call limit, HTTP 402 is returned with
    `detail` as a plain string containing the upgrade URL inline:


    ```json

    {
      "detail": "...trial limit message... Self-serve upgrade: https://pay.shovels.ai/p/login/14k6qo1KG7MjdlSaEE — ..."
    }

    ```


    Credits are calculated on a rolling 30-day window. Usage older than 30 days
    automatically falls off.
  version: 2.0.0
servers:
  - url: https://api.shovels.ai/v2
    description: Shovels API
security: []
tags:
  - name: Meta
    description: Endpoints that provide information about the API and the data.
  - name: Lists
    description: >-
      Predefined lists of values and categories, such as tags and property
      types, which can be utilized as query parameters in other API
      interactions.
  - name: Permits
    description: >-
      Official documents issued by cities or counties before construction or
      alteration of a building can begin.
  - name: Decisions
    description: >-
      Zoning and land-use decisions extracted from city council and planning
      department meeting records.
  - name: Contractors
    description: >-
      Licensed professionals who do permitted work on residential and commercial
      buildings.
  - name: Properties
    description: >-
      Addresses with their permit history, ownership and attributes, including
      absence queries — properties *without* a given kind of permit. **Beta.**
      Query parameters, response fields, and the absence-trust surface may still
      change in response to how the endpoint is used in practice. Treat the
      shape as unstable while it is in beta.
  - name: Addresses
    description: US address ID resolution, lookup and metrics endpoints.
  - name: Cities
    description: City ID resolution, lookup and metrics endpoints.
  - name: Counties
    description: County ID resolution, lookup and metrics endpoints.
  - name: Jurisdictions
    description: Jurisdiction ID resolution, lookup and metrics endpoints.
  - name: States
    description: State metrics endpoints.
  - name: Usage
    description: Credit usage tracking.
paths:
  /properties:
    get:
      tags:
        - Properties
        - Properties
      summary: Get Properties By Id
      description: >-
        **Beta.** Query parameters, response fields, and the absence-trust
        surface may still change in response to how the endpoint is used in
        practice. Treat the shape as unstable while it is in beta. Returns
        properties by their address id. Provide up to 50 `id` query parameters
        in one call; rows come back in request order and unknown ids are omitted
        (no per-id 404). A non-address geolocation id (city, county, or
        jurisdiction) is rejected.
      operationId: get_properties_by_id_properties_get
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
            minItems: 1
            maxItems: 50
            title: Property ID
            description: Address geolocation id. Up to 50 `id` params per request.
          description: Address geolocation id. Up to 50 `id` params per request.
      responses:
        '200':
          description: The requested properties, in request order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPropertiesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PaginatedPropertiesResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PropertiesRead'
          type: array
          title: Items
          description: The list of items returned in the response following given criteria.
        size:
          type: integer
          title: Size
          description: The number of items returned in the response.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: The cursor for retrieving the next page of results.
        total_count:
          anyOf:
            - $ref: '#/components/schemas/TotalCount'
            - type: 'null'
          description: >-
            Total result count (capped at 10,000). Present on first-page
            responses when include_count=true. null if the count query timed
            out.
        trust_summary:
          anyOf:
            - $ref: '#/components/schemas/TrustSummary'
            - type: 'null'
          description: Row-weighted trust summary; present only on absence-class responses.
      type: object
      required:
        - items
        - size
        - next_cursor
      title: PaginatedPropertiesResponse
      description: >-
        Paginated /properties response; carries the honesty summary on absence
        pages.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PropertiesRead:
      properties:
        id:
          type: string
          title: Id
          description: The base64 address handle; the property's public id.
        street_no:
          anyOf:
            - type: string
            - type: 'null'
          title: Street No
          description: Street number of the address.
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
          description: Street name of the address.
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City of the address.
        city_id:
          anyOf:
            - type: string
            - type: 'null'
          title: City Id
          description: Base64 city handle.
        zip_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Code
          description: ZIP code of the address.
        zip_code_ext:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Code Ext
          description: ZIP+4 extension of the address.
        county:
          anyOf:
            - type: string
            - type: 'null'
          title: County
          description: County of the address.
        county_id:
          anyOf:
            - type: string
            - type: 'null'
          title: County Id
          description: Base64 county handle.
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: State of the address.
        lat:
          anyOf:
            - type: number
            - type: 'null'
          title: Lat
          description: Latitude of the address.
        long:
          anyOf:
            - type: number
            - type: 'null'
          title: Long
          description: Longitude of the address.
        permit_count:
          type: integer
          title: Permit Count
          description: Count of permits linked to the address.
          default: 0
        untagged_permit_count:
          type: integer
          title: Untagged Permit Count
          description: Count of the address's permits carrying no canonical tag.
          default: 0
        total_job_value:
          type: integer
          title: Total Job Value
          description: Sum of permit job values in integer cents (dollars x 100).
          default: 0
        contractor_count:
          type: integer
          title: Contractor Count
          description: Distinct contractors across the address's permits.
          default: 0
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Distinct canonical tags present on the address's permits.
          default: []
        tag_status_pairs:
          items:
            type: string
          type: array
          title: Tag Status Pairs
          description: Distinct tag:status pairs (status folded to 'unknown' when NULL).
          default: []
        statuses:
          items:
            type: string
          type: array
          title: Statuses
          description: Distinct permit statuses incl the 'unknown' NULL fold.
          default: []
        tag_tally:
          additionalProperties:
            type: integer
          type: object
          title: Tag Tally
          description: Map tag -> permit count.
          default: {}
        last_date_by_tag:
          additionalProperties:
            type: string
          type: object
          title: Last Date By Tag
          description: Map tag -> latest permit start_date.
          default: {}
        last_unfinaled_date_by_tag:
          additionalProperties:
            type: string
          type: object
          title: Last Unfinaled Date By Tag
          description: Map tag -> latest non-final start_date under the clear rule.
          default: {}
        last_date_by_pair:
          additionalProperties:
            type: string
          type: object
          title: Last Date By Pair
          description: Map tag:status -> latest permit start_date.
          default: {}
        last_date_by_status:
          additionalProperties:
            type: string
          type: object
          title: Last Date By Status
          description: Map status -> latest permit start_date.
          default: {}
        last_permit_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Last Permit Date
          description: >-
            Latest permit start_date across all of the address's permits; null
            when never permitted.
        apn:
          anyOf:
            - type: string
            - type: 'null'
          title: Apn
          description: Assessor parcel number.
        property_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Property Type
          description: Property type.
        property_type_detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Property Type Detail
          description: Property type detail.
        year_built:
          anyOf:
            - type: integer
            - type: 'null'
          title: Year Built
          description: Year the property was built.
        lot_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lot Size
          description: Lot size of the property.
        story_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Story Count
          description: Number of stories in the property.
        unit_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Unit Count
          description: Number of units in the property.
        building_area:
          anyOf:
            - type: integer
            - type: 'null'
          title: Building Area
          description: Building area of the property.
        assess_market_value:
          anyOf:
            - type: integer
            - type: 'null'
          title: Assess Market Value
          description: Assessed market value in integer cents (dollars x 100).
        owner_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Type
          description: Type of property owner.
        legal_owner:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Owner
          description: Legal owner of the property.
        trust:
          anyOf:
            - $ref: '#/components/schemas/PropertyTrust'
            - type: 'null'
          description: >-
            Per-row absence-honesty surface; present only on absence-class
            responses.
      type: object
      required:
        - id
      title: PropertiesRead
      description: >-
        Response schema for one property, served by both /properties endpoints.


        The public id is the base64 address handle. Presence arrays and the maps
        default to

        present-and-empty so a never-permitted row serializes zero counts and
        empty

        collections; attributes, dates, and trust are nullable. trust is None on
        non-absence

        responses and a PropertyTrust on absence responses
        (optional-by-polarity).
    TotalCount:
      properties:
        value:
          type: integer
          minimum: 0
          title: Value
          description: The count value; capped at the probe's cap (10,000 on the wire).
        relation:
          type: string
          enum:
            - eq
            - gte
          title: Relation
          description: >-
            "eq" means value is the exact count. "gte" means the actual count is
            at least value (the cap).
      type: object
      required:
        - value
        - relation
      title: TotalCount
      description: >-
        Capped result count with Elasticsearch-style {value, relation} shape.


        When the exact count is known and within the cap, relation is "eq" and
        value is

        that exact count. When the count exceeds the cap, relation is "gte" and
        value is

        the cap the count was probed against, meaning "the actual count is at
        least

        value". The cap is COUNT_CAP for every wire-facing endpoint; internal
        guard paths

        probe against their own cap, so value carries whatever cap produced it.
    TrustSummary:
      properties:
        rows_flagged:
          type: integer
          minimum: 0
          title: Rows Flagged
          description: Number of rows on the page carrying a trust flag.
        row_weighted_unresolved_rate:
          type: number
          maximum: 1
          minimum: 0
          title: Row Weighted Unresolved Rate
          description: Row-weighted mean unresolved_rate across the page.
        expected_miss_rate:
          type: number
          maximum: 1
          minimum: 0
          title: Expected Miss Rate
          description: >-
            Estimated share of true matches absent from arrived data due to
            ingestion lag.
        suppressed_scopes:
          type: integer
          minimum: 0
          title: Suppressed Scopes
          description: Number of footprint scopes excluded from the result by suppression.
      type: object
      required:
        - rows_flagged
        - row_weighted_unresolved_rate
        - expected_miss_rate
        - suppressed_scopes
      title: TrustSummary
      description: >-
        Response-level, row-weighted absence-honesty summary for an
        absence-class page.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PropertyTrust:
      properties:
        unresolved_rate:
          type: number
          maximum: 1
          minimum: 0
          title: Unresolved Rate
          description: >-
            Share of the row jurisdiction's permits of the tag that never linked
            to an address.
        coverage_tier:
          type: string
          enum:
            - high
            - medium
            - low
          title: Coverage Tier
          description: Coverage bucket for the row's jurisdiction (90/50 cutoffs).
        data_horizon:
          type: string
          format: date
          title: Data Horizon
          description: >-
            Most recent start_date past which 'no X since D' is under-observed;
            never null.
        horizon_basis:
          type: string
          enum:
            - measured
            - pooled
            - prior
          title: Horizon Basis
          description: >-
            How data_horizon was estimated: a measured cohort, a pooled
            fallback, or the state prior.
        trust_jurisdiction_basis:
          type: string
          enum:
            - own
            - dominant
            - unknown
          title: Trust Jurisdiction Basis
          description: >-
            Whether the trust join used the row's own jurisdiction, its ZIP's
            dominant one, or none.
        trust_jurisdiction_error_bar:
          type: number
          maximum: 1
          minimum: 0
          title: Trust Jurisdiction Error Bar
          description: >-
            Measured error rate of the trust jurisdiction: the 6.13%
            ZIP-dominant estimate error on a 'dominant' basis, 0 on an 'own' or
            'unknown' basis.
          default: 0
        footprint_basis:
          type: string
          enum:
            - matched
            - unknown
          title: Footprint Basis
          description: Whether footprint suppression could resolve the row's geo scope.
        flags:
          items:
            type: string
          type: array
          title: Flags
          description: >-
            Row-grain honesty flags, e.g. since_d_beyond_horizon or
            trust_row_missing.
          default: []
      type: object
      required:
        - unresolved_rate
        - coverage_tier
        - data_horizon
        - horizon_basis
        - trust_jurisdiction_basis
        - footprint_basis
      title: PropertyTrust
      description: >-
        Per-row absence-honesty surface for one property in an absence-class
        response.


        Present and non-null on every row of an absence or mixed-exclusion
        response, absent

        on presence-only responses (optional-by-polarity, wired at the route).
        Every field

        is required: a row whose (jurisdiction, tag) trust lookup misses carries
        the

        conservative-fallback instance rather than a null object.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````