{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://socialcrawl.dev/schemas/place.json",
  "title": "SocialCrawl Place",
  "description": "Canonical unified place or business object returned by every SocialCrawl endpoint with the Place/PlaceList archetype. Nullability is expressed via JSON Schema 2020-12 type arrays. Generated from the Zod schema in packages/social-api/src/schemas/canonical.ts.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Place ID (Google cid for a business, hotel_identifier for a hotel)"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Business / hotel name"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Website or canonical URL"
    },
    "category": {
      "type": [
        "string",
        "null"
      ],
      "description": "Primary category (e.g. \"Coffee shop\", \"Hotel\")"
    },
    "rating": {
      "type": "object",
      "description": "Aggregate rating (value + max)",
      "properties": {
        "value": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Numeric at place.rating.value"
        },
        "max": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Numeric at place.rating.max"
        }
      }
    },
    "reviews_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of ratings"
    },
    "price_level": {
      "type": [
        "string",
        "null"
      ],
      "description": "Price band (\"inexpensive\" / \"$$\" / null)"
    },
    "address": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at place.address"
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at place.phone"
    },
    "latitude": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Numeric at place.latitude"
    },
    "longitude": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Numeric at place.longitude"
    },
    "verified": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Claimed-business flag (Google is_claimed)"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at place.description"
    },
    "image_urls": {
      "type": [
        "string",
        "array",
        "null"
      ],
      "description": "Union: string | array | null",
      "items": {
        "type": "string",
        "description": "String at place.image_urls"
      }
    },
    "categories": {
      "type": [
        "array",
        "null"
      ],
      "description": "Array at place.categories",
      "items": {
        "type": "string",
        "description": "String at place.categories"
      }
    },
    "hotel": {
      "type": [
        "object",
        "null"
      ],
      "description": "Hotel-only richness (stars, amenities, review topics, prices); null for plain places",
      "properties": {
        "stars": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Numeric at place.hotel.stars"
        },
        "stars_description": {
          "type": [
            "string",
            "null"
          ],
          "description": "String at place.hotel.stars_description"
        },
        "check_in_time": {
          "type": [
            "string",
            "null"
          ],
          "description": "String at place.hotel.check_in_time"
        },
        "check_out_time": {
          "type": [
            "string",
            "null"
          ],
          "description": "String at place.hotel.check_out_time"
        },
        "amenities": {
          "type": [
            "array",
            "null"
          ],
          "description": "Array at place.hotel.amenities",
          "items": {
            "type": "object",
            "description": "Nested object: place.hotel.amenities",
            "properties": {
              "category": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "String at place.hotel.amenities.category"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "String at place.hotel.amenities.name"
              },
              "available": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Boolean at place.hotel.amenities.available"
              },
              "hint": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "String at place.hotel.amenities.hint"
              }
            }
          }
        },
        "review_topics": {
          "type": [
            "array",
            "null"
          ],
          "description": "Array at place.hotel.review_topics",
          "items": {
            "type": "object",
            "description": "Nested object: place.hotel.review_topics",
            "properties": {
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "String at place.hotel.review_topics.title"
              },
              "positive_score": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Numeric at place.hotel.review_topics.positive_score"
              },
              "positive_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Numeric at place.hotel.review_topics.positive_count"
              },
              "negative_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Numeric at place.hotel.review_topics.negative_count"
              },
              "total_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Numeric at place.hotel.review_topics.total_count"
              }
            }
          }
        },
        "prices": {
          "type": [
            "array",
            "null"
          ],
          "description": "Array at place.hotel.prices",
          "items": {
            "type": "object",
            "description": "Nested object: place.hotel.prices",
            "properties": {
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "String at place.hotel.prices.title"
              },
              "price": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Numeric at place.hotel.prices.price"
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "String at place.hotel.prices.currency"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "String at place.hotel.prices.url"
              },
              "official_site": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Boolean at place.hotel.prices.official_site"
              }
            }
          }
        }
      }
    }
  },
  "additionalProperties": true
}
