{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Company Data API - Search Companies and Contacts",
    "description": "Search a B2B database of companies and contacts by name, domain, country, city, geo radius, industry code, employee band, revenue and data completeness, and resolve IP addresses to companies. Returns firmographics, contacts and job titles as flat rows. Pay per result. Bring your own API key.",
    "version": "0.1",
    "x-build-id": "qdGJtGySchIIqdN21"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~b2b-company-contact-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-b2b-company-contact-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-company-contact-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-b2b-company-contact-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-company-contact-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-b2b-company-contact-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": {
          "dataset": {
            "title": "What to collect",
            "enum": [
              "companies",
              "contacts",
              "ip"
            ],
            "type": "string",
            "description": "Search companies, search contacts at companies, or resolve a list of IP addresses to the companies behind them.",
            "default": "companies"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Terms matched against company name, alternative names, trade name and domains, one per line. A domain works here, which is how you resolve a domain list to company records.",
            "items": {
              "type": "string"
            }
          },
          "countryCodes": {
            "title": "Country codes",
            "type": "array",
            "description": "ISO 3166 two letter country codes, one per line, for example DE or GB.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names, one per line. Cities and country codes are paired in order, so three cities and one country code means all three cities in that country.",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Postal codes, one per line. Format varies by country.",
            "items": {
              "type": "string"
            }
          },
          "regionCodes": {
            "title": "Region codes",
            "type": "array",
            "description": "Region codes, one per line. European regions use the NUTS 1 to 3 scheme, for example DE1. Regions outside Europe use ISO 3166-2 with underscores.",
            "items": {
              "type": "string"
            }
          },
          "street": {
            "title": "Street",
            "type": "string",
            "description": "A full street line including house number, for example Durlacher Allee 73."
          },
          "latitude": {
            "title": "Latitude",
            "type": "string",
            "description": "Latitude of a point to search around. Set longitude too, and a radius below."
          },
          "longitude": {
            "title": "Longitude",
            "type": "string",
            "description": "Longitude of a point to search around."
          },
          "radiusKm": {
            "title": "Radius in kilometres",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far from the point to search. The provider's maximum is 500 km; anything larger is clamped.",
            "default": 20
          },
          "industryClassification": {
            "title": "Industry classification",
            "enum": [
              "internal",
              "nace",
              "wz"
            ],
            "type": "string",
            "description": "Which classification table the industry codes below belong to. The provider's internal classification is the default and the one to use unless you specifically need NACE or WZ.",
            "default": "internal"
          },
          "industryCodes": {
            "title": "Industry codes",
            "type": "array",
            "description": "Industry codes from the classification selected above, one per line, for example 62.01 for NACE. These are codes, not names: look them up in the provider's published code list for the classification you chose.",
            "items": {
              "type": "string"
            }
          },
          "employeeRanges": {
            "title": "Employee ranges",
            "type": "array",
            "description": "Headcount bands to include. These are fixed bands and must be written exactly as the provider defines them, with a dot as the thousands separator.",
            "items": {
              "type": "string",
              "enum": [
                "1-10",
                "11-100",
                "101-500",
                "501-1.000",
                "1.001-5.000",
                "5.001-10.000",
                "10.000+"
              ],
              "enumTitles": [
                "1 to 10",
                "11 to 100",
                "101 to 500",
                "501 to 1,000",
                "1,001 to 5,000",
                "5,001 to 10,000",
                "10,000 and above"
              ]
            }
          },
          "revenueMin": {
            "title": "Revenue minimum (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest annual revenue to include, in euros. Negative values are not supported."
          },
          "revenueMax": {
            "title": "Revenue maximum (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest annual revenue to include, in euros."
          },
          "icpIds": {
            "title": "Ideal customer profile IDs",
            "type": "array",
            "description": "IDs of saved ideal customer profiles, one per line. Companies matching any one of them are returned. Unknown IDs are ignored by the provider.",
            "items": {
              "type": "string"
            }
          },
          "has_phone": {
            "title": "Only companies with a phone number",
            "type": "boolean",
            "description": "Return only companies with at least one phone number.",
            "default": false
          },
          "has_email": {
            "title": "Only companies with an email",
            "type": "boolean",
            "description": "Return only companies with at least one known email address.",
            "default": false
          },
          "has_social_media_profiles": {
            "title": "Only companies with a social profile",
            "type": "boolean",
            "description": "Return only companies with at least one social media profile such as LinkedIn.",
            "default": false
          },
          "has_financials_revenue": {
            "title": "Only companies with known revenue",
            "type": "boolean",
            "description": "Return only companies that have revenue data on record.",
            "default": false
          },
          "has_financials_earnings": {
            "title": "Only companies with known earnings",
            "type": "boolean",
            "description": "Return only companies that have earnings data on record.",
            "default": false
          },
          "has_financials_net_worth": {
            "title": "Only companies with known net worth",
            "type": "boolean",
            "description": "Return only companies that have net worth data on record.",
            "default": false
          },
          "has_ip_addresses": {
            "title": "Only companies with IP data",
            "type": "boolean",
            "description": "Return only companies that have IP address data, which is what makes visitor matching possible.",
            "default": false
          },
          "contactSearchTerms": {
            "title": "Contact search terms",
            "type": "array",
            "description": "Terms matched against contact full name and title, one per line. Used when collecting contacts.",
            "items": {
              "type": "string"
            }
          },
          "positions": {
            "title": "Positions",
            "type": "array",
            "description": "Job titles to match, one per line. Values are matched as phrases against both the original language title and its English translation, so Chief matches Chief Executive Officer. There is no typo tolerance and no synonym expansion: list every variant you want.",
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "Departments the contact works in.",
            "items": {
              "type": "string",
              "enum": [
                "management_department",
                "sales_department",
                "marketing_department",
                "it_department",
                "engineering_department",
                "finance_controlling_department",
                "hr_department",
                "purchasing_department",
                "logistics_department",
                "production_department",
                "product_department",
                "rd_department",
                "legal_compliance_department",
                "consulting_department",
                "media_communications_department",
                "support_department",
                "qm_department",
                "business_project_management_department",
                "students_apprentices",
                "unknown_department"
              ],
              "enumTitles": [
                "Management",
                "Sales",
                "Marketing",
                "IT",
                "Engineering",
                "Finance and controlling",
                "HR",
                "Purchasing",
                "Logistics",
                "Production",
                "Product",
                "Research and development",
                "Legal and compliance",
                "Consulting",
                "Media and communications",
                "Support",
                "Quality management",
                "Business and project management",
                "Students and apprentices",
                "Unknown"
              ]
            }
          },
          "hierarchyLevels": {
            "title": "Seniority levels",
            "type": "array",
            "description": "How senior the contact is within the company.",
            "items": {
              "type": "string",
              "enum": [
                "top_management",
                "middle_management",
                "employees",
                "unknown_hierarchy"
              ],
              "enumTitles": [
                "Top management",
                "Middle management",
                "Employees",
                "Unknown"
              ]
            }
          },
          "affiliation": {
            "title": "Affiliation",
            "enum": [
              "employee",
              "group_employee",
              "related"
            ],
            "type": "string",
            "description": "How the contact is related to the company: a direct employee, an employee of the corporate group, or otherwise related."
          },
          "contactEmails": {
            "title": "Contact emails",
            "type": "array",
            "description": "Email addresses to look contacts up by, one per line.",
            "items": {
              "type": "string"
            }
          },
          "companyIds": {
            "title": "Company IDs",
            "type": "array",
            "description": "Provider company IDs whose contacts you want, one per line. This is how you go from a company list you already collected to the people at those companies.",
            "items": {
              "type": "string"
            }
          },
          "buyerPersonaIds": {
            "title": "Buyer persona IDs",
            "type": "array",
            "description": "IDs of saved buyer personas to filter contacts by, one per line.",
            "items": {
              "type": "string"
            }
          },
          "ipAddresses": {
            "title": "IP addresses",
            "type": "array",
            "description": "IPv4 or IPv6 addresses to resolve to companies, one per line. Write IPv6 in plain shortened notation without brackets. This needs an active IP enrichment subscription on your account.",
            "items": {
              "type": "string"
            }
          },
          "fetchFullProfiles": {
            "title": "Fetch full company profiles",
            "type": "boolean",
            "description": "After each search hit, also fetch that company's full profile and merge it into the row. Searches consume no provider credits, but full profiles do for companies not accessed recently, so this is off by default.",
            "default": false
          },
          "advancedBody": {
            "title": "Advanced company search body",
            "type": "string",
            "description": "A raw company search body as JSON, merged over the fields above and winning on conflict. Use it for filters this form does not list. Example: {\"filters\":{\"do_not_contact\":false},\"employee_ranges\":[\"11-100\"]}"
          },
          "advancedContactBody": {
            "title": "Advanced contact search body",
            "type": "string",
            "description": "A raw contact search body as JSON, merged over the contact fields above and winning on conflict."
          },
          "accountId": {
            "title": "Account ID",
            "type": "string",
            "description": "Which account to run against. Leave empty and the actor asks the API which accounts your key reaches and uses the first one, which is what you want when the key sees only one account."
          },
          "useBearerToken": {
            "title": "Send credential as a bearer token",
            "type": "boolean",
            "description": "Send the credential as an OAuth Authorization bearer header instead of the X-Api-Key header. Turn this on if you are using an OAuth access token rather than a personal API key.",
            "default": false
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Records per request. The provider's maximum is 100.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Stop after this many records. This is the cap on both spend and run time.",
            "default": 100
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own B2B company data API key, sent in the X-Api-Key header. The actor never ships a key of its own: your plan, credits and terms apply."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}