{
  "openapi": "3.0.1",
  "info": {
    "title": "Thomasnet Scraper",
    "description": "Thomasnet scraper for US and Canadian industrial suppliers: name, website, company phone, city and state, supplier type, annual sales and employee bands as numbers, year founded, category and products. Type and size filters, every-region search, de-duplication, new-supplier monitor. No login.",
    "version": "0.1",
    "x-build-id": "I6PqMNSKhJfehLb9L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~thomasnet-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-thomasnet-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/datahamster~thomasnet-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-thomasnet-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/datahamster~thomasnet-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-thomasnet-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": {
          "queries": {
            "title": "Keywords (products or services)",
            "type": "array",
            "description": "What the suppliers make or do, one per line, e.g. \"cnc machining\", \"valves\", \"injection molding\". Each keyword is one Thomasnet supplier search.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Thomasnet URLs",
            "type": "array",
            "description": "Optional. Thomasnet search URLs (thomasnet.com/suppliers/search?searchterm=...) or category pages (thomasnet.com/suppliers/usa/cnc-machining-45330503, thomasnet.com/suppliers/northern-texas/cnc-machining-45330503). Page 1 of each is read; page numbers and Thomasnet's own filter parameters need a Thomasnet login and are ignored.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions served (Thomasnet Locations Served)",
            "type": "array",
            "description": "Thomasnet 'Locations Served' regions: suppliers that SERVE these regions, wherever they are located (to filter on where a company is, use Company location states). Thomasnet region codes, US postal codes or names, one per line, e.g. \"TX\" (both Texas regions), \"Ohio\", \"ON\" (Ontario), \"CS\" (California - South). Thomasnet splits TX, CA, OH, MA, NJ, NY and PA into two regions each; a postal code reads both. Leave empty to search all regions at once.",
            "items": {
              "type": "string"
            }
          },
          "searchEveryRegion": {
            "title": "Search every region (more suppliers)",
            "type": "boolean",
            "description": "Read each keyword nationally and in all 73 Thomasnet regions (74 pages per keyword) and merge the results without duplicates. Thomasnet shows a logged-out visitor about 25-35 suppliers per search page, so this is how you get hundreds of suppliers per keyword. Overrides Regions.",
            "default": false
          },
          "states": {
            "title": "Company location (states / provinces)",
            "type": "array",
            "description": "Keep only suppliers whose own address is in these states or provinces, e.g. \"TX\", \"Ohio\", \"ON\". This filters the returned cards; combine it with Regions served to read the matching pages. Leave empty for any location.",
            "items": {
              "type": "string"
            }
          },
          "supplierTypes": {
            "title": "Supplier types",
            "type": "array",
            "description": "Keep only suppliers of these types, e.g. Distributor. A supplier matches on its primary type or any additional activity Thomasnet lists. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "manufacturer",
                "custom_manufacturer",
                "distributor",
                "service",
                "finishing",
                "manufacturers_rep",
                "integrator",
                "remanufacturer"
              ],
              "enumTitles": [
                "Manufacturer",
                "Custom manufacturer (incl. instant quote)",
                "Distributor",
                "Service company",
                "Finishing service company",
                "Manufacturers' rep",
                "Turnkey systems integrator",
                "Remanufacturer"
              ]
            }
          },
          "primaryTypeOnly": {
            "title": "Match the primary type only",
            "type": "boolean",
            "description": "Match Supplier types against the supplier's primary type only, not its additional activities.",
            "default": false
          },
          "minEmployees": {
            "title": "Min employees",
            "minimum": 1,
            "type": "integer",
            "description": "Keep suppliers whose employee band reaches at least this number, e.g. 50 keeps \"50-99\" and up. Suppliers without a band are dropped while this is set."
          },
          "maxEmployees": {
            "title": "Max employees",
            "minimum": 1,
            "type": "integer",
            "description": "Keep suppliers whose employee band starts at or below this number, e.g. 49 for small shops (\"1-9\", \"10-49\"). Suppliers without a band are dropped while this is set."
          },
          "minAnnualSalesMillionUsd": {
            "title": "Min annual sales (USD million)",
            "minimum": 0,
            "type": "number",
            "description": "Keep suppliers whose annual sales band reaches at least this many million USD, e.g. 10 keeps \"$10 - 24.9 Mil\" and up. Suppliers without a band are dropped while this is set."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many suppliers (you pay only for returned rows).",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}