{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopee Official Shop Scraper",
    "description": "Extract the official brand shops in any Shopee category across 9 storefronts — Vietnam, Indonesia, Singapore, Malaysia, Thailand, Philippines, Taiwan, Brazil, Mexico. Rows carry shop_name, username, brand_name, shop_url and logo_url, plus optional followers and rating. Export JSON, CSV or Excel.",
    "version": "2.0",
    "x-build-id": "flf8KZYTc3hWS6cEy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/herus13~shopee-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-herus13-shopee-shop-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/herus13~shopee-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-herus13-shopee-shop-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/herus13~shopee-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-herus13-shopee-shop-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": {
          "category_ids": {
            "title": "Category IDs",
            "type": "array",
            "description": "Shopee category IDs whose official (brand-verified) shops you want. IDs are per storefront and never shared between countries. Find one in a category URL: https://shopee.vn/Men-Clothes-cat.11035567 has category ID 11035567. Give either category_ids or discover_all — leave empty and turn discover_all on to sweep every official-shop category in the selected country instead. A category with no official-shop directory returns no rows and is not charged; the run reports which IDs came back empty.",
            "items": {
              "type": "string"
            }
          },
          "discover_all": {
            "title": "Scrape all categories",
            "type": "boolean",
            "description": "Sweep every official-shop category in the selected country, so there are no IDs to look up. Give either discover_all or category_ids: turn this on only while category_ids is empty, and it is ignored whenever category_ids is set. Default false. A whole-country sweep can return a great many shops, so pair it with max_results to cap what a run returns per category.",
            "default": false
          },
          "country": {
            "title": "Country",
            "enum": [
              "vn",
              "id",
              "sg",
              "my",
              "th",
              "ph",
              "tw",
              "br",
              "mx"
            ],
            "type": "string",
            "description": "Shopee storefront to list shops from. It decides which shops exist, the language of their names and the domain of every shop_url. Default vn. Supported: vn Vietnam, id Indonesia, sg Singapore, my Malaysia, th Thailand, ph Philippines, tw Taiwan, br Brazil, mx Mexico. Category IDs belong to one storefront, so change the IDs whenever you change this.",
            "default": "vn"
          },
          "scrape_analytics": {
            "title": "Scrape shop analytics",
            "type": "boolean",
            "description": "Add the analytics set to every shop: follower count, rating, item count, chat response rate and time, location, verification and Preferred+ badges, storefront description and last-active date. Default false, which returns the directory fields only and is the fast, cheap listing. Each enriched shop is charged one extra shop-analytics event on top of its shop event.",
            "default": false
          },
          "max_results": {
            "title": "Max results per category",
            "minimum": 1,
            "type": "integer",
            "description": "Most shops returned per category, minimum 1. Leave empty to page through a category until Shopee's own total for it is exhausted, which is what a complete directory needs. Set it to cap a large run: with discover_all on it applies to each category separately, so a run returns roughly this many shops times the number of categories found."
          },
          "offset": {
            "title": "Start offset",
            "minimum": 0,
            "type": "integer",
            "description": "Where each category starts, counted in shops. Default 0, minimum 0 — the first shop in the category. Raise it to resume a large category from an exact position instead of paging from the beginning. It applies to every category in the run, not just the first.",
            "default": 0
          },
          "limit": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many shops each page of results asks for. Default 50, minimum 1, maximum 100. It sets the page size only, not how many shops a run returns in total — max_results does that. Leave it at 50 unless you are resuming a category from a specific offset.",
            "default": 50
          },
          "proxyUrls": {
            "title": "Your own proxy URLs (optional)",
            "type": "array",
            "description": "Leave empty: the run uses the residential proxy this actor ships with, included in the price of the run. To route the run through your own provider instead, add one gateway URL per entry, for example http://user:pass@host:port — works with any provider that issues URLs (DataImpulse, Bright Data, Oxylabs, Smartproxy, or your own). When set, these are used exactly as entered and nothing else is.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}