{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/layout-link/json-schema/layout-link-place-list-schema.json",
  "title": "PlaceList",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/layout-link-openapi.json#/components/schemas/PlaceList",
  "type": "object",
  "properties": {
    "places": {
      "description": "Places open right now. With several names, nearest first. With `include=closed`, the places that are shut or whose hours Layout does not hold follow the open ones. With `ids`, every place you sent that Layout holds, open or not, in your order; with `ordering=confirmed` as well, only the confirmed ones.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Place"
      }
    },
    "nextCursor": {
      "description": "On a browse: send it as `cursor` for the next page, nearest first from where this one ended. Null when there is no further page. Each page draws one place read.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "missing": {
      "description": "With `ids`: the ids Layout holds no place for, or no longer shows. Present only when there is one.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/PlaceId"
      }
    },
    "stillChecking": {
      "description": "Layout is still checking whether more places there take online orders. Ask again in a minute.",
      "type": "boolean",
      "const": true
    },
    "stillCheckingCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "searched": {
      "description": "False when Layout did not look this time, so an empty list says nothing about the area.",
      "type": "boolean"
    },
    "localityMatched": {
      "description": "False when Layout could not place `near`: the rows are real but not where the person asked.",
      "type": "boolean"
    },
    "emptyBecause": {
      "description": "Why `places` is empty, when it is: everything there is shut, Layout did not look this time, the query named nothing to look for, (`no_match`) Layout looked and holds no open place matching the query, (`none_confirmed`, with `ordering=confirmed`) Layout holds matching places but has confirmed online ordering at none of them, or (`no_held_menu`, sandbox only) Layout holds matching places but holds the menu of none of them. `query` matches a restaurant's name, the kind of food it serves, or a common drink: a latte finds the coffee and tea shops that pour it.",
      "type": "string",
      "enum": [
        "all_closed",
        "not_searched",
        "nothing_to_search",
        "no_match",
        "none_confirmed",
        "no_held_menu"
      ]
    },
    "searchLimit": {
      "description": "Sent with `searched: false` when a limit, not the area, is why Layout did not look further.",
      "type": "object",
      "properties": {
        "pool": {
          "description": "`registry_only`: sandbox and applications not approved for live search only what Layout already holds. `approved`: an approved live application's pool of searches beyond it.",
          "type": "string",
          "enum": [
            "registry_only",
            "approved"
          ]
        },
        "scope": {
          "description": "Whose daily limit stopped the search: your developer account's, or the pool's across every developer. Null for `registry_only`.",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "developer",
                "platform"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "perDay": {
          "description": "The limit that applied, per day. 0 for `registry_only`.",
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "pool",
        "scope",
        "perDay",
        "message"
      ]
    }
  },
  "required": [
    "places",
    "searched",
    "localityMatched"
  ],
  "$defs": {
    "Place": {
      "type": "object",
      "properties": {
        "placeId": {
          "$ref": "#/$defs/PlaceId"
        },
        "slug": {
          "description": "The public storefront path on layout.link.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "region": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cuisine": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "rating": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "priceLevel": {
          "description": "1 (inexpensive) to 4 (very expensive). Null: not known.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "website": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "openNow": {
          "description": "Prefer `openStatus`: null here means not known, never closed.",
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "openStatus": {
          "description": "At the store's own clock. `unknown`: Layout holds no hours.",
          "type": "string",
          "enum": [
            "open",
            "closed",
            "unknown"
          ]
        },
        "ordering": {
          "description": "`confirmed`: Layout found an online ordering route. `unconfirmed`: not decided yet. `unavailable`: Layout looked and there is none.",
          "type": "string",
          "enum": [
            "confirmed",
            "unconfirmed",
            "unavailable"
          ]
        },
        "closesAt": {
          "description": "Store-local closing time when open.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "opensAt": {
          "description": "Store-local next opening when closed.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "closingSoon": {
          "description": "Open, and closing within 45 minutes.",
          "type": "boolean"
        },
        "closesAtIso": {
          "description": "When it closes, as an instant, when open. Compare it to your own clock rather than trusting `closingSoon` on a cached row.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "opensAtIso": {
          "description": "When it next opens, as an instant, when closed. Sort on this, not on `opensAt`.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "lat": {
          "description": "Where the store is.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "lng": {
          "description": "Where the store is.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "distanceKm": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "distanceMi": {
          "description": "One decimal. Usually from the centre of `near` when it is sent and Layout can place it, else from `lat`/`lng`. Check `localityMatched`. Null without a location.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "photoUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cuisines": {
          "description": "Finer cuisine words than `cuisine`, from the kinds of place Google lists it as and its `cuisine`, sorted. Empty when Layout holds none. Each is one of: american, bakery, bbq, bowls, breakfast, bubble_tea, burger, cafe, chicken, chinese, dessert, fast_food, greek, indian, italian, japanese, juice, korean, mediterranean, mexican, middle_eastern, noodles, pizza, poke, ramen, salad, sandwich, seafood, steak, sushi, thai, vegan, vegetarian, vietnamese. New words may be added.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "matchedOn": {
          "description": "On a `query` search only: what the query matched. `name`: every word that matched the name is a whole word of it. `name_partial`: a word only begins or sits inside a word of the name, so `cava` on Cavaña. `cuisine`: the cuisine. `kind`: the kind of place Google lists it as. Null: Layout cannot say.",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "name",
                "name_partial",
                "cuisine",
                "kind"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "placeId",
        "slug",
        "name",
        "address",
        "city",
        "region",
        "cuisine",
        "rating",
        "priceLevel",
        "website",
        "openNow",
        "openStatus",
        "ordering",
        "closesAt",
        "opensAt",
        "closingSoon",
        "closesAtIso",
        "opensAtIso",
        "lat",
        "lng",
        "distanceKm",
        "distanceMi",
        "photoUrl",
        "cuisines"
      ]
    },
    "PlaceId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,255}$"
    }
  }
}