Lusha Person API v2 ending 2026-11-30: working replacement

Back to the paste box or back to the graveyard.

Partial replacement

The replacement does not give back everything the old call did. In the registry's own words:

What ended and when

scheduled 2026-11-30 Lusha Person API v2 ending 2026-11-30.

The vendor's guide says the v2 person call carries a Sunset header since 18 May 2026 and is retired after a six-month overlap. The vendor's announced retirement date is 30 November 2026.

Source notice, read 2026-11-30.

Old call and revived code

Person enrichment v2: GET /v2/person

The old call

Method
GET
Host
api.lusha.com
Path
/v2/person
Parameters
firstName, lastName, company, property, email

The registry records no provenance for this path.

Example call built from the registry

JavaScript

async function oldCall(firstName, lastName, company, property, email) {
  const res = await fetch(`https://api.lusha.com/v2/person?firstName=${firstName}&lastName=${lastName}&company=${company}&property=${property}&email=${email}`, { method: "GET" });
  return res.json();
}

Python

def old_call(firstName, lastName, company, property, email):
    response = requests.get(f"https://api.lusha.com/v2/person?firstName={firstName}&lastName={lastName}&company={company}&property={property}&email={email}")
    return response.json()

curl

curl -X GET "https://api.lusha.com/v2/person?firstName=$FIRSTNAME&lastName=$LASTNAME&company=$COMPANY&property=$PROPERTY&email=$EMAIL"

Revived code

Replaces the call with FoxAPIs POST /v1/enrich_person. 200 credits per call (catalog snapshot, FoxAPIs pricing page, read 2026-11-30). The key is read from the environment variable FOXAPIS_KEY.

FoxAPIs page for Enrich person

Your example call, rewritten in place

JavaScript

// RESURRECT: replaces the Lusha Person API v2 "Person enrichment v2" call (ending 2026-11-30). It now calls FoxAPIs POST /v1/enrich_person.
// Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
// The old response layout was not verified, so the FoxAPIs answer is returned unchanged and no field table is claimed.
const asResponse = (data, status = 200) => ({ ok: status < 400, status, data, json: async () => data, text: async () => JSON.stringify(data) });
async function waitForJob(jobId, headers) {
  for (let i = 0; i < 90; i += 1) {
    const res = await fetch("https://api.foxapis.com" + "/v1/jobs/" + encodeURIComponent(jobId), { headers });
    if (!res.ok) throw new Error("FoxAPIs job poll answered " + res.status);
    const job = await res.json();
    if (job.status === "done") return job;
    if (job.status === "failed" || job.status === "error") throw new Error("FoxAPIs job " + job.status);
    await new Promise((r) => setTimeout(r, 2000));
  }
  throw new Error("FoxAPIs job did not finish in time; poll " + jobId + " again later");
}
async function resurrectedPersonV2({ name, company } = {}) {
  if (!name) throw new Error("name is required by FoxAPIs: full name: firstName and lastName joined with a space");
  const key = process.env.FOXAPIS_KEY;
  if (!key) throw new Error("Set FOXAPIS_KEY (free key: https://foxapis.com/trial)");
  const headers = { Authorization: `Bearer ${key}`, "Content-Type": "application/json" };
  const body = {};
  if (name) body.name = name;
  if (company) body.company = company;
  const res = await fetch("https://api.foxapis.com/v1/enrich_person", { method: "POST", headers, body: JSON.stringify(body) });
  if (res.status === 401 || res.status === 403) throw new Error("FoxAPIs rejected the key (status " + res.status + ")");
  if (!res.ok) throw new Error("FoxAPIs answered " + res.status);
  const data = await res.json();
  return data;
}

async function oldCall(firstName, lastName, company, property, email) {
  // RESURRECT: FoxAPIs call (Lusha Person API v2 Person enrichment v2). The value is shaped like a fetch or axios response: .ok, .status, .data and await .json() work.
  const _resurrected_1 = await resurrectedPersonV2({
    name: undefined, // TODO: full name: firstName and lastName joined with a space
    company: company,
  });
  const res = _resurrected_1 !== null ? asResponse(_resurrected_1) : asResponse({ detail: "No match found by FoxAPIs" }, 404);
  return res.json();
}

Python

import json
import os
import re
import time
import urllib.error
import urllib.request

# RESURRECT: replaces the Lusha Person API v2 "Person enrichment v2" call (ending 2026-11-30). It now calls FoxAPIs POST /v1/enrich_person.
# Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
# The old response layout was not verified, so the FoxAPIs answer is returned unchanged and no field table is claimed.


class ResurrectedResponse:
    """Looks like a requests response: .json(), .status_code, .ok, .text, .raise_for_status()."""

    def __init__(self, data, status_code=200):
        self._data = data
        self.status_code = status_code
        self.ok = status_code < 400
        self.text = json.dumps(data)

    def json(self):
        return self._data

    def raise_for_status(self):
        if not self.ok:
            raise RuntimeError("FoxAPIs answered %s" % self.status_code)


def _foxapis(method, path, headers, body=None):
    data = json.dumps(body).encode() if body is not None else None
    req = urllib.request.Request("https://api.foxapis.com" + path, data=data, method=method, headers=headers)
    try:
        with urllib.request.urlopen(req, timeout=120) as r:
            raw = r.read().decode() or "null"
            return r.status, json.loads(raw)
    except urllib.error.HTTPError as e:
        return e.code, None


