{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/placestack-com/json-schema/placestack-com-collection-suggestion-schema.json",
  "title": "Collection[Suggestion]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/placestack-com-suggestion-api-openapi.yml#/components/schemas/Collection_Suggestion_",
  "properties": {
    "object": {
      "type": "string",
      "const": "list",
      "title": "Object",
      "description": "The object's type. Always `list`.",
      "default": "list"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/Suggestion"
      },
      "type": "array",
      "title": "Data",
      "description": "The results on this page."
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "Whether there are more results after this page."
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "The cursor for the next page. Send it as `cursor`. Null on the last page."
    },
    "suppressed": {
      "type": "integer",
      "title": "Suppressed",
      "description": "The number of matching results withheld because the plan does not include them.",
      "default": 0
    },
    "total": {
      "anyOf": [
        {
          "$ref": "#/$defs/Total"
        },
        {
          "type": "null"
        }
      ],
      "description": "The number of matching results. Only on the first page, when `total=true` is sent. Null otherwise."
    }
  },
  "type": "object",
  "required": [
    "object",
    "data",
    "has_more",
    "next_cursor",
    "suppressed",
    "total"
  ],
  "$defs": {
    "Suggestion": {
      "properties": {
        "object": {
          "type": "string",
          "const": "suggestion",
          "title": "Object",
          "description": "The object's type. Always `suggestion`.",
          "default": "suggestion"
        },
        "kind": {
          "type": "string",
          "enum": [
            "address",
            "parcel",
            "jurisdiction"
          ],
          "title": "Kind",
          "description": "Kind of match. One of `address`, `parcel` or `jurisdiction`."
        },
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Display text: the address, parcel number or jurisdiction name."
        },
        "detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Detail",
          "description": "Secondary display text, such as the county for an address or the state for a county. Null when not needed."
        },
        "query": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Query",
          "description": "Query parameters for `GET /v1/parcel`, or `GET /v1/jurisdiction` for a jurisdiction. Send them unchanged."
        },
        "href": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Href",
          "description": "The matched object's path in the API. Null for an address that matches several parcels."
        }
      },
      "type": "object",
      "required": [
        "object",
        "kind",
        "label",
        "detail",
        "query",
        "href"
      ],
      "title": "Suggestion",
      "description": "A suggested match for typed text."
    },
    "Total": {
      "properties": {
        "value": {
          "type": "integer",
          "title": "Value",
          "description": "The number of matching results."
        },
        "relation": {
          "type": "string",
          "enum": [
            "eq",
            "gte"
          ],
          "title": "Relation",
          "description": "One of `eq` (exact) or `gte` (at least `value`). Counts above 10,000 are `gte`."
        }
      },
      "type": "object",
      "required": [
        "value",
        "relation"
      ],
      "title": "Total",
      "description": "The number of matching results."
    }
  }
}