{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://socialcrawl.dev/schemas/review.json",
  "title": "SocialCrawl Review",
  "description": "Canonical unified review object returned by every SocialCrawl endpoint with the Review/ReviewList 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": "Review ID (parsed from the review URL when not first-class)"
    },
    "entity_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the reviewed entity (e.g. the Amazon ASIN)"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at review.url"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at review.title"
    },
    "text": {
      "type": [
        "string",
        "null"
      ],
      "description": "Full review body"
    },
    "rating": {
      "type": "object",
      "description": "Star rating (value + max)",
      "properties": {
        "value": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Numeric at review.rating.value"
        },
        "max": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Numeric at review.rating.max"
        }
      }
    },
    "author": {
      "type": "object",
      "description": "Nested object: review.author",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "String at review.author.name"
        },
        "avatar_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "String at review.author.avatar_url"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "String at review.author.url"
        },
        "location": {
          "type": [
            "string",
            "null"
          ],
          "description": "String at review.author.location"
        },
        "reviews_count": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Numeric at review.author.reviews_count"
        }
      }
    },
    "helpful_votes": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Helpful-vote count (Amazon; null elsewhere)"
    },
    "verified": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Verified-purchase flag (Amazon; null elsewhere)"
    },
    "source": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at review.source"
    },
    "language": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at review.language"
    },
    "original_language": {
      "type": [
        "string",
        "null"
      ],
      "description": "String at review.original_language"
    },
    "translated": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Boolean at review.translated"
    },
    "images": {
      "type": [
        "array",
        "null"
      ],
      "description": "Array at review.images",
      "items": {
        "type": "string",
        "description": "String at review.images"
      }
    },
    "responses": {
      "type": [
        "array",
        "null"
      ],
      "description": "Array at review.responses",
      "items": {
        "type": "object",
        "description": "Nested object: review.responses",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "String at review.responses.id"
          },
          "author": {
            "type": [
              "string",
              "null"
            ],
            "description": "String at review.responses.author"
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "String at review.responses.text"
          },
          "published_at": {
            "type": [
              "string",
              "integer",
              "null"
            ],
            "description": "Union: string | integer | null"
          }
        }
      }
    },
    "published_at": {
      "type": [
        "string",
        "integer",
        "null"
      ],
      "description": "Union: string | integer | null"
    }
  },
  "additionalProperties": true
}
