{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Email Scraper",
    "description": "Extract publicly indexed Alibaba seller emails from Google search results and public profile pages.",
    "version": "1.1",
    "x-build-id": "kMnLUHCPBgjtDepGG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~alibaba-email-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-alibaba-email-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/w3crawler~alibaba-email-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-alibaba-email-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/w3crawler~alibaba-email-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-alibaba-email-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": {
          "query": {
            "title": "Default search query",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Supplier keyword used to build a public Google site search when no explicit startUrls or profileUrls are provided.",
            "default": "industrial supplier"
          },
          "queries": {
            "title": "Search queries",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional supplier keywords. Each becomes a public Google site:alibaba.com source; explicit startUrls/profileUrls take precedence over generated searches.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "profileUrls": {
            "title": "Alibaba source URLs",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional public Alibaba supplier-search, company-profile, supplier-index, or product URLs. These are combined with startUrls and suppress generated Google searches.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Public start URLs",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional Google or Alibaba URLs in request-list form. URLs are deduplicated, paginated per source, and share one global maxResults limit.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "description": "HTTPS Google search or public Alibaba page URL.",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "emailDomains": {
            "title": "Email domain filters",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional lowercase or @-prefixed domains. A contact passes when its domain equals a value or is a subdomain of it.",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 120
            }
          },
          "textQuery": {
            "title": "Text filter",
            "maxLength": 200,
            "type": "string",
            "description": "Optional case-insensitive text match across email, supplier, company, product, country, badges, tags, markets, revenue, and context fields. Missing text does not match."
          },
          "supplierCountry": {
            "title": "Supplier country",
            "maxLength": 100,
            "type": "string",
            "description": "Optional case-insensitive exact match against the observed Country/Region value, such as China or Vietnam."
          },
          "minSupplierYears": {
            "title": "Minimum supplier years",
            "minimum": 0,
            "maximum": 200,
            "type": "number",
            "description": "Keep only records with an observed supplier tenure at or above this value. Records without a tenure value do not pass."
          },
          "minResponseRate": {
            "title": "Minimum response rate",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Keep only records with an observed response rate at or above this percentage. Records without a response rate do not pass."
          },
          "requiredBadges": {
            "title": "Required supplier badges",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Keep records whose observed badge list contains every requested value, case-insensitively, such as Gold Supplier or Trade Assurance.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "relevance",
              "supplier_years_desc",
              "response_rate_desc",
              "company_asc",
              "country_asc",
              "email_asc"
            ],
            "type": "string",
            "description": "Relevance keeps source/page/card order. Other choices sort globally after all permitted pages are fetched; missing numeric values sort last and text ties are stable.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Maximum contacts",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Global maximum number of unique email-bearing contact records emitted across every source and page.",
            "default": 50
          },
          "maxPages": {
            "title": "Maximum pages per source",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum pages followed for each source URL. Use 0 for automatic pagination up to the hard 100-page safety cap.",
            "default": 1
          },
          "deduplicate": {
            "title": "Deduplicate contacts",
            "type": "boolean",
            "description": "Merge repeated public observations globally by normalized email across pages and sources.",
            "default": true
          },
          "maxEmailsPerResult": {
            "title": "Emails per source page",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum parsed email-bearing rows considered from each response before filters. The global maxResults limit still applies.",
            "default": 5
          },
          "includeProducts": {
            "title": "Include product details",
            "type": "boolean",
            "description": "Include observed product title/URL pairs and productUrls. The first productUrl remains available as the primary URL when present.",
            "default": true
          },
          "maxProductsPerResult": {
            "title": "Products per contact",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum product title/URL pairs retained per contact. Use 0 to omit product arrays while retaining the observed product count.",
            "default": 5
          },
          "includeTags": {
            "title": "Include supplier tags",
            "type": "boolean",
            "description": "Keep the bounded Tags list observed on supplier cards.",
            "default": true
          },
          "includeContext": {
            "title": "Include email context",
            "type": "boolean",
            "description": "Keep a bounded public contextSnippet around each normalized email. When enabled, the snippet contains the exact email.",
            "default": true
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum delay between starts of public requests. Use respectful pacing for live sources.",
            "default": 250
          },
          "maxConcurrency": {
            "title": "Source concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of source URLs processed concurrently. Pagination within one source stays sequential.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Finite retries for transient network, timeout, 408, 425, 429, and 5xx responses. Challenge and access-denied pages fail closed.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for one public response.",
            "default": 30
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 100000,
            "maximum": 30000000,
            "type": "integer",
            "description": "Safety cap for one HTML or JSON response.",
            "default": 20000000
          },
          "proxyConfiguration": {
            "title": "Apify Proxy",
            "type": "object",
            "description": "Optional standard Apify Proxy route for permitted public requests. Proxying never bypasses robots, login, CAPTCHA, or access controls.",
            "properties": {
              "useApifyProxy": {
                "title": "Use Apify Proxy",
                "description": "Route permitted public requests through standard Apify Proxy.",
                "type": "boolean"
              },
              "apifyProxyGroups": {
                "title": "Proxy groups",
                "description": "Optional standard Apify Proxy groups.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "apifyProxyCountry": {
                "title": "Proxy country",
                "description": "Optional two-letter standard Apify Proxy country code.",
                "type": "string",
                "pattern": "^[A-Za-z]{2}$"
              }
            },
            "additionalProperties": false
          },
          "userAgent": {
            "title": "User agent",
            "maxLength": 300,
            "type": "string",
            "description": "Optional transparent single-line HTTP user-agent string."
          },
          "timeoutMs": {
            "title": "Legacy timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Backward-compatible alias for requestTimeoutSecs. Prefer requestTimeoutSecs in new inputs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}