{
  "openapi": "3.0.1",
  "info": {
    "title": "Person Data Enrichment — Email, Phone & LinkedIn",
    "description": "Enriches persons from People Data Labs — cheaper than Clay, Apollo, or ZoomInfo. Name + company → verified work email, job title, seniority, phone, LinkedIn, and location. Pay-per-event: $0.03/person. No subscription.",
    "version": "1.3",
    "x-build-id": "TvNvVyRQpBg2Nfu58"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~person-enrichment-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-person-enrichment-lookup",
        "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/ryanclinton~person-enrichment-lookup/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-person-enrichment-lookup",
        "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/ryanclinton~person-enrichment-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-person-enrichment-lookup",
        "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",
        "required": [
          "persons"
        ],
        "properties": {
          "persons": {
            "title": "Persons to enrich",
            "type": "array",
            "description": "List of persons to enrich. Each entry needs at minimum: name + company/domain, OR email. Supported fields: name, email, company, domain, linkedinUrl.",
            "default": [
              {
                "name": "Jan Curn",
                "company": "Apify",
                "domain": "apify.com"
              }
            ]
          },
          "pdlApiKey": {
            "title": "PDL API Key (optional)",
            "type": "string",
            "description": "Your People Data Labs API key. If left blank, the built-in shared key is used (limited monthly cap across all users). Bring your own for unlimited volume — sign up free at peopledatalabs.com."
          },
          "maxPersons": {
            "title": "Max persons",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of persons to process. Hard cap to prevent accidental over-billing.",
            "default": 100
          },
          "includeWorkHistory": {
            "title": "Include work history",
            "type": "boolean",
            "description": "Include the person's past job history in the output. Adds detail but increases response payload size.",
            "default": false
          },
          "includeEducation": {
            "title": "Include education",
            "type": "boolean",
            "description": "Include the person's education history (university, degree, field of study) in the output.",
            "default": false
          },
          "includeSkills": {
            "title": "Include skills",
            "type": "boolean",
            "description": "Include the person's listed skills in the output.",
            "default": false
          },
          "validateEmails": {
            "title": "Validate returned emails (MX + disposable + role-account check)",
            "type": "boolean",
            "description": "For every email PDL returns, check that the domain has MX records, flag disposable / temp-mail providers, and flag generic role accounts (info@, sales@). Adds ~1-2 seconds per unique domain. Powers the composite confidenceScore.",
            "default": false
          },
          "useCompanyAliases": {
            "title": "Retry with known company aliases on miss",
            "type": "boolean",
            "description": "When PDL Search returns nothing, retry with known aliases (e.g. Facebook → Meta Platforms, X → Twitter, Alphabet → Google). Catches records that lag behind rebrands. Each alias attempt is one extra PDL call.",
            "default": true
          },
          "compareToPrevRun": {
            "title": "Detect changes since last run (job changes, promotions, email changes)",
            "type": "boolean",
            "description": "Snapshot every enriched person to a named KV store, then on the next run diff against the prior snapshot. Adds changeFlags[] (NEW_PERSON, JOB_CHANGED, PROMOTION, TITLE_CHANGED, EMAIL_CHANGED, LOCATION_CHANGED, etc.) and a changeSinceLastRun block to every record. Schedule weekly to catch job changes while they are still timely.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitor state KV store name (advanced)",
            "type": "string",
            "description": "Override the named KV store used for cross-run snapshots. Defaults to 'person-enrichment-monitor'. Use a different name to keep separate snapshot histories per CRM segment / campaign."
          },
          "changeFlagsFilter": {
            "title": "Restrict output to these change flags (only when compareToPrevRun is on)",
            "type": "array",
            "description": "Only save records that match at least one of these change flags. Example: ['JOB_CHANGED', 'PROMOTION'] for re-engagement campaigns. Leave empty to save all records. Filtered records are not charged.",
            "items": {
              "type": "string"
            }
          },
          "minConfidenceScore": {
            "title": "Minimum confidence score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only save records scoring at or above this composite confidence. Lower-scoring records are skipped (and not charged). Leave blank to use the matchStrategy default (strict=75, balanced=none, aggressive=none). Recommended floor for cold outreach: 50."
          },
          "matchStrategy": {
            "title": "Match strategy",
            "enum": [
              "strict",
              "balanced",
              "aggressive"
            ],
            "type": "string",
            "description": "Strict = high-confidence only (PDL likelihood >=6, default minConfidenceScore=75). Balanced (default) = full fallback chain, no auto-floor. Aggressive = broadest search (likelihood >=1, top-5 candidates, accepts lower-confidence matches when company domain aligns).",
            "default": "balanced"
          },
          "requireFields": {
            "title": "Required output fields",
            "type": "array",
            "description": "Skip + don't charge records missing any of these fields. Filter runs AFTER enrichment + validation, BEFORE pushData + charge. Allowed values: email, personalEmail, phone, mobilePhone, linkedinUrl, jobTitle, companyName, companyDomain.",
            "items": {
              "type": "string"
            }
          },
          "dedupeMode": {
            "title": "Input deduplication mode",
            "enum": [
              "off",
              "strict",
              "fuzzy"
            ],
            "type": "string",
            "description": "Off = enrich every input row. Strict = collapse exact (lowercased) name + email + linkedin matches. Fuzzy = also collapses whitespace, punctuation, and company-name suffixes (Inc/Corp/Ltd) so 'Acme' + acme.com == 'Acme Corp' + acme.com.",
            "default": "off"
          },
          "skipPreviouslyEnriched": {
            "title": "Skip recently-enriched persons",
            "type": "boolean",
            "description": "When the monitor KV store contains a fresh snapshot for a person (within freshnessWindowDays), echo the cached values and skip the PDL call. Massive cost saver on weekly schedules. Requires a populated monitor state — first run on a new state key always hits PDL.",
            "default": false
          },
          "freshnessWindowDays": {
            "title": "Freshness window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many days a snapshot stays 'fresh' enough to skip on rerun (only used when skipPreviouslyEnriched is on). Default 30. Lower = more re-enrichment, higher = more cost savings but staler data.",
            "default": 30
          },
          "includeCandidates": {
            "title": "Include alternate match candidates",
            "type": "boolean",
            "description": "Fetch up to 5 candidates per person from PDL Search and surface alternates under matchDebug.alternates[]. Alternates are NOT charged, NOT separate dataset rows, NOT enriched further — they exist purely so you can audit the winning match.",
            "default": false
          },
          "includeMatchDebug": {
            "title": "Include match transparency block",
            "type": "boolean",
            "description": "Attach a matchDebug block to every record with strategyPreset, inputSignalsUsed, candidatesConsidered, and selectedReason. Auto-enabled when includeCandidates is on. Useful for trust-building and debugging bad matches.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}