{
  "openapi": "3.0.1",
  "info": {
    "title": "MacRAE's Blue Book Scraper: US Industrial Suppliers",
    "description": "MacRAE's Blue Book scraper: find US and Canadian industrial suppliers by product, company or state. One result = one supplier: company, phone, fax, address, website, business type, certifications, product headings. For supplier sourcing and B2B leads. No login. $1.50 per 1,000.",
    "version": "1.0",
    "x-build-id": "I6meO42MF2MxFfuJX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~macraes-blue-book-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-macraes-blue-book-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/rel8ble~macraes-blue-book-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-macraes-blue-book-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/rel8ble~macraes-blue-book-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-macraes-blue-book-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": "Product or service keywords",
            "type": "array",
            "description": "What the suppliers should make or sell, e.g. \"ball valves\", \"cnc machining\", \"injection molding\". 3-40 characters each. Each keyword is matched to the site's product headings and the best ones are read. Provide this, company names or start URLs; with nothing at all the actor runs a \"ball valves\" demo.",
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Optional. Look suppliers up by name, e.g. \"Parker Hannifin\". The first rows of each search are the closest names.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional. macraesbluebook.com category pages (search/product_company_list.cfm?prod_code=..., with or without &region=...), company profiles (search/company.cfm?company=...) or search result pages.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "states": {
            "title": "US states or Canadian provinces",
            "type": "array",
            "description": "Optional. Names or codes, e.g. \"Ohio\", \"TX\", \"ON\". Each keyword runs once per state. The site also lists advertisers \"serving\" a state from elsewhere; see the option below. Empty = all of the US and Canada.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max suppliers per search",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Rows saved per keyword (per state), company name or URL, integer >= 0. Default 20; 0 = everything listed. You pay per row.",
            "default": 20
          },
          "maxCategoriesPerSearch": {
            "title": "Max product headings per keyword",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. A keyword can match many headings (\"valves\" matches 521). They are ranked (same words first, then larger headings) and this many are read. Default 3; 0 = all matches (up to 300).",
            "default": 3
          },
          "scrapeDetails": {
            "title": "Read company profiles (phone, address, certification)",
            "type": "boolean",
            "description": "Default true: one extra request per supplier adds phone, fax, street address, website, business type, certification and every product heading (same price). false = list data only (name, city, state, short text, website for advertisers), about 25x fewer requests.",
            "default": true
          },
          "uniqueCompanies": {
            "title": "One row per company across the whole run",
            "type": "boolean",
            "description": "Default true: a supplier found under several headings or keywords is saved and charged once. false = once per heading, so you can see every heading it appears in.",
            "default": true
          },
          "requirePhone": {
            "title": "Only suppliers with a phone",
            "type": "boolean",
            "description": "Optional. Skip suppliers without a phone number. Default false.",
            "default": false
          },
          "requireWebsite": {
            "title": "Only suppliers with a website",
            "type": "boolean",
            "description": "Optional. Skip suppliers without a website. Default false.",
            "default": false
          },
          "requireCertification": {
            "title": "Only suppliers listing a certification",
            "type": "boolean",
            "description": "Optional. Skip suppliers that list no certification. Default false.",
            "default": false
          },
          "certificationContains": {
            "title": "Certification contains",
            "type": "array",
            "description": "Optional. Keep suppliers whose certification text contains any of these, e.g. \"ISO 9001\", \"AS9100\", \"ITAR\".",
            "items": {
              "type": "string"
            }
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "Optional. Keep suppliers with any of these types: \"manufacturer\", \"distributor\", \"service\", \"exporter\", \"importer\". Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "basedInStateOnly": {
            "title": "Only suppliers based in the state",
            "type": "boolean",
            "description": "Optional. With \"states\": drop advertisers listed as \"serving <state>\" that are based elsewhere. Default false.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Optional, advanced. Parallel requests, 1-10. Default 4. The actor stays under 300 requests a minute either way.",
            "default": 4
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Optional, advanced. Retries per failed request (each on a new proxy session), 0-20. Default 6.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional, advanced. Default: Apify datacenter proxy.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}