{
  "openapi": "3.0.1",
  "info": {
    "title": "Shein Product Scraper — Prices, Variants & Reviews",
    "description": "Scrape Shein products by keyword search, category URL, product URL, or goods ID. Returns price, variants, sizes, colors, images, rating, description, and optional reviews. Browser-based via Apify Residential proxy. MCP-ready.",
    "version": "0.7",
    "x-build-id": "JywoXwpaCRUCkePNK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~shein-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-shein-product-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/khadinakbar~shein-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-shein-product-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/khadinakbar~shein-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-shein-product-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Free-text keywords searched on Shein, one product list per query (e.g. 'summer dress', 'men hoodie'). Each query opens Shein's pdsearch page and collects product cards up to maxItems. Leave empty if you are passing startUrls or goodsIds instead. NOT a URL — put Shein URLs in startUrls.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Shein URLs",
            "type": "array",
            "description": "Shein URLs to scrape — product pages (…-p-1234567.html), search pages (/pdsearch/…), or category pages. The URL type is auto-detected: product URLs return one detail record each; search/category URLs return product lists up to maxItems. Use the exact domain you want (e.g. https://us.shein.com/…). NOT for keywords — use searchQueries for plain text.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "goodsIds": {
            "title": "Goods IDs",
            "type": "array",
            "description": "Shein numeric goods IDs (the digits in a product URL after '-p-', e.g. '100123456'). Each ID is resolved to a product detail page in the selected country. Use this when you already have IDs and want the fastest detail path. NOT a SKU or barcode — it is Shein's internal goods_id.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country / storefront",
            "enum": [
              "us",
              "uk",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "global"
            ],
            "type": "string",
            "description": "Shein storefront and matching residential proxy country, which drives currency and localized pricing (e.g. 'us' → us.shein.com in USD). Pick the market whose prices you want. Defaults to 'us'. Does NOT translate product text — Shein localizes server-side per storefront.",
            "default": "us"
          },
          "maxItems": {
            "title": "Max items per query/URL",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of products collected per search query or listing URL (paginating as needed). Product-URL and goodsId inputs always return one record each and ignore this cap. Range 1–500, default 20. Keep it low for fast, cheap test runs.",
            "default": 20
          },
          "scrapeProductDetails": {
            "title": "Scrape full product detail",
            "type": "boolean",
            "description": "When true, every product found via search/category is opened and enriched with full detail (variants, SKUs, all images, description, attributes) and billed as a product. When false, only the lightweight listing card (title, price, image, rating) is returned and billed as a cheaper search-result. Product-URL and goodsId inputs are always full detail. Default true.",
            "default": true
          },
          "scrapeReviews": {
            "title": "Scrape reviews",
            "type": "boolean",
            "description": "When true, up to maxReviews customer reviews (rating, text, size/color bought, fit) are embedded in each product detail record. Adds extra page work and time but no separate charge. Ignored for listing-only items (scrapeProductDetails=false). Default false.",
            "default": false
          },
          "maxReviews": {
            "title": "Max reviews per product",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of reviews embedded per product when scrapeReviews is true. Reviews are the most recent first. Range 1–100, default 10. Has no effect when scrapeReviews is false.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Shein blocks datacenter IPs, so the actor uses a residential proxy server-side (DataImpulse, matched to the storefront country) regardless of this setting. Only override if you want to force a specific Apify proxy and have residential access. Leave as default otherwise.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}