{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Email Scraper & Company Details",
    "description": "Alibaba Email Scraper: Extract publicly available business emails and company details, including names, categories, locations, websites, product information, and supplier profiles. Build enriched B2B datasets for prospecting, supplier research, market analysis, and business intelligence.",
    "version": "0.2",
    "x-build-id": "68m4PtcN7uGF0map1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~alibaba-email-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-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/scrapier~alibaba-email-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-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/scrapier~alibaba-email-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-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": {
          "searchTerms": {
            "title": "🔍 Search Terms",
            "type": "array",
            "description": "Product or niche keywords to search on Alibaba (e.g. ['led lights', 'phone case', 'cosmetics']). Each term is queried on Google with a site:alibaba.com filter to find supplier emails, and against Alibaba's supplier API to attach the matching company profile. Also accepts the legacy key 'keywords'.",
            "items": {
              "type": "string"
            }
          },
          "includeSupplierProfile": {
            "title": "🏭 Attach Supplier Company Profile",
            "type": "boolean",
            "description": "When enabled, each email lead is joined with the top Alibaba supplier record for its keyword — companyName, supplierCountry, goldSupplierYears, supplierRating and the derived supplierTrustScore. Turn off for a pure email-only run. Default: true.",
            "default": true
          },
          "minGoldSupplierYears": {
            "title": "🥇 Minimum Gold-Supplier Years",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Only keep leads whose joined supplier has at least this many Gold-Supplier years (Alibaba tenure/trust signal). 0 = no filter. Example: 3 keeps only suppliers with 3+ Gold-Supplier years. Default: 0.",
            "default": 0
          },
          "emailDomainFilter": {
            "title": "📧 Email Domain Filter",
            "type": "array",
            "description": "Optional: only keep emails ending in these domains (e.g. ['@gmail.com', '.cn', '@company.com']). Leave empty to collect every domain. Also accepts the legacy key 'emailDomains'.",
            "items": {
              "type": "string"
            }
          },
          "supplierLocation": {
            "title": "📍 Supplier Location",
            "type": "string",
            "description": "Optional: add a location term to the search query (e.g. 'Guangzhou', 'Shenzhen', 'Vietnam') to bias results toward a region. Leave empty for global. Also accepts the legacy key 'location'.",
            "default": ""
          },
          "maxLeads": {
            "title": "📊 Max Leads per Keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of email leads to collect per keyword (default: 20). Also accepts the legacy key 'maxEmails'."
          },
          "marketplace": {
            "title": "🌐 Target Marketplace",
            "enum": [
              "Alibaba"
            ],
            "type": "string",
            "description": "B2B marketplace to mine for supplier records and business emails (Alibaba). Drives the site: search dork and the network label on every row. Also accepts the legacy key 'platform'."
          },
          "emailSearchEngine": {
            "title": "⚙️ Email Search Engine",
            "enum": [
              "legacy",
              "residential"
            ],
            "type": "string",
            "description": "Engine for the additive Google email-discovery lane — selects which Apify proxy group the Google search runs through. Legacy: GOOGLE_SERP proxy group (Google's SERP-optimized IPs). Residential: RESIDENTIAL proxy group (async requests over residential IPs). Also accepts the legacy key 'engine'."
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy Configuration",
            "type": "object",
            "description": "Proxy for the Alibaba supplier API lookup. The email search uses the Apify proxy group selected by 'Email Search Engine' (GOOGLE_SERP for Legacy, RESIDENTIAL for Residential); the supplier lookup falls back none → datacenter → residential automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}