{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrapeatlas/json-schema/scrapeatlas-amazon-reviews-response-schema-schema.json",
  "title": "amazonReviewsResponseSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrapeatlas-amazon-api-openapi.yml#/components/schemas/amazonReviewsResponseSchema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "accounting": {
          "type": "object",
          "properties": {
            "upstreamRequests": {
              "type": "integer",
              "minimum": 0
            },
            "responseBytes": {
              "type": "integer",
              "minimum": 0
            },
            "durationMs": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "upstreamRequests",
            "responseBytes",
            "durationMs"
          ],
          "additionalProperties": false
        },
        "success": {
          "type": "boolean",
          "const": true
        },
        "status": {
          "type": "string",
          "enum": [
            "success",
            "partial"
          ]
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "fetchedAt": {
          "type": "string",
          "format": "date-time"
        },
        "coverage": {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "const": "public_page"
            },
            "complete": {
              "type": "boolean"
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "source",
            "complete",
            "warnings"
          ],
          "additionalProperties": false
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "review": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "entity_id": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{10}$"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rating": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "max": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "value",
                      "max"
                    ],
                    "additionalProperties": false
                  },
                  "author": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "avatar_url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "location": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "reviews_count": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0
                      }
                    },
                    "required": [
                      "name",
                      "avatar_url",
                      "url",
                      "location",
                      "reviews_count"
                    ],
                    "additionalProperties": false
                  },
                  "helpful_votes": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "verified": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "language": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "original_language": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "translated": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "images": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "responses": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "maxItems": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "published_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "entity_id",
                  "url",
                  "title",
                  "text",
                  "rating",
                  "author",
                  "helpful_votes",
                  "verified",
                  "source",
                  "language",
                  "original_language",
                  "translated",
                  "images",
                  "responses",
                  "published_at"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "review"
            ],
            "additionalProperties": false
          },
          "maxItems": 100
        },
        "total": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "dropped": {
          "type": "integer",
          "minimum": 0
        },
        "pagination": {
          "type": "object",
          "properties": {
            "next_cursor": {
              "type": [
                "string",
                "null"
              ]
            },
            "has_more": {
              "type": "boolean"
            },
            "page_size": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "next_cursor",
            "has_more",
            "page_size"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "requestId",
        "accounting",
        "success",
        "status",
        "sourceUrl",
        "fetchedAt",
        "coverage",
        "items",
        "total",
        "dropped",
        "pagination"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "accounting": {
          "type": "object",
          "properties": {
            "upstreamRequests": {
              "type": "integer",
              "minimum": 0
            },
            "responseBytes": {
              "type": "integer",
              "minimum": 0
            },
            "durationMs": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "upstreamRequests",
            "responseBytes",
            "durationMs"
          ],
          "additionalProperties": false
        },
        "success": {
          "type": "boolean",
          "const": false
        },
        "status": {
          "type": "string",
          "enum": [
            "failed",
            "challenged"
          ]
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "invalid_request",
                "unauthorized",
                "not_found",
                "upstream_challenged",
                "upstream_rate_limited",
                "upstream_error",
                "unsupported_page",
                "response_too_large",
                "unsafe_redirect",
                "request_limit",
                "timeout",
                "busy",
                "payload_too_complex"
              ]
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "requestId",
        "accounting",
        "success",
        "status",
        "failure"
      ],
      "additionalProperties": false
    }
  ]
}