{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repuso-com/json-schema/repuso-com-review-list-schema.json",
  "title": "ReviewList",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repuso-com-openapi.json#/components/schemas/ReviewList",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "description": "Total reviews matching the filters."
    },
    "limit": {
      "type": "integer"
    },
    "has_more": {
      "type": "boolean",
      "description": "True when another page exists. Loop while this is true, rather than waiting for an empty page - the cursor fields are returned on the last page too."
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Review"
      }
    },
    "next_before_ts": {
      "type": "integer",
      "description": "Pass as `before_ts` (together with `next_before_id`) to fetch the next page. Returned on every page that has items, including the last - use `has_more` to decide whether to continue."
    },
    "next_before_id": {
      "type": "integer",
      "description": "Pass as `before_id` (together with `next_before_ts`) to fetch the next page. Returned on every page that has items, including the last - use `has_more` to decide whether to continue."
    }
  },
  "$defs": {
    "Review": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "type": {
          "type": "string",
          "description": "Platform type slug."
        },
        "label": {
          "type": "string",
          "description": "Platform display name."
        },
        "text": {
          "type": "string",
          "description": "Review text as plain text - HTML markup is stripped and line breaks are real newlines. Translated when the `translate` query parameter is used."
        },
        "text_original": {
          "type": "string",
          "description": "Present only when `translate` is used - the untranslated review text."
        },
        "text_language": {
          "type": "string",
          "description": "Present only when `translate` is used - the ISO language code `text` was translated to."
        },
        "sentiment": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "positive",
            "neutral",
            "negative"
          ],
          "description": "Sentiment derived from the review's star rating. Null when the review has no rating."
        },
        "from_name": {
          "type": "string"
        },
        "from_image": {
          "type": "string",
          "format": "uri",
          "description": "Author photo."
        },
        "from_url": {
          "type": "string",
          "format": "uri",
          "description": "Author profile on the platform."
        },
        "post_url": {
          "type": "string",
          "format": "uri",
          "description": "The review on the platform."
        },
        "rating_value": {
          "type": "number"
        },
        "rating_scale": {
          "type": "integer"
        },
        "posted_on": {
          "type": "string"
        },
        "reply": {
          "type": [
            "string",
            "null"
          ],
          "description": "The business owner's public reply, as plain text. Null when there is no reply, or when the platform's replies are not reported."
        },
        "reply_date": {
          "type": [
            "string",
            "null"
          ],
          "description": "When the owner reply was posted or last edited. Null when there is no reply."
        },
        "has_reply": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the review has an owner reply. Reported for Google reviews (`true` / `false`); `null` for other platforms."
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              }
            }
          }
        },
        "additional": {
          "type": [
            "object",
            "null"
          ],
          "description": "Additional review inputs collected with the review (custom fields)."
        },
        "media": {
          "type": "array",
          "description": "All attached media.",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "video",
                  "audio"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "src": {
                "type": "string",
                "format": "uri",
                "description": "Playable file for videos, when available."
              }
            }
          }
        }
      }
    }
  }
}