{
  "openapi": "3.0.1",
  "info": {
    "title": "TradeIndia Scraper - B2B Suppliers, Manufacturers & Leads",
    "description": "Scrape TradeIndia B2B suppliers, manufacturers & products: company leads (GST, owner, address, geo, website, turnover, employees), specs, prices & MOQ, plus email/phone enrichment and monitoring. No login, no browser.",
    "version": "0.1",
    "x-build-id": "v4o0nwPfGH0IoMwB8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~tradeindia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-tradeindia-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/scrapesage~tradeindia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-tradeindia-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/scrapesage~tradeindia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-tradeindia-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "searchProducts",
              "searchSuppliers",
              "sellerDetails",
              "productDetails"
            ],
            "type": "string",
            "description": "searchProducts = find products by keyword (price, MOQ, full spec table, seller). searchSuppliers = find manufacturers/suppliers by keyword as rich B2B lead profiles (GST, owner, address, website, turnover). sellerDetails = full company profiles for specific seller URLs. productDetails = full data for specific product URLs. Start URLs override the mode.",
            "default": "searchProducts"
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search on TradeIndia.com for searchProducts / searchSuppliers mode. Examples: <code>industrial valves</code>, <code>cotton fabric</code>, <code>led lights</code>, <code>pharmaceutical machinery</code>. Each keyword runs separately.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities (optional filter)",
            "type": "array",
            "description": "Optional Indian city names to narrow each keyword search (e.g. <code>Mumbai</code>, <code>Delhi</code>, <code>Ahmedabad</code>, <code>Rajkot</code>). Each city is searched per keyword. Leave empty for all-India results.",
            "items": {
              "type": "string"
            }
          },
          "sellerUrls": {
            "title": "Seller profile URLs",
            "type": "array",
            "description": "TradeIndia seller/company profile URLs (e.g. <code>https://www.tradeindia.com/futuristic-technologies-4141118/</code>). Primary input for sellerDetails mode.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "TradeIndia product page URLs (e.g. <code>https://www.tradeindia.com/products/industrial-valves-c2802951.html</code>). Primary input for productDetails mode.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (auto-routed)",
            "type": "array",
            "description": "Paste any TradeIndia URLs — seller profiles, product pages, or <code>/search.html?keyword=…</code> searches. Each is auto-detected and routed to the right handler.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max records (total)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total cap on records emitted across all keywords/URLs in this run.",
            "default": 100
          },
          "maxPages": {
            "title": "Max search pages per keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many search-result pages to crawl per keyword/city (each page lists ~28 products).",
            "default": 5
          },
          "enrichSellerProfile": {
            "title": "Attach full seller profile to products (searchProducts)",
            "type": "boolean",
            "description": "For searchProducts mode, fetch each unique seller's profile and attach owner name, GST number, website, full address, year established and employees to every product row. Deduplicated per seller (one extra request per unique seller).",
            "default": false
          },
          "crawlSellerWebsite": {
            "title": "Find emails & phones from seller's own website",
            "type": "boolean",
            "description": "For seller records (searchSuppliers / sellerDetails, or enriched searchProducts), crawl the seller's OWN public website (TradeIndia hides phone behind login) to extract emails, phone numbers and social links. Up to 2 pages per seller. Billed as a separate contact-enrichment event only for records returned.",
            "default": false
          },
          "onlyManufacturers": {
            "title": "Only manufacturers",
            "type": "boolean",
            "description": "Emit only records whose seller is flagged as a Manufacturer.",
            "default": false
          },
          "onlyExporters": {
            "title": "Only exporters",
            "type": "boolean",
            "description": "Emit only records whose seller is flagged as an Exporter.",
            "default": false
          },
          "trustStampOnly": {
            "title": "Only Trust Stamp / verified sellers",
            "type": "boolean",
            "description": "Emit only records from sellers that carry the TradeIndia Trust Stamp (verified) badge.",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score (suppliers)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "For supplier records, emit only those with at least this 0–100 lead score (based on Trust Stamp / verification, GST, website, owner, rating, tenure, business type and discovered contacts).",
            "default": 0
          },
          "monitorMode": {
            "title": "Monitor mode (only new records)",
            "type": "boolean",
            "description": "Remember products/suppliers seen in previous runs (in a named key-value store) and emit only NEW ones. Pair with Apify Schedules to watch a keyword for newly listed products or suppliers. Does not conflict with scheduling.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that holds the 'already seen' keys for monitor mode. Use a distinct name per saved task so their histories stay separate. Lowercase letters, digits and hyphens only.",
            "default": "tradeindia-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Maximum parallel requests.",
            "default": 6
          },
          "userAgent": {
            "title": "User-Agent (advanced)",
            "type": "string",
            "description": "Override the crawler User-Agent used for TradeIndia pages. The default (Googlebot) reliably passes TradeIndia's WAF — change only if you know what you're doing."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. TradeIndia serves cleanly to Apify datacenter proxies with the crawler User-Agent, so the default is fine; switch to residential only if you see blocks under heavy load.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}