{
  "openapi": "3.0.1",
  "info": {
    "title": "Business URL Discovery: B2B Lead Generation",
    "description": "Turn search queries into verified company domains. Uses AI to filter noise and returns clean B2B leads at $0.005/result.",
    "version": "1.0",
    "x-build-id": "160aBAhTDQQXGhP3B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mechanical_spirit~business-url-discovery/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mechanical_spirit-business-url-discovery",
        "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/mechanical_spirit~business-url-discovery/runs": {
      "post": {
        "operationId": "runs-sync-mechanical_spirit-business-url-discovery",
        "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/mechanical_spirit~business-url-discovery/run-sync": {
      "post": {
        "operationId": "run-sync-mechanical_spirit-business-url-discovery",
        "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": {
          "inputMode": {
            "title": "Input mode",
            "enum": [
              "manual",
              "cityBatch"
            ],
            "type": "string",
            "description": "Manual Query Mode: enter profession+city rows directly. City Batch Mode: enter a profession and region — the actor generates one query per major city automatically, ranked by population.",
            "default": "manual"
          },
          "queryProfessions": {
            "title": "Profession / Trade",
            "type": "array",
            "description": "One profession or trade per row. Every profession is combined with every city below — 2 professions x 3 cities = 6 queries. Each query can return up to Max Results Per Query domains. Write professions in the language of your target country (e.g. 'Klempner' for Germany, 'Loodgieter' for Netherlands). Set the Country field to match.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "queryCities": {
            "title": "City",
            "type": "array",
            "description": "One city per row. Every city is combined with every profession above — 3 professions x 4 cities = 12 queries. Check your query count before running large batches. Each query charges up to Max Results Per Query domains.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "manualCountry": {
            "title": "Country",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "nz",
              "ie",
              "at",
              "be",
              "ch",
              "de",
              "dk",
              "es",
              "fi",
              "fr",
              "is",
              "lu",
              "mt",
              "nl",
              "no",
              "pt",
              "se",
              "bg",
              "cy",
              "cz",
              "ee",
              "gr",
              "hr",
              "hu",
              "lv",
              "lt",
              "pl",
              "ro",
              "si",
              "sk",
              "it",
              "in",
              "jp",
              "kr",
              "sg",
              "br",
              "mx",
              "za"
            ],
            "type": "string",
            "description": "Country for proxy routing and TLD filtering. Must match the cities in your queries. Queries for different countries must run separately.",
            "default": "us"
          },
          "manualLocale": {
            "title": "Language",
            "enum": [
              "en",
              "da",
              "de",
              "fr",
              "nl",
              "es",
              "it",
              "sv",
              "nb",
              "fi",
              "pt",
              "pl",
              "cs",
              "hu",
              "ro",
              "el",
              "bg",
              "hr",
              "et",
              "lv",
              "lt",
              "sk",
              "sl",
              "ja",
              "ko"
            ],
            "type": "string",
            "description": "Language for search results. Defaults to English. Auto-derived from the Country field in most cases. Override only if the auto-derived language is wrong for your target.",
            "default": "en"
          },
          "maxResultsPerManualQuery": {
            "title": "Max Results Per Query",
            "minimum": 5,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum charged results per query. You are only charged for results that pass AI validation, up to this cap. Typical yield is up to 20 verified business websites per query.",
            "default": 20
          },
          "profession": {
            "title": "Trade or profession",
            "type": "string",
            "description": "The business type to search for. Be specific: plumber not services, family dentist not dentist. Used to generate phrases like plumber in Houston Texas. Write in the language of your target region (e.g. 'Klempner' for Germany). The Region field must match."
          },
          "regionCode": {
            "title": "Region",
            "enum": [
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "US-DE",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "US-MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "AT",
              "BE",
              "BG",
              "HR",
              "CY",
              "CZ",
              "DK",
              "EE",
              "FI",
              "FR",
              "DE",
              "GR",
              "HU",
              "IE",
              "IT",
              "LV",
              "LT",
              "LU",
              "EU-MT",
              "NL",
              "PL",
              "PT",
              "RO",
              "SK",
              "SI",
              "ES",
              "SE",
              "GB",
              "NO",
              "CH",
              "IS",
              "CA-AB",
              "CA-BC",
              "CA-MB",
              "CA-NB",
              "CA-NL",
              "CA-NT",
              "CA-NS",
              "CA-NU",
              "CA-ON",
              "CA-PE",
              "CA-QC",
              "CA-SK",
              "CA-YT",
              "AU",
              "NZ",
              "BR",
              "MX"
            ],
            "type": "string",
            "description": "The US state, EU country, or Canadian province to search. Cities are ranked by population so the most relevant markets come first."
          },
          "topCities": {
            "title": "Number of cities",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of top cities to search in the selected country. Default 5 is recommended for first runs. Increase to 10-20 for production lead generation campaigns.",
            "default": 5
          },
          "maxResultsPerCity": {
            "title": "Max results per city",
            "minimum": 5,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum charged results per city. The actor scrapes more candidates than this and filters with AI. You are only charged for results that pass validation, up to this cap. Typical yield is up to 25 verified business websites per city. Max 30.",
            "default": 25
          },
          "minimumAiConfidence": {
            "title": "Minimum AI confidence threshold",
            "minimum": 0.4,
            "maximum": 0.9,
            "type": "number",
            "description": "Domains scoring below this threshold are excluded and not charged. 0.6 is recommended. 0.8 or above gives higher precision with fewer results. 0.4 gives maximum coverage with occasional noise.",
            "default": 0.6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}