{
  "components": {
    "schemas": {
      "CredentialsRequiredError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "const": "credentials_required",
                "type": "string"
              },
              "message": {
                "const": "this capability requires authentication credentials; save them via POST /credentials",
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ExecuteAcceptedResponse": {
        "additionalProperties": false,
        "properties": {
          "capability": {
            "enum": [
              "zepto.category.products"
            ],
            "type": "string"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "platform": {
            "enum": [
              "zepto"
            ],
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "const": "queued",
            "type": "string"
          }
        },
        "required": [
          "job_id",
          "request_id",
          "platform",
          "capability",
          "state"
        ],
        "type": "object"
      },
      "ExecuteNetwork": {
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "description": "Optional explicit session identifier.",
            "minLength": 1,
            "type": "string"
          },
          "session_key": {
            "description": "Optional stable key used to derive a reusable session.",
            "minLength": 1,
            "type": "string"
          },
          "sticky": {
            "description": "Whether the request should reuse the resolved session.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ExecuteReplayResponse": {
        "additionalProperties": false,
        "description": "Replayed response matching the original job's current state (completed, failed, or pending).",
        "properties": {
          "billing": {
            "$ref": "#/components/schemas/JobBilling"
          },
          "capability": {
            "enum": [
              "zepto.category.products"
            ],
            "type": "string"
          },
          "error": {},
          "idempotent_replay": {
            "const": true,
            "type": "boolean"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "platform": {
            "enum": [
              "zepto"
            ],
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          },
          "results": {},
          "state": {
            "enum": [
              "queued",
              "running",
              "retrying",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "stats": {},
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "job_id",
          "request_id",
          "platform",
          "capability",
          "state",
          "idempotent_replay"
        ],
        "type": "object"
      },
      "IdempotencyConflictError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "const": "idempotency_conflict",
                "type": "string"
              },
              "message": {
                "const": "idempotency key has already been used for a different request",
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "InternalError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "const": "internal_error",
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "JobBilling": {
        "additionalProperties": false,
        "properties": {
          "credits_charged": {
            "anyOf": [
              {
                "description": "Actual credits charged. Null only when retained historical facts cannot establish the amount.",
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "credits_per_unit": {
            "anyOf": [
              {
                "description": "Snapshotted price for one billed unit. Zero only for historical free work; null when unknown.",
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "enum": [
              "per_request",
              "per_record",
              "free",
              "unknown"
            ],
            "type": "string"
          },
          "pricing": {
            "additionalProperties": false,
            "properties": {
              "rule_id": {
                "anyOf": [
                  {
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scope": {
                "anyOf": [
                  {
                    "enum": [
                      "module",
                      "platform",
                      "capability"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "enum": [
                  "manifest",
                  "price_book"
                ],
                "type": "string"
              },
              "version": {
                "anyOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "source",
              "scope",
              "version",
              "rule_id"
            ],
            "type": "object"
          },
          "units": {
            "anyOf": [
              {
                "description": "Billed units under the stated model. Null when units do not apply or cannot be established.",
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "model",
          "units",
          "credits_per_unit",
          "credits_charged",
          "pricing"
        ],
        "type": "object"
      },
      "JobErrorObject": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "Machine-readable error code (e.g. forbidden, not_found, invalid_input, upstream_timeout, upstream_error).",
            "type": "string"
          },
          "message": {
            "description": "Human-readable error description.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "JobFailedResponse": {
        "additionalProperties": false,
        "properties": {
          "capability": {
            "enum": [
              "zepto.category.products"
            ],
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/JobErrorObject"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "platform": {
            "enum": [
              "zepto"
            ],
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          },
          "results": {
            "type": "null"
          },
          "state": {
            "const": "failed",
            "type": "string"
          },
          "stats": {
            "type": "null"
          },
          "success": {
            "const": false,
            "type": "boolean"
          }
        },
        "required": [
          "job_id",
          "request_id",
          "platform",
          "capability",
          "state",
          "success",
          "error",
          "results",
          "stats"
        ],
        "type": "object"
      },
      "JobPendingResponse": {
        "additionalProperties": false,
        "properties": {
          "capability": {
            "enum": [
              "zepto.category.products"
            ],
            "type": "string"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "platform": {
            "enum": [
              "zepto"
            ],
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "queued",
              "running",
              "retrying"
            ],
            "type": "string"
          }
        },
        "required": [
          "job_id",
          "request_id",
          "platform",
          "capability",
          "state"
        ],
        "type": "object"
      },
      "JobStats": {
        "additionalProperties": false,
        "properties": {
          "duration_ms": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "failed": {
            "const": 0,
            "type": "integer"
          },
          "passed": {
            "const": 1,
            "type": "integer"
          },
          "total": {
            "const": 1,
            "type": "integer"
          }
        },
        "required": [
          "total",
          "passed",
          "failed",
          "duration_ms"
        ],
        "type": "object"
      },
      "NotFoundError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "const": "not_found",
                "type": "string"
              },
              "message": {
                "const": "job not found",
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "QuotaError": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "error": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "account_inactive",
                    "type": "string"
                  },
                  "message": {
                    "const": "an active paid account is required",
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "type": "object"
              }
            },
            "required": [
              "error"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "error": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "const": "quota_exhausted",
                    "type": "string"
                  },
                  "message": {
                    "const": "request quota exhausted for current billing period",
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "type": "object"
              }
            },
            "required": [
              "error"
            ],
            "type": "object"
          }
        ]
      },
      "RateLimitError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "const": "rate_limited",
                "type": "string"
              },
              "message": {
                "const": "rate limit exceeded",
                "type": "string"
              },
              "retry_after_ms": {
                "description": "Milliseconds until the rolling window resets enough to retry. The `retry-after` response header carries the same value rounded up to seconds.",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "code",
              "message",
              "retry_after_ms"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "UnauthorizedError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "const": "unauthorized",
                "type": "string"
              },
              "message": {
                "enum": [
                  "authentication required",
                  "invalid bearer token",
                  "missing bearer token"
                ],
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ValidationErrors": {
        "additionalProperties": false,
        "properties": {
          "errors": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "object"
          }
        },
        "required": [
          "errors"
        ],
        "type": "object"
      },
      "ZeptoCategoryProductsCompletedJob": {
        "additionalProperties": false,
        "properties": {
          "billing": {
            "$ref": "#/components/schemas/JobBilling"
          },
          "capability": {
            "enum": [
              "zepto.category.products"
            ],
            "type": "string"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "platform": {
            "enum": [
              "zepto"
            ],
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          },
          "results": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "data": {
                  "description": "Raw capability output. Its shape may evolve with the upstream source; the example is illustrative, not a compatibility guarantee.",
                  "example": {
                    "count": 5,
                    "page_number": 1,
                    "pages_fetched": 1,
                    "results": [
                      {
                        "discount_amount_paise": 8700,
                        "unit_of_measure": "PIECE",
                        "discounted_selling_price_paise": 7800,
                        "product_type": "SELLABLESKU",
                        "image_path": "cms/product_variant/fa6acfce-a598-4f3e-aa28-eb94df49d743.png",
                        "weight_in_gms": 58,
                        "country_of_origin": "India",
                        "store_product_id": "8e03ba55-b787-5b9b-9dc6-6fafd06228cd",
                        "discount_percent": 52,
                        "max_allowed_quantity": 6,
                        "mrp_paise": 16500,
                        "description": "Custard apple is a tropical fruit that grows mostly in tropical climates. The fruits are heart-shaped with light green exterior and smooth creamy white flesh and are well-known for their exquisite taste. The fruit is high in carbs, minerals, and a good source of vitamin c.",
                        "cached": true,
                        "name": "Custard Apple Semi Ripe",
                        "source_url": "https://bff-gateway.zepto.com/product-assortment-service/api/v2/store-products-by-store-subcategory-id?category_id=64374cfe-d06f-4a01-898e-c07c46462c36&page_number=1&store_id=b4dc8d65-ed2e-4142-81b6-373982b13500&subcategory_id=09e63c15-e5f7-4712-9ff8-513250b79942",
                        "brand_id": "d396c794-de67-421c-9af1-dc36df2c2471",
                        "available_quantity": 6,
                        "quantity": 6,
                        "pack_size": 2,
                        "category_id": "64374cfe-d06f-4a01-898e-c07c46462c36",
                        "l3_category_id": "5942b588-81c1-4195-afca-f776c8c4c094",
                        "rank": 1,
                        "brand": "Fruits",
                        "formatted_pack_size": "2 pcs (360 - 450 g)",
                        "image_url": "https://cdn.zeptonow.com/production/tr:w-600,ar-1000-1000,pr-true,f-auto,q-80/cms/product_variant/fa6acfce-a598-4f3e-aa28-eb94df49d743.png",
                        "product_variant_id": "b5cb2914-895d-4b3e-86d0-9bd9f9234428",
                        "store_id": "b4dc8d65-ed2e-4142-81b6-373982b13500",
                        "image_urls": [
                          "https://cdn.zeptonow.com/production/tr:w-600,ar-1000-1000,pr-true,f-auto,q-80/cms/product_variant/fa6acfce-a598-4f3e-aa28-eb94df49d743.png"
                        ],
                        "is_primary": true,
                        "primary_subcategory_id": "09e63c15-e5f7-4712-9ff8-513250b79942",
                        "product_id": "31e25f4a-c334-4c8a-acce-10a6a0677aed",
                        "selling_price_paise": 7800,
                        "is_active": true,
                        "product_url": "https://www.zepto.com/pn/custard-apple-semi-ripe/pvid/b5cb2914-895d-4b3e-86d0-9bd9f9234428",
                        "shelf_life_in_hours": "4 days"
                      },
                      {
                        "discount_amount_paise": 4100,
                        "unit_of_measure": "PIECE",
                        "discounted_selling_price_paise": 3100,
                        "product_type": "SELLABLESKU",
                        "image_path": "cms/product_variant/2ee02a46-99b9-4fc7-b389-0e881c02fe56.jpeg",
                        "weight_in_gms": 200,
                        "country_of_origin": "India",
                        "store_product_id": "44cd61e6-c62a-5661-99c0-e2ac41309cb9",
                        "discount_percent": 56,
                        "max_allowed_quantity": 6,
                        "mrp_paise": 7200,
                        "cached": true,
                        "name": "Banana Robusta",
                        "source_url": "https://bff-gateway.zepto.com/product-assortment-service/api/v2/store-products-by-store-subcategory-id?category_id=64374cfe-d06f-4a01-898e-c07c46462c36&page_number=1&store_id=b4dc8d65-ed2e-4142-81b6-373982b13500&subcategory_id=09e63c15-e5f7-4712-9ff8-513250b79942",
                        "brand_id": "d69ba762-dfca-47f4-8e52-d09a6d1ffbd0",
                        "available_quantity": 6,
                        "quantity": 6,
                        "pack_size": 4,
                        "category_id": "64374cfe-d06f-4a01-898e-c07c46462c36",
                        "l3_category_id": "d16cc33d-74e8-480d-9414-5dc06cdb47ea",
                        "rank": 2,
                        "brand": "Unbranded",
                        "formatted_pack_size": "4 pcs",
                        "image_url": "https://cdn.zeptonow.com/production/tr:w-600,ar-1000-1000,pr-true,f-auto,q-80/cms/product_variant/2ee02a46-99b9-4fc7-b389-0e881c02fe56.jpeg",
                        "product_variant_id": "436c0025-de54-4748-a189-79e292f26071",
                        "store_id": "b4dc8d65-ed2e-4142-81b6-373982b13500",
                        "image_urls": [
                          "https://cdn.zeptonow.com/production/tr:w-600,ar-1000-1000,pr-true,f-auto,q-80/cms/product_variant/2ee02a46-99b9-4fc7-b389-0e881c02fe56.jpeg"
                        ],
                        "is_primary": true,
                        "primary_subcategory_id": "09e63c15-e5f7-4712-9ff8-513250b79942",
                        "product_id": "c6bce5f8-a70b-4806-99c1-c2b8df503e1a",
                        "selling_price_paise": 3100,
                        "is_active": true,
                        "product_url": "https://www.zepto.com/pn/banana-robusta/pvid/436c0025-de54-4748-a189-79e292f26071",
                        "shelf_life_in_hours": "3 days"
                      },
                      {
                        "discount_amount_paise": 7600,
                        "unit_of_measure": "GRAM",
                        "discounted_selling_price_paise": 7300,
                        "product_type": "SELLABLESKU",
                        "image_path": "cms/product_variant/cf8f80c4-1b42-46bc-a3cf-55360cd418e9.jpeg",
                        "weight_in_gms": 500,
                        "country_of_origin": "India",
                        "store_product_id": "22ba089c-c0c2-5d4a-b4d6-d11d823b088f",
                        "discount_percent": 51,
                        "max_allowed_quantity": 6,
                        "mrp_paise": 14900,
                        "description": "Elaichi bananas might be small in size but are equally nutritious as any regular-sized banana. These dwarf bananas contain far lesser calories than regular bananas, which aids metabolism. Elaichi banana also helps the body maintain a regular heartbeat, lower blood pressure and a proper balance of water in the body.",
                        "cached": true,
                        "name": "Banana Elaichi (Yelakki)",
                        "source_url": "https://bff-gateway.zepto.com/product-assortment-service/api/v2/store-products-by-store-subcategory-id?category_id=64374cfe-d06f-4a01-898e-c07c46462c36&page_number=1&store_id=b4dc8d65-ed2e-4142-81b6-373982b13500&subcategory_id=09e63c15-e5f7-4712-9ff8-513250b79942",
                        "brand_id": "d69ba762-dfca-47f4-8e52-d09a6d1ffbd0",
                        "available_quantity": 6,
                        "quantity": 6,
                        "pack_size": 500,
                        "category_id": "64374cfe-d06f-4a01-898e-c07c46462c36",
                        "l3_category_id": "d16cc33d-74e8-480d-9414-5dc06cdb47ea",
                        "rank": 3,
                        "brand": "Unbranded",
                        "formatted_pack_size": "500 g",
                        "image_url": "https://cdn.zeptonow.com/production/tr:w-600,ar-1000-1000,pr-true,f-auto,q-80/cms/product_variant/cf8f80c4-1b42-46bc-a3cf-55360cd418e9.jpeg",
                        "product_variant_id": "db471557-f745-4574-9e82-1916a88d9e6b",
                        "store_id": "b4dc8d65-ed2e-4142-81b6-373982b13500",
                        "image_urls": [
                          "https://cdn.zeptonow.com/production/tr:w-600,ar-1000-1000,pr-true,f-auto,q-80/cms/product_variant/cf8f80c4-1b42-46bc-a3cf-55360cd418e9.jpeg"
                        ],
                        "is_primary": true,
                        "primary_subcategory_id": "09e63c15-e5f7-4712-9ff8-513250b79942",
                        "product_id": "89412b09-5a51-45b0-bb76-83a520cad0c8",
                        "selling_price_paise": 7300,
                        "is_active": true,
                        "product_url": "https://www.zepto.com/pn/banana-elaichi-yelakki/pvid/db471557-f745-4574-9e82-1916a88d9e6b",
                        "shelf_life_in_hours": "3 days"
                      }
                    ],
                    "source_url": "https://bff-gateway.zepto.com/product-assortment-service/api/v2/store-products-by-store-subcategory-id?category_id=64374cfe-d06f-4a01-898e-c07c46462c36&page_number=1&store_id=b4dc8d65-ed2e-4142-81b6-373982b13500&subcategory_id=09e63c15-e5f7-4712-9ff8-513250b79942"
                  }
                },
                "error": {
                  "type": "null"
                },
                "index": {
                  "const": 0,
                  "type": "integer"
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "index",
                "url",
                "data",
                "error"
              ],
              "type": "object"
            },
            "maxItems": 1,
            "minItems": 1,
            "type": "array"
          },
          "state": {
            "const": "completed",
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/JobStats"
          },
          "success": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "job_id",
          "request_id",
          "platform",
          "capability",
          "state",
          "success",
          "results",
          "billing",
          "stats"
        ],
        "type": "object"
      },
      "ZeptoCategoryProductsExecuteRequest": {
        "additionalProperties": false,
        "example": {
          "capability": "zepto.category.products",
          "input": {
            "limit": 5,
            "url": "https://www.zepto.com/cn/fruits-vegetables/fresh-fruits/cid/64374cfe-d06f-4a01-898e-c07c46462c36/scid/09e63c15-e5f7-4712-9ff8-513250b79942"
          }
        },
        "properties": {
          "capability": {
            "enum": [
              "zepto.category.products"
            ],
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/ZeptoCategoryProductsInput"
          },
          "network": {
            "$ref": "#/components/schemas/ExecuteNetwork"
          },
          "timeout_ms": {
            "description": "Optional request timeout in milliseconds. Values above the capability timeout are rejected.",
            "maximum": 180000,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "capability",
          "input"
        ],
        "type": "object"
      },
      "ZeptoCategoryProductsInput": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Input for listing products within a Zepto category or subcategory.",
        "properties": {
          "category_id": {
            "description": "Zepto category ID to browse.",
            "type": "string"
          },
          "latitude": {
            "description": "Latitude for location-based store resolution.",
            "type": "number"
          },
          "limit": {
            "default": 20,
            "description": "Maximum number of products to return per page.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "longitude": {
            "description": "Longitude for location-based store resolution.",
            "type": "number"
          },
          "max_pages": {
            "default": 10,
            "description": "Maximum number of pages to fetch.",
            "maximum": 20,
            "minimum": 1,
            "type": "integer"
          },
          "max_records": {
            "minimum": 1,
            "type": "integer"
          },
          "page_number": {
            "default": 1,
            "description": "One-based page number to start from.",
            "minimum": 1,
            "type": "integer"
          },
          "store_id": {
            "description": "Zepto store ID. Defaults to the public Bangalore sample store.",
            "type": "string"
          },
          "subcategory_id": {
            "description": "Zepto subcategory ID to browse.",
            "type": "string"
          },
          "url": {
            "description": "Direct URL to a Zepto category page.",
            "type": "string"
          }
        },
        "title": "ListCategoryProductsInput",
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "bearerFormat": "API Key",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scrape India's Zepto q-commerce platform: product details, search, category listings, ad placements, place/location resolution, search filters, and platform health checks. No login required.\nThis spec includes only the live `Zepto` capabilities exposed by Upscrape.\nExecution uses the generic `POST /execute` endpoint and job polling uses `GET /jobs/{id}`.\nSupported capabilities: `zepto.category.products`\n## Rate limiting\n\nRequests are rate-limited per API key at **1200 requests per minute** on a rolling window. Every response includes `x-ratelimit-limit`, `x-ratelimit-remaining`, and `x-ratelimit-reset` (Unix ms) headers so clients can self-pace. When the limit is exceeded the API returns `429` with a `rate_limited` error body and a `retry-after` header in seconds plus a `retry_after_ms` field on the body for finer-grained backoff.",
    "title": "Zepto API",
    "version": "v0.1.11"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {
    "/execute": {
      "post": {
        "description": "All executions are asynchronous. Submit a capability-specific payload to `POST /execute`, then poll the returned `job_id`.",
        "operationId": "zepto_execute",
        "parameters": [
          {
            "description": "Optional idempotency key. Reusing the same key with the same request replays the original job.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "description": "Request synchronous completion. Use `wait=N` to hold the connection up to N seconds (max 300). If the job completes within the window, the response is `200` with full results (same shape as `GET /jobs/{id}`). If not, the response is the normal `202` with a `job_id` for polling. Omit this header for default asynchronous behavior.",
            "examples": {
              "wait30": {
                "summary": "Wait up to 30 seconds",
                "value": "wait=30"
              },
              "wait5": {
                "summary": "Wait up to 5 seconds",
                "value": "wait=5"
              }
            },
            "in": "header",
            "name": "Prefer",
            "required": false,
            "schema": {
              "example": "wait=30",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "capability": "zepto.category.products",
                "input": {
                  "limit": 5,
                  "url": "https://www.zepto.com/cn/fruits-vegetables/fresh-fruits/cid/64374cfe-d06f-4a01-898e-c07c46462c36/scid/09e63c15-e5f7-4712-9ff8-513250b79942"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/ZeptoCategoryProductsExecuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ZeptoCategoryProductsCompletedJob"
                    },
                    {
                      "$ref": "#/components/schemas/ExecuteReplayResponse"
                    },
                    {
                      "$ref": "#/components/schemas/JobFailedResponse"
                    }
                  ]
                }
              }
            },
            "description": "Job completed within the `Prefer: wait` window, or existing job replayed via idempotency key.",
            "headers": {
              "Preference-Applied": {
                "description": "Present when the server honored the `Prefer: wait` preference.",
                "schema": {
                  "example": "wait=30",
                  "type": "string"
                }
              },
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "capability": "zepto.category.products",
                  "job_id": "00000000-0000-0000-0000-000000000001",
                  "platform": "zepto",
                  "request_id": "00000000-0000-0000-0000-000000000001",
                  "state": "queued",
                  "success": false
                },
                "schema": {
                  "$ref": "#/components/schemas/ExecuteAcceptedResponse"
                }
              }
            },
            "description": "Job accepted and queued.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaError"
                }
              }
            },
            "description": "The authenticated account cannot execute the request."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdempotencyConflictError"
                }
              }
            },
            "description": "Idempotency conflict"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationErrors"
                    },
                    {
                      "$ref": "#/components/schemas/CredentialsRequiredError"
                    }
                  ]
                }
              }
            },
            "description": "The request body failed validation."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limited",
                    "message": "rate limit exceeded",
                    "retry_after_ms": 4200
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            },
            "description": "The per-API-key rate limit has been exceeded. Clients should back off until `retry_after_ms` has elapsed (or `retry-after` seconds).",
            "headers": {
              "retry-after": {
                "description": "Seconds until the client may retry (ceiling of `retry_after_ms`).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            },
            "description": "Unexpected server error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Queue a Zepto capability run",
        "tags": [
          "Execution"
        ]
      }
    },
    "/jobs/{id}": {
      "get": {
        "description": "Get job status and result",
        "operationId": "zepto_getJob",
        "parameters": [
          {
            "description": "The job ID returned by `POST /execute`.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ZeptoCategoryProductsCompletedJob"
                    },
                    {
                      "$ref": "#/components/schemas/JobFailedResponse"
                    }
                  ]
                }
              }
            },
            "description": "Completed or terminal job state.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "capability": "zepto.category.products",
                  "job_id": "00000000-0000-0000-0000-000000000001",
                  "platform": "zepto",
                  "request_id": "00000000-0000-0000-0000-000000000001",
                  "state": "running",
                  "success": false
                },
                "schema": {
                  "$ref": "#/components/schemas/JobPendingResponse"
                }
              }
            },
            "description": "Job is still queued, running, or retrying.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Job not found"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limited",
                    "message": "rate limit exceeded",
                    "retry_after_ms": 4200
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            },
            "description": "The per-API-key rate limit has been exceeded. Clients should back off until `retry_after_ms` has elapsed (or `retry-after` seconds).",
            "headers": {
              "retry-after": {
                "description": "Seconds until the client may retry (ceiling of `retry_after_ms`).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Poll a Zepto job",
        "tags": [
          "Jobs"
        ]
      }
    },
    "/jobs/{id}/result": {
      "get": {
        "description": "Backward-compatible alias for `/jobs/{id}`.",
        "operationId": "zepto_getJobResult",
        "parameters": [
          {
            "description": "The job ID returned by `POST /execute`.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ZeptoCategoryProductsCompletedJob"
                    },
                    {
                      "$ref": "#/components/schemas/JobFailedResponse"
                    }
                  ]
                }
              }
            },
            "description": "Completed or terminal job state.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "capability": "zepto.category.products",
                  "job_id": "00000000-0000-0000-0000-000000000001",
                  "platform": "zepto",
                  "request_id": "00000000-0000-0000-0000-000000000001",
                  "state": "running",
                  "success": false
                },
                "schema": {
                  "$ref": "#/components/schemas/JobPendingResponse"
                }
              }
            },
            "description": "Job is still queued, running, or retrying.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            },
            "description": "Job not found"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limited",
                    "message": "rate limit exceeded",
                    "retry_after_ms": 4200
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            },
            "description": "The per-API-key rate limit has been exceeded. Clients should back off until `retry_after_ms` has elapsed (or `retry-after` seconds).",
            "headers": {
              "retry-after": {
                "description": "Seconds until the client may retry (ceiling of `retry_after_ms`).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-limit": {
                "description": "Per-API-key request ceiling over the rolling window.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests remaining in the current window before throttling.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix epoch milliseconds at which the current window resets.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Poll a Zepto job",
        "tags": [
          "Jobs"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://data.upscrape.com"
    }
  ],
  "tags": [
    {
      "description": "Submit asynchronous capability runs.",
      "name": "Execution"
    },
    {
      "description": "Poll queued jobs for status and results.",
      "name": "Jobs"
    }
  ]
}