def resurrected_person_v2(name=None, company=None):
    if not name:
        raise ValueError("name is required by FoxAPIs: full name: firstName and lastName joined with a space")
    key = os.environ.get("FOXAPIS_KEY")
    if not key:
        raise RuntimeError("Set FOXAPIS_KEY (free key: https://foxapis.com/trial)")
    headers = {"Authorization": "Bearer " + key, "Content-Type": "application/json", "User-Agent": "resurrect/0.1"}
    body = {}
    if name:
        body["name"] = name
    if company:
        body["company"] = company
    status, data = _foxapis("POST", "/v1/enrich_person", headers, body)
    if status in (401, 403):
        raise RuntimeError("FoxAPIs rejected the key (status %s)" % status)
    if status >= 400:
        raise RuntimeError("FoxAPIs answered %s" % status)
    return data

def old_call(firstName, lastName, company, property, email):
    _resurrected_1 = resurrected_person_v2(
        name=None,  # TODO: full name: firstName and lastName joined with a space
        company="{company}",
    )
    response = ResurrectedResponse(_resurrected_1, 200) if _resurrected_1 is not None else ResurrectedResponse({"detail": "No match found by FoxAPIs"}, 404)
    return response.json()

curl

# RESURRECT: replaces the Lusha Person API v2 "Person enrichment v2" call (ending 2026-11-30). It now calls FoxAPIs POST /v1/enrich_person.
# Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
curl -X POST https://api.foxapis.com/v1/enrich_person \
  -H "Authorization: Bearer $FOXAPIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"TODO: full name: firstName and lastName joined with a space","company":"$COMPANY"}'

Standalone code

JavaScript

import { pathToFileURL } from "node:url";

// RESURRECT: replaces the Lusha Person API v2 "Person enrichment v2" call (ending 2026-11-30). It now calls FoxAPIs POST /v1/enrich_person.
// Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
// The old response layout was not verified, so the FoxAPIs answer is returned unchanged and no field table is claimed.
const asResponse = (data, status = 200) => ({ ok: status < 400, status, data, json: async () => data, text: async () => JSON.stringify(data) });
export async function resurrectedPersonV2({ name, company } = {}) {
  if (!name) throw new Error("name is required by FoxAPIs: full name: firstName and lastName joined with a space");
  const key = process.env.FOXAPIS_KEY;
  if (!key) throw new Error("Set FOXAPIS_KEY (free key: https://foxapis.com/trial)");
  const headers = { Authorization: `Bearer ${key}`, "Content-Type": "application/json" };
  const body = {};
  if (name) body.name = name;
  if (company) body.company = company;
  const res = await fetch("https://api.foxapis.com/v1/enrich_person", { method: "POST", headers, body: JSON.stringify(body) });
  if (res.status === 401 || res.status === 403) throw new Error("FoxAPIs rejected the key (status " + res.status + ")");
  if (!res.ok) throw new Error("FoxAPIs answered " + res.status);
  const data = await res.json();
  return data;
}

if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  const arg = process.argv[2] ? JSON.parse(process.argv[2]) : {};
  console.log(JSON.stringify(await resurrectedPersonV2(arg), null, 2));
}

Python

import json
import os
import re
import time
import urllib.error
import urllib.request

# RESURRECT: replaces the Lusha Person API v2 "Person enrichment v2" call (ending 2026-11-30). It now calls FoxAPIs POST /v1/enrich_person.
# Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
# The old response layout was not verified, so the FoxAPIs answer is returned unchanged and no field table is claimed.


class ResurrectedResponse:
    """Looks like a requests response: .json(), .status_code, .ok, .text, .raise_for_status()."""

    def __init__(self, data, status_code=200):
        self._data = data
        self.status_code = status_code
        self.ok = status_code < 400
        self.text = json.dumps(data)

    def json(self):
        return self._data

    def raise_for_status(self):
        if not self.ok:
            raise RuntimeError("FoxAPIs answered %s" % self.status_code)


def _foxapis(method, path, headers, body=None):
    data = json.dumps(body).encode() if body is not None else None
    req = urllib.request.Request("https://api.foxapis.com" + path, data=data, method=method, headers=headers)
    try:
        with urllib.request.urlopen(req, timeout=120) as r:
            raw = r.read().decode() or "null"
            return r.status, json.loads(raw)
    except urllib.error.HTTPError as e:
        return e.code, None


def resurrected_person_v2(name=None, company=None):
    if not name:
        raise ValueError("name is required by FoxAPIs: full name: firstName and lastName joined with a space")
    key = os.environ.get("FOXAPIS_KEY")
    if not key:
        raise RuntimeError("Set FOXAPIS_KEY (free key: https://foxapis.com/trial)")
    headers = {"Authorization": "Bearer " + key, "Content-Type": "application/json", "User-Agent": "resurrect/0.1"}
    body = {}
    if name:
        body["name"] = name
    if company:
        body["company"] = company
    status, data = _foxapis("POST", "/v1/enrich_person", headers, body)
    if status in (401, 403):
        raise RuntimeError("FoxAPIs rejected the key (status %s)" % status)
    if status >= 400:
        raise RuntimeError("FoxAPIs answered %s" % status)
    return data

if __name__ == "__main__":
    import sys

    arg = json.loads(sys.argv[1]) if len(sys.argv) > 1 else {}
    print(json.dumps(resurrected_person_v2(**arg), indent=2))

Notes from the rewrite engine

  • Lusha Person API v2 Person enrichment v2: The old response layout was not verified, so the FoxAPIs answer is returned unchanged and no field table is claimed.
  • Lusha Person API v2: ending on 2026-11-30.
  • Lusha Person API v2 Person enrichment v2: FoxAPIs needs name; the old call did not have it, so a TODO placeholder was inserted. full name: firstName and lastName joined with a space.

Fields that come back, and fields that do not

Person enrichment v2

The old response layout was not verified, so the FoxAPIs answer is returned unchanged and no field table is claimed.

Compat route: Mapped, but no compat route has been built.

Try it

There is no sample button on this page, because no compat route with a recorded sample exists for it.