{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopee Scraper",
    "description": "Scrape Shopee product search results and product detail pages across Singapore, Malaysia, Philippines, Thailand, Vietnam, Indonesia, Brazil, Mexico, and Taiwan. Returns flat MCP-ready product records with price, sales, ratings, stock, seller, and product URLs.",
    "version": "0.1",
    "x-build-id": "tTdSzKHyDVdrY7sv4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~shopee-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-shopee-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~shopee-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-shopee-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~shopee-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-shopee-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": {
          "providerMode": {
            "title": "Provider mode",
            "enum": [
              "auto",
              "owned",
              "scrapeless"
            ],
            "type": "string",
            "description": "Use this when choosing the Shopee extraction backend. auto uses SCRAPELESS_API_KEY when configured, then owned browser scraping; scrapeless requires that actor secret and is the recommended production path. Defaults to auto for safer setup. This is not a Shopee login mode.",
            "default": "auto"
          },
          "country": {
            "title": "Shopee country",
            "enum": [
              "SG",
              "MY",
              "PH",
              "TH",
              "VN",
              "ID",
              "BR",
              "MX",
              "TW"
            ],
            "type": "string",
            "description": "Use this when selecting the Shopee marketplace domain to scrape. Accepted values include SG, MY, PH, TH, VN, ID, BR, MX, and TW. Defaults to SG and controls currency, locale, and generated search URLs. This is not a shipping destination filter inside Shopee.",
            "default": "SG"
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Use this when you want Shopee search result products from keywords such as wireless earbuds or korean sunscreen. Enter one query per line; the actor builds Shopee search URLs for the selected country. Defaults to an empty list and works together with Start URLs. This is not for seller IDs or review scraping.",
            "items": {
              "type": "string"
            },
            "default": [
              "wireless earbuds"
            ]
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Use this when you already have Shopee product, search, category, or shop search URLs. Accepted format is a Shopee URL such as https://shopee.sg/search?keyword=keyboard or https://shopee.sg/product/22739277/131564786. Defaults to an empty list and can be combined with Search queries. This is not for non-Shopee marketplace URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxProducts": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Use this to cap the number of product records returned and charged. Accepted range is 1 to 1000 products, with 50 as the default. The actor stops charging once this cap is reached. This is not a page count.",
            "default": 50
          },
          "maxSearchPages": {
            "title": "Maximum search pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Use this when scraping keyword, category, or shop listing pages that need pagination. Accepted range is 1 to 20 pages, with 3 as the default. Higher values may take longer because Shopee rate limits aggressively. This does not increase results beyond Maximum products.",
            "default": 3
          },
          "includeDetails": {
            "title": "Include product details",
            "type": "boolean",
            "description": "Use this when you want detail-page fields such as description, stock, variants, and richer seller data. Defaults to true and visits product detail URLs when search data is incomplete. Turn it off for faster listing-only monitoring. This is not review extraction.",
            "default": true
          },
          "sortBy": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "latest",
              "top_sales"
            ],
            "type": "string",
            "description": "Use this when Shopee search results should be ordered by relevance, latest, or top sales. Accepted values are relevance, latest, and top_sales; default is relevance. This applies only to generated keyword search URLs. This is not a filter for price or rating.",
            "default": "relevance"
          },
          "includeRawData": {
            "title": "Include raw data",
            "type": "boolean",
            "description": "Use this for debugging Shopee schema changes or building custom downstream parsers. Defaults to false to keep MCP output compact and stable. When true, each record may include a trimmed rawData object from Shopee responses. This is not needed for normal product exports.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use this only when you need custom Apify Proxy groups or a country-specific proxy setup. Defaults to Apify residential proxy settings because Shopee blocks many datacenter sessions. Leave unchanged for normal runs. This is not a Shopee account or cookie setting.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}