{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Sales Lead Database API - Company and Contact Search",
    "description": "Search a B2B company and contact database by domain, job title, seniority, location, industry, SIC code, technology stack, employee size, revenue, hiring activity and news events. Returns contacts with emails, direct dials and LinkedIn profiles. Pay per result. Bring your own API key.",
    "version": "0.1",
    "x-build-id": "UuVlIC1RaC9XXQCZK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~b2b-sales-lead-database-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-b2b-sales-lead-database-api",
        "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/nabeelbaghoor~b2b-sales-lead-database-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-b2b-sales-lead-database-api",
        "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/nabeelbaghoor~b2b-sales-lead-database-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-b2b-sales-lead-database-api",
        "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": {
          "domains": {
            "title": "Company domains",
            "type": "array",
            "description": "Company domains to search for, one per line. A full URL works too: it is reduced to the bare hostname. This is the usual way to pull the contacts at a named list of target accounts.",
            "items": {
              "type": "string"
            }
          },
          "companyIds": {
            "title": "Company IDs",
            "type": "array",
            "description": "Provider company IDs to search within, one per line. Use these when you already have IDs from an earlier run and want to go straight to those accounts.",
            "items": {
              "type": "string"
            }
          },
          "titleKeywords": {
            "title": "Job titles",
            "type": "array",
            "description": "Job title keywords to match, one per line, for example ceo, cfo or marketing. Any match is enough, so a few broad words return more than one long exact title.",
            "items": {
              "type": "string"
            }
          },
          "seniorityLevels": {
            "title": "Seniority levels",
            "type": "array",
            "description": "Restrict contacts to these seniority levels. Leave empty to return every level.",
            "items": {
              "type": "string",
              "enum": [
                "c_level",
                "vp_level",
                "director_level",
                "manager_level"
              ],
              "enumTitles": [
                "Executive level",
                "VP level",
                "Director level",
                "Manager level"
              ]
            }
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Two character country code to restrict the search to, for example US or GB. Leave empty to search every country."
          },
          "states": {
            "title": "States or provinces",
            "type": "array",
            "description": "State or province abbreviations for the US and Canada, one per line, for example CA or ON.",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Postal codes to search around, one per line. Pair with the radius below to cover a metro area rather than a single code.",
            "items": {
              "type": "string"
            }
          },
          "postalRangeMiles": {
            "title": "Radius in miles",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far around each postal code to search, in miles. Only has an effect when postal codes are given."
          },
          "areaCodes": {
            "title": "Phone area codes",
            "type": "array",
            "description": "Telephone area codes of the company headquarters, one per line, for example 415.",
            "items": {
              "type": "string"
            }
          },
          "industryCodes": {
            "title": "Industry codes",
            "type": "array",
            "description": "Provider industry codes to filter on, one per line. These are the provider's own numeric codes, not NAICS.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "Four digit SIC codes to filter on, one per line, for example 7372 for prepackaged software.",
            "items": {
              "type": "string"
            }
          },
          "companyDescription": {
            "title": "Company description keywords",
            "type": "string",
            "description": "Keywords or phrases to match inside the company description, for example generative ai. This is how you find companies by what they do when no industry code captures it."
          },
          "technologies": {
            "title": "Technologies used",
            "type": "array",
            "description": "Technology products the company uses, one per line, for example Hubspot or Salesforce. This is the technographic filter.",
            "items": {
              "type": "string"
            }
          },
          "technologyKeywords": {
            "title": "Technology keywords",
            "type": "string",
            "description": "Free text keyword search across the company's technology stack, for when a product is not in the technology list above."
          },
          "employeeSizeIds": {
            "title": "Employee size range IDs",
            "type": "array",
            "description": "Provider employee size range IDs, one per line, or the word all. These are the provider's own bracket IDs rather than raw headcounts.",
            "items": {
              "type": "string"
            }
          },
          "revenueRangeIds": {
            "title": "Revenue range IDs",
            "type": "array",
            "description": "Provider revenue range IDs, one per line, or the word all. These are the provider's own bracket IDs rather than raw amounts.",
            "items": {
              "type": "string"
            }
          },
          "hiringTitles": {
            "title": "Currently hiring for",
            "type": "array",
            "description": "Job title keywords a company is currently hiring for, one per line. Hiring is a buying signal, so this narrows a list to accounts that are actively growing a function.",
            "items": {
              "type": "string"
            }
          },
          "hiringSince": {
            "title": "Hiring posted since",
            "type": "string",
            "description": "Only count job postings published on or after this date, in YYYY-MM-DD form."
          },
          "newsCategories": {
            "title": "News event category IDs",
            "type": "array",
            "description": "Provider news and press event category IDs, one per line, for example the categories for funding rounds or new hires. Use these to find accounts that just triggered an event worth calling about.",
            "items": {
              "type": "string"
            }
          },
          "newsDateFrom": {
            "title": "News from date",
            "type": "string",
            "description": "Start of the news event window, in YYYY-MM-DD form."
          },
          "newsDateTo": {
            "title": "News to date",
            "type": "string",
            "description": "End of the news event window, in YYYY-MM-DD form."
          },
          "emailsOnly": {
            "title": "Only contacts with an email",
            "type": "boolean",
            "description": "Drop contacts that have no email address on file.",
            "default": false
          },
          "linkedinOnly": {
            "title": "Only contacts with a LinkedIn profile",
            "type": "boolean",
            "description": "Drop contacts that have no LinkedIn profile URL on file.",
            "default": false
          },
          "directDialOnly": {
            "title": "Only contacts with a direct dial",
            "type": "boolean",
            "description": "Drop contacts that have no direct phone number on file.",
            "default": false
          },
          "excludeSuppressed": {
            "title": "Exclude suppressed contacts",
            "type": "boolean",
            "description": "Hide contacts and companies that are on your account's suppression list.",
            "default": false
          },
          "excludeExported": {
            "title": "Exclude already exported contacts",
            "type": "boolean",
            "description": "Hide contacts you have already exported from this account, so a repeat run returns only what is new.",
            "default": false
          },
          "sortBy": {
            "title": "Sort order",
            "type": "string",
            "description": "Provider sort key for the result set, for example yearlyRevDesc to put the highest revenue accounts first. Leave empty for the provider default."
          },
          "includeCompanyNews": {
            "title": "Include company news",
            "type": "boolean",
            "description": "Attach recent news and press events to each company. This is one extra request per unique company, not per contact.",
            "default": false
          },
          "includeCompanyJobs": {
            "title": "Include company job openings",
            "type": "boolean",
            "description": "Attach current job openings to each company. One extra request per unique company.",
            "default": false
          },
          "includeCompanyTech": {
            "title": "Include company technology stack",
            "type": "boolean",
            "description": "Attach the detected technology stack to each company. One extra request per unique company.",
            "default": false
          },
          "extrasLimit": {
            "title": "Items per extra section",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many news items, job openings or technologies to fetch per company when the sections above are switched on.",
            "default": 10
          },
          "pageSize": {
            "title": "Records per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many records to request per page. The provider caps this at 100, which is the default and the fewest requests.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Stop after this many rows. This is the cap on both spend and run time.",
            "default": 100
          },
          "subAccountEmail": {
            "title": "Sub-account email",
            "type": "string",
            "description": "Run the search as one of your sub-accounts, so that sub-account's suppression and export history applies. Leave empty to use the main account."
          },
          "apiKey": {
            "title": "Access token",
            "type": "string",
            "description": "An access token for the lead database API. Provide this on its own for a run that never sees your password. Tokens are short lived, so for long or scheduled runs supply the account email and password below instead and a fresh token is requested automatically. Stored as a secret."
          },
          "accountEmail": {
            "title": "Account email",
            "type": "string",
            "description": "The email address of your own account with the data provider. Only needed when you are not supplying an access token above. Stored as a secret."
          },
          "accountPassword": {
            "title": "Account password",
            "type": "string",
            "description": "The password for your own account with the data provider, used once per run to request a short lived access token from the provider's documented authentication endpoint. Only needed when you are not supplying an access token above. Stored as a secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}