{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Contact Enrichment API - Accounts, People, Discovery",
    "description": "Enrich B2B accounts and contacts with firmographics, technographics, seniority, department, verified email and direct phone, or work the other way and discover the people inside an account who match a persona. Flags contacts who have left. Pay per result.",
    "version": "0.1",
    "x-build-id": "RzsdnQan2zZv91MZn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~b2b-contact-enrichment-discovery-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-b2b-contact-enrichment-discovery-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-contact-enrichment-discovery-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-b2b-contact-enrichment-discovery-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-contact-enrichment-discovery-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-b2b-contact-enrichment-discovery-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": {
          "mode": {
            "title": "What to do",
            "enum": [
              "enrich",
              "enrich-bulk",
              "discover"
            ],
            "type": "string",
            "description": "Enrich fills in records you already have. Discover works the other way and returns the people inside an account who match a persona, so one input row can produce many output rows.",
            "default": "enrich"
          },
          "records": {
            "title": "Records",
            "type": "array",
            "description": "The records to work on, one JSON object per line. Recognised fields: firstName, lastName, email, title, linkedinUrl, personId, phone, personCountry, companyName, companyWebsite, companyLinkedinUrl, companyId, companyUgId, companyCountry, companyState, companyCity, companyStreet, companyPostalCode, externalId, label. Company enrichment needs a company name or website. Person enrichment needs a first and last name plus one of company name, website or email. Discovery needs a company name or website. Records that cannot possibly match are dropped before the request rather than sent and charged for.",
            "items": {
              "type": "string"
            }
          },
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Shorthand for account-level runs: one company website or name per line, so a discovery run does not have to be written as JSON. A value containing a dot is treated as a website and anything else as a company name. Added to whatever the records list already holds.",
            "items": {
              "type": "string"
            }
          },
          "personas": {
            "title": "Personas to rank contacts by",
            "type": "array",
            "description": "Up to five persona names configured on your account, used by the discovery mode to rank the contacts it finds. These are sent with the request, so unlike the filters below they change what the provider returns rather than what is kept.",
            "items": {
              "type": "string"
            }
          },
          "minimumPersonaScore": {
            "title": "Minimum persona score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How well a contact must match the persona before the provider returns them at all. Raising this returns fewer, better contacts per account and spends fewer credits.",
            "default": 30
          },
          "resultsPerAccount": {
            "title": "Contacts per account",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many contacts the discovery mode may return for each account, from one to one hundred. Every returned contact is a row, so this multiplies both the dataset and the spend.",
            "default": 10
          },
          "contactLevels": {
            "title": "Seniority levels to find",
            "type": "array",
            "description": "Restrict discovery to these standard job levels. Sent with the request, so it narrows what the provider returns. Leave empty for every level.",
            "items": {
              "type": "string",
              "enum": [
                "C Level",
                "Board Level",
                "VP Level",
                "Director Level",
                "Manager Level",
                "Staff Level"
              ]
            },
            "default": []
          },
          "contactDepartments": {
            "title": "Departments to find",
            "type": "array",
            "description": "Restrict discovery to these departments, one per line. Sent with the request.",
            "items": {
              "type": "string"
            }
          },
          "contactJobFunctions": {
            "title": "Job functions to find",
            "type": "array",
            "description": "Restrict discovery to these job functions, one per line. Sent with the request.",
            "items": {
              "type": "string"
            }
          },
          "contactCountries": {
            "title": "Countries to find contacts in",
            "type": "array",
            "description": "Restrict discovery to contacts in these countries, one per line. Sent with the request. Leave empty to accept every location, which is not the same as sending an empty country: an empty value would restrict the results to people with no country on file at all.",
            "items": {
              "type": "string"
            }
          },
          "contactStates": {
            "title": "States to find contacts in",
            "type": "array",
            "description": "Restrict discovery to contacts in these states or provinces, one per line. Sent with the request.",
            "items": {
              "type": "string"
            }
          },
          "contactRegions": {
            "title": "Regions to find contacts in",
            "type": "array",
            "description": "Restrict discovery to contacts in these regions, one per line. Sent with the request.",
            "items": {
              "type": "string"
            }
          },
          "requireVerifiedEmail": {
            "title": "Only contacts with a verified email",
            "type": "boolean",
            "description": "Tell the provider not to return a discovered contact unless it holds a verified email address for them. Sent with the request, so it reduces both the results and the credits spent.",
            "default": false
          },
          "requireDirectPhone": {
            "title": "Only contacts with a direct dial",
            "type": "boolean",
            "description": "Tell the provider not to return a discovered contact unless it holds a direct phone number for them. Sent with the request.",
            "default": false
          },
          "requireCompanyPhone": {
            "title": "Only contacts with a company phone",
            "type": "boolean",
            "description": "Tell the provider not to return a discovered contact unless it holds a company phone number for them. Sent with the request.",
            "default": false
          },
          "enrichmentStatuses": {
            "title": "Keep only these enrichment outcomes",
            "type": "array",
            "description": "Only keep rows where the provider filled in this much. Restricting to the fully enriched outcome is how you get a clean table with no half-filled rows in it. Leave empty to keep every outcome. Applied after the provider answers.",
            "items": {
              "type": "string",
              "enum": [
                "Not Enriched",
                "Company Enriched",
                "Person Enriched",
                "Person & Company Enriched"
              ],
              "enumTitles": [
                "Not enriched: nothing was matched",
                "Company enriched: the account was matched, the person was not",
                "Person enriched: the person was matched, the account was not",
                "Person and company enriched: both were matched"
              ]
            },
            "default": []
          },
          "keepJobLevels": {
            "title": "Keep only these seniority levels",
            "type": "array",
            "description": "Only keep rows whose person sits at one of these standard job levels. Applied after the provider answers, which makes it the right filter for enrichment runs, where seniority is discovered rather than requested.",
            "items": {
              "type": "string",
              "enum": [
                "C Level",
                "Board Level",
                "VP Level",
                "Director Level",
                "Manager Level",
                "Staff Level"
              ]
            },
            "default": []
          },
          "matchConfidence": {
            "title": "Keep only these company match confidences",
            "type": "array",
            "description": "Only keep rows where the provider was this sure it matched the right company. Worth setting when the input is company names rather than websites, since names are far more ambiguous than domains.",
            "items": {
              "type": "string",
              "enum": [
                "HIGH",
                "MEDIUM",
                "LOW",
                "VERY LOW"
              ]
            },
            "default": []
          },
          "industries": {
            "title": "Keep only these industries",
            "type": "array",
            "description": "Only keep rows whose industry or sub-industry contains one of these words, one per line. Matching is loose on purpose, since industry labels vary.",
            "items": {
              "type": "string"
            }
          },
          "minCompanySize": {
            "title": "Minimum company headcount",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep rows whose company has at least this many employees, using the exact count rather than the band. Rows with no exact count are dropped when this is set. Leave at zero to keep every size.",
            "default": 0
          },
          "minCompanyRevenue": {
            "title": "Minimum company revenue",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep rows whose company reports at least this much revenue, as a plain number with no currency symbol. Rows with no exact figure are dropped when this is set. Leave at zero to keep every revenue.",
            "default": 0
          },
          "requireEmail": {
            "title": "Require an email on the row",
            "type": "boolean",
            "description": "Drop rows where no email address was resolved for the person.",
            "default": false
          },
          "requirePhone": {
            "title": "Require a phone number on the row",
            "type": "boolean",
            "description": "Drop rows where no phone number was resolved for the person.",
            "default": false
          },
          "requireLinkedin": {
            "title": "Require a professional profile on the row",
            "type": "boolean",
            "description": "Drop rows where no public professional profile was resolved for the person.",
            "default": false
          },
          "requireStillEmployed": {
            "title": "Drop people who have moved on",
            "type": "boolean",
            "description": "Drop rows the provider marked as having left the company on the record. This is the single most useful hygiene filter on an old list, since a moved contact is a bounce and a wasted touch.",
            "default": false
          },
          "batchSize": {
            "title": "Records per batch",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many records to submit in one request in the bulk and discovery modes, up to the provider's ceiling of five hundred. Smaller batches finish sooner and start writing rows earlier; larger batches make fewer requests.",
            "default": 500
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 1800,
            "type": "integer",
            "description": "Pace the run so it stays under whatever rate your plan allows. The single record mode is capped at the provider's published thirty per second regardless of what is set here.",
            "default": 600
          },
          "skipNotFound": {
            "title": "Skip records with no result",
            "type": "boolean",
            "description": "Leave records the provider returned nothing for out of the dataset. Off by default, because knowing which records failed to match is usually the point of running an enrichment pass. Misses are never charged for either way.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. This is the cap on both spend and run time, and it matters most in the discovery mode, where one account can produce a hundred rows.",
            "default": 100
          },
          "apiKey": {
            "title": "API token",
            "type": "string",
            "description": "Your own API token for the B2B enrichment API, issued by the provider along with a program id. Sent as a bearer token on every request. Note that these tokens are rotated periodically and expire, so a token that used to work may simply have aged out. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}