{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Listings Scraper & Supplier Profiles",
    "description": "Scrape Alibaba product listings and supplier profiles to collect product names, prices, minimum order quantities, ratings, supplier details, locations, certifications, and contact information for sourcing, supplier discovery, competitor research, and B2B lead generation.",
    "version": "0.1",
    "x-build-id": "c80iPiIvY2KvCGWME"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~alibaba-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-alibaba-listings-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/simpleapi~alibaba-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-alibaba-listings-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/simpleapi~alibaba-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-alibaba-listings-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔎 Keywords or Alibaba search URLs",
            "type": "array",
            "description": "One entry per line.\n\n• Keyword — e.g. cnc machining parts\n• Full URL — e.g. https://www.alibaba.com/trade/search?SearchText=led%20grow%20light&country=US&moqt=5\n\nWhen you paste a URL, its filters are re-sent to Alibaba and its page number is used as the starting page.",
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "title": "🔢 Listings per search",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "How many listings to keep for each keyword/URL.\n\n• 0 = keep going until Alibaba stops returning new listings (capped at 30 pages per search)\n• 1–10000 = stop after this many\n\nOnly the rows you asked for are requested — the page size is matched to what is left, so nothing is fetched and thrown away.",
            "default": 10
          },
          "fetchSupplierProfiles": {
            "title": "🏭 Read each supplier's minisite",
            "type": "boolean",
            "description": "Adds isAudited (the platform's real assessment flag), yearsOnAlibaba and isPaidMember.\n\nCost: exactly one request per UNIQUE supplier, cached for the whole run. Minisite pages are large (168 KB – 1.1 MB), so a run over hundreds of distinct suppliers takes noticeably longer.\n\nWhen a minisite cannot be read, the three fields stay null and profileFetched is false — nothing is ever guessed.",
            "default": true
          },
          "maxSupplierProfiles": {
            "title": "🧮 Supplier minisites per run",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on minisite requests for the whole run. Suppliers past the cap still ship their listing row with profileFetched = false.",
            "default": 25
          },
          "oneRowPerSupplier": {
            "title": "🏢 One row per supplier",
            "type": "boolean",
            "description": "Collapse the results into a supplier list: one row per company, keeping its first listing, with listingsFromThisSupplier telling you how many of its listings matched. Collapsing happens before anything is saved.",
            "default": false
          },
          "keepOnlyAuditedSuppliers": {
            "title": "🛡️ Keep only audited suppliers",
            "type": "boolean",
            "description": "Drop every row whose minisite does not say companyHasPassAssessment = true. Needs the minisite lookup above. Rows whose minisite could not be read are dropped rather than guessed, so this filter is strict by design.",
            "default": false
          },
          "onlyVerifiedSuppliers": {
            "title": "✅ Assessed / verified suppliers only",
            "type": "boolean",
            "description": "Sends assessmentCompany=true and verifiedPro=1. Alibaba accepts both and narrows the result set, but no listing field states verification status — with the minisite lookup on, the run logs how many of the returned suppliers really carry the audited flag.",
            "default": false
          },
          "minSupplierRating": {
            "title": "⭐ Minimum store rating",
            "enum": [
              "any",
              "4~",
              "4.5~",
              "5~"
            ],
            "type": "string",
            "description": "Sends Alibaba's store_reviews filter. Suppliers without a rating are excluded by Alibaba when this is set.",
            "default": "any"
          },
          "proxyConfiguration": {
            "title": "🌍 Proxy (also decides your price currency)",
            "type": "object",
            "description": "This setting is actually used: turn it off and no proxy is used; pick a group or country and that is what the requests go through.\n\nResidential + US is the default because it gives USD prices and the cleanest access."
          },
          "autoEscalateWhenBlocked": {
            "title": "🔁 Escalate through Apify Proxy when blocked",
            "type": "boolean",
            "description": "Alibaba answers a blocked request with HTTP 200 and a JSON punish body. When that happens, retry the same request through Apify Proxy (direct → datacenter → residential) even if the proxy above is off. Turn this off to keep a run strictly on the network you chose.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}