Worked examples

Each example is pre-rendered by the same engine that runs on the front page. Back to the paste box.

Proxycurl person profile (Python)

A script that loads a person profile from a profile address. The service is gone. The engine finds the call, replaces it with a FoxAPIs person-enrichment call that returns the old field names, and says which fields it cannot fill.

Input: input.py

import os
import requests

api_key = os.environ["PROXYCURL_API_KEY"]
api_endpoint = "https://nubela.co/proxycurl/api/v2/linkedin"
headers = {"Authorization": "Bearer " + api_key}

def load_profile(profile_url):
    response = requests.get(
        api_endpoint,
        params={"url": profile_url, "use_cache": "if-present"},
        headers=headers,
    )
    return response.json()

if __name__ == "__main__":
    person = load_profile("https://www.linkedin.com/in/satyanadella/")
    print(person["full_name"], "-", person["headline"])

Generated JavaScript

import { pathToFileURL } from "node:url";

// RESURRECT: replaces the Proxycurl "Person Profile" call (ended 2025-07-04). It now calls FoxAPIs POST /v1/enrich_person.
// Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
// Fields FoxAPIs cannot fill come back as null; the reasons are in _resurrect.unfilled.
const blank = (v) => (v === undefined || v === null || v === "" ? null : v);
const TRANSFORMS = {
  firstName: (p) => { const t = String(p.full_name || "").trim().split(/\s+/); return t.length === 2 ? t[0] : null; },
  lastName: (p) => { const t = String(p.full_name || "").trim().split(/\s+/); return t.length === 2 ? t[1] : null; },
  slugFromLinkedin: (p) => { const m = /linkedin\.com\/in\/([^\/?#]+)/.exec(p.linkedin_url || ""); return m ? m[1] : null; },
  titleAtEmployer: (p) => (p.title && p.employer ? `${p.title} at ${p.employer}` : null),
};
const RULES = [
  {"old":"full_name","rule":"copy","from":"full_name"},
  {"old":"first_name","rule":"derived","from":"full_name","transform":"firstName"},
  {"old":"last_name","rule":"derived","from":"full_name","transform":"lastName"},
  {"old":"public_identifier","rule":"derived","from":"linkedin_url","transform":"slugFromLinkedin"},
  {"old":"profile_pic_url","rule":"copy","from":"photo_url"},
  {"old":"occupation","rule":"derived","from":"title","transform":"titleAtEmployer"},
  {"old":"headline","rule":"derived","from":"title","transform":"titleAtEmployer"},
  {"old":"summary","rule":"copy","from":"summary"},
  {"old":"experiences","rule":"passthrough","from":"employment_history"},
  {"old":"education","rule":"passthrough","from":"education"},
  {"old":"country","rule":"null","reason":"FoxAPIs does not return a location"},
  {"old":"country_full_name","rule":"null","reason":"FoxAPIs does not return a location"},
  {"old":"city","rule":"null","reason":"FoxAPIs does not return a location"},
  {"old":"state","rule":"null","reason":"FoxAPIs does not return a location"},
  {"old":"follower_count","rule":"null","reason":"FoxAPIs does not return follower counts"},
  {"old":"connections","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"people_also_viewed","rule":"null","reason":"FoxAPIs does not return a similar-people list"},
  {"old":"similarly_named_profiles","rule":"null","reason":"no equivalent in FoxAPIs (same-name people are listed under a different field inside the FoxAPIs profile)"},
  {"old":"background_cover_image_url","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"languages","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"industry","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"gender","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"birth_date","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"inferred_salary","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"personal_emails","rule":"null","reason":"FoxAPIs returns email candidates labelled by source, not personal emails; not mapped"},
  {"old":"personal_numbers","rule":"null","reason":"FoxAPIs phones are business numbers found with a source address; not mapped"},
  {"old":"articles","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"groups","rule":"null","reason":"no equivalent in FoxAPIs"},
  {"old":"extra","rule":"null","reason":"no equivalent in FoxAPIs"},
];
function toOldShape(p) {
  const out = {};
  const derived = [];
  const unfilled = [];
  for (const r of RULES) {
    if (r.rule === "null") { out[r.old] = null; unfilled.push({ field: r.old, reason: r.reason }); continue; }
    if (r.rule === "passthrough") { out[r.old] = Array.isArray(p[r.from]) ? p[r.from] : null; if (out[r.old] === null) unfilled.push({ field: r.old, reason: "FoxAPIs returned no list" }); continue; }
    const v = r.rule === "derived" ? TRANSFORMS[r.transform](p) : blank(p[r.from]);
    out[r.old] = v;
    if (v === null) unfilled.push({ field: r.old, reason: r.rule === "derived" ? "FoxAPIs returned no value to build it from" : "FoxAPIs returned an empty value" });
    else if (r.rule === "derived") derived.push(r.old);
  }
  out._resurrect = { source: "foxapis", unfilled, derived };
  return out;
}
const asResponse = (data, status = 200) => ({ ok: status < 400, status, data, json: async () => data, text: async () => JSON.stringify(data) });
export async function resurrectedPersonProfile({ name, company, domain, url } = {}) {
  if (!name) throw new Error("name is required by FoxAPIs: full name of the person (the old call only had a profile address)");
  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;
  if (domain) body.domain = domain;
  if (url) body.linkedin_url = url;
  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();
  const p = data && data.profile;
  if (!p || typeof p !== "object") return null;
  return toOldShape(p);
}

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 resurrectedPersonProfile(arg), null, 2));
}

Generated Python

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

# RESURRECT: replaces the Proxycurl "Person Profile" call (ended 2025-07-04). It now calls FoxAPIs POST /v1/enrich_person.
# Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
# Fields FoxAPIs cannot fill come back as None; the reasons are in _resurrect["unfilled"].

TRANSFORMS = {
    "firstName": lambda p: (str(p.get("full_name") or "").split()[0] if len(str(p.get("full_name") or "").split()) == 2 else None),
    "lastName": lambda p: (str(p.get("full_name") or "").split()[1] if len(str(p.get("full_name") or "").split()) == 2 else None),
    "slugFromLinkedin": lambda p: (lambda m: m.group(1) if m else None)(re.search(r"linkedin\.com/in/([^/?#]+)", p.get("linkedin_url") or "")),
    "titleAtEmployer": lambda p: (f"{p['title']} at {p['employer']}" if p.get("title") and p.get("employer") else None),
}
RULES = [
    {"old": "full_name", "rule": "copy", "from": "full_name"},
    {"old": "first_name", "rule": "derived", "from": "full_name", "transform": "firstName"},
    {"old": "last_name", "rule": "derived", "from": "full_name", "transform": "lastName"},
    {"old": "public_identifier", "rule": "derived", "from": "linkedin_url", "transform": "slugFromLinkedin"},
    {"old": "profile_pic_url", "rule": "copy", "from": "photo_url"},
    {"old": "occupation", "rule": "derived", "from": "title", "transform": "titleAtEmployer"},
    {"old": "headline", "rule": "derived", "from": "title", "transform": "titleAtEmployer"},
    {"old": "summary", "rule": "copy", "from": "summary"},
    {"old": "experiences", "rule": "passthrough", "from": "employment_history"},
    {"old": "education", "rule": "passthrough", "from": "education"},
    {"old": "country", "rule": "null", "reason": "FoxAPIs does not return a location"},
    {"old": "country_full_name", "rule": "null", "reason": "FoxAPIs does not return a location"},
    {"old": "city", "rule": "null", "reason": "FoxAPIs does not return a location"},
    {"old": "state", "rule": "null", "reason": "FoxAPIs does not return a location"},
    {"old": "follower_count", "rule": "null", "reason": "FoxAPIs does not return follower counts"},
    {"old": "connections", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "people_also_viewed", "rule": "null", "reason": "FoxAPIs does not return a similar-people list"},
    {"old": "similarly_named_profiles", "rule": "null", "reason": "no equivalent in FoxAPIs (same-name people are listed under a different field inside the FoxAPIs profile)"},
    {"old": "background_cover_image_url", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "languages", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "industry", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "gender", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "birth_date", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "inferred_salary", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "personal_emails", "rule": "null", "reason": "FoxAPIs returns email candidates labelled by source, not personal emails; not mapped"},
    {"old": "personal_numbers", "rule": "null", "reason": "FoxAPIs phones are business numbers found with a source address; not mapped"},
    {"old": "articles", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "groups", "rule": "null", "reason": "no equivalent in FoxAPIs"},
    {"old": "extra", "rule": "null", "reason": "no equivalent in FoxAPIs"},
]


def _blank(v):
    return None if v is None or v == "" else v


def to_old_shape(p):
    out, derived, unfilled = {}, [], []
    for r in RULES:
        if r["rule"] == "null":
            out[r["old"]] = None
            unfilled.append({"field": r["old"], "reason": r["reason"]})
            continue
        if r["rule"] == "passthrough":
            v = p.get(r["from"])
            out[r["old"]] = v if isinstance(v, list) else None
            if out[r["old"]] is None:
                unfilled.append({"field": r["old"], "reason": "FoxAPIs returned no list"})
            continue
        v = TRANSFORMS[r["transform"]](p) if r["rule"] == "derived" else _blank(p.get(r["from"]))
        out[r["old"]] = v
        if v is None:
            unfilled.append({"field": r["old"], "reason": "FoxAPIs returned no value to build it from" if r["rule"] == "derived" else "FoxAPIs returned an empty value"})
        elif r["rule"] == "derived":
            derived.append(r["old"])
    out["_resurrect"] = {"source": "foxapis", "unfilled": unfilled, "derived": derived}
    return out


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_profile(name=None, company=None, domain=None, url=None):
    if not name:
        raise ValueError("name is required by FoxAPIs: full name of the person (the old call only had a profile address)")
    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
    if domain:
        body["domain"] = domain
    if url:
        body["linkedin_url"] = url
    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)
    p = (data or {}).get("profile")
    if not isinstance(p, dict):
        return None
    return to_old_shape(p)

if __name__ == "__main__":
    import sys

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

Field mapping

Proxycurl ended 2025-07-04. Source notice, read 2026-11-23.

Target: FoxAPIs POST /v1/enrich_person.

Old fieldFoxAPIs fieldRuleBasis
full_nameprofile.full_namecopyreal sample 2026-11-22
first_namederived from profile.full_namederivedderived: first token, only when the name has exactly two words
last_namederived from profile.full_namederivedderived: second token, only when the name has exactly two words
public_identifierderived from profile.linkedin_urlderivedderived: last path part of the profile address
profile_pic_urlprofile.photo_urlcopyreal sample 2026-11-22 (field present, empty in the sample)
occupationderived from profile.title + profile.employerderivedderived: title at employer, only when both are non-empty
headlinederived from profile.title + profile.employerderivedderived: title at employer, only when both are non-empty
summaryprofile.summarycopyreal sample 2026-11-22 (a one-line text; style differs from the old summary)
experiencesprofile.employment_historypassthroughfield present in sample (empty list); items are returned as FoxAPIs items, NOT reshaped to the old item layout
educationprofile.educationpassthroughfield present in sample (empty list); items are returned as FoxAPIs items, NOT reshaped to the old item layout
countrynone: FoxAPIs does not return a locationnullalternatives page, 2026-11-22
country_full_namenone: FoxAPIs does not return a locationnullalternatives page, 2026-11-22
citynone: FoxAPIs does not return a locationnullalternatives page, 2026-11-22
statenone: FoxAPIs does not return a locationnullalternatives page, 2026-11-22
follower_countnone: FoxAPIs does not return follower countsnullalternatives page, 2026-11-22
connectionsnone: no equivalent in FoxAPIsnullno field in the sample
people_also_viewednone: FoxAPIs does not return a similar-people listnullalternatives page, 2026-11-22
similarly_named_profilesnone: no equivalent in FoxAPIs (same-name people are listed under a different field inside the FoxAPIs profile)nullno matching field in the sample
background_cover_image_urlnone: no equivalent in FoxAPIsnullno field in the sample
languagesnone: no equivalent in FoxAPIsnullno field in the sample
industrynone: no equivalent in FoxAPIsnullno field in the sample
gendernone: no equivalent in FoxAPIsnullno field in the sample
birth_datenone: no equivalent in FoxAPIsnullno field in the sample
inferred_salarynone: no equivalent in FoxAPIsnullno field in the sample
personal_emailsnone: FoxAPIs returns email candidates labelled by source, not personal emails; not mappednullalternatives page, 2026-11-22
personal_numbersnone: FoxAPIs phones are business numbers found with a source address; not mappednullsample 2026-11-22
articlesnone: no equivalent in FoxAPIsnullno field in the sample
groupsnone: no equivalent in FoxAPIsnullno field in the sample
extranone: no equivalent in FoxAPIsnullno field in the sample

The old field list is the one in the engine's design notes; Nubela's own Person Profile reference is no longer online, so old field names are not re-verified here.

Clearbit company enrichment (JavaScript)

A Node function that enriches a company from its domain. Clearbit has moved into another product and published no end date, so the engine labels it moved, not shut down. The closest FoxAPIs call returns a written snapshot, not company fields, so the mapping is marked partial and almost every old field is listed as not filled.

Input: input.js

// Company enrichment from a website domain, as many apps wrote it.
const CLEARBIT_KEY = process.env.CLEARBIT_KEY;

export async function enrichCompany(domain) {
  const res = await fetch(`https://company.clearbit.com/v2/companies/find?domain=${domain}`, {
    headers: { Authorization: `Bearer ${CLEARBIT_KEY}` },
  });
  if (!res.ok) return null;
  const company = await res.json();
  return { name: company.name, sector: company.category && company.category.sector };
}

Generated JavaScript

import { pathToFileURL } from "node:url";

// RESURRECT: replaces the Clearbit Enrichment "Company enrichment (by domain)" call (moved into another product, no end date published). It now calls FoxAPIs POST /v1/get_company_snapshot.
// Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
// PARTIAL. get_company_snapshot answers with a written due-diligence snapshot (async: 202, then poll), not company fields. The generated code returns that snapshot unchanged. Almost no old field can be filled; the table says which.
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");
}
export async function resurrectedCompanyFind({ domain } = {}) {
  if (!domain) throw new Error("domain is required by FoxAPIs: company website domain");
  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 (domain) body.domain = domain;
  const res = await fetch("https://api.foxapis.com/v1/get_company_snapshot", { 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.status !== 202 && !res.ok) throw new Error("FoxAPIs answered " + res.status);
  const first = await res.json();
  const job = res.status === 202 ? await waitForJob(first.job_id, headers) : first;
  return job.result ?? null;
}

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 resurrectedCompanyFind(arg), null, 2));
}

Generated Python

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

# RESURRECT: replaces the Clearbit Enrichment "Company enrichment (by domain)" call (moved into another product, no end date published). It now calls FoxAPIs POST /v1/get_company_snapshot.
# Needs FOXAPIS_KEY in the environment. A free key: https://foxapis.com/trial
# PARTIAL. get_company_snapshot answers with a written due-diligence snapshot (async: 202, then poll), not company fields. The generated code returns that snapshot unchanged. Almost no old field can be filled; the table says which.


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 _wait_for_job(job_id, headers):
    for _ in range(90):
        status, job = _foxapis("GET", "/v1/jobs/" + job_id, headers)
        if status >= 400:
            raise RuntimeError("FoxAPIs job poll answered %s" % status)
        if job.get("status") == "done":
            return job
        if job.get("status") in ("failed", "error"):
            raise RuntimeError("FoxAPIs job " + job["status"])
        time.sleep(2)
    raise RuntimeError("FoxAPIs job did not finish in time; poll " + job_id + " again later")


def resurrected_company_find(domain=None):
    if not domain:
        raise ValueError("domain is required by FoxAPIs: company website domain")
    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 domain:
        body["domain"] = domain
    status, data = _foxapis("POST", "/v1/get_company_snapshot", headers, body)
    if status in (401, 403):
        raise RuntimeError("FoxAPIs rejected the key (status %s)" % status)
    if status not in (200, 202):
        raise RuntimeError("FoxAPIs answered %s" % status)
    job = _wait_for_job(data["job_id"], headers) if status == 202 else data
    return job.get("result")

if __name__ == "__main__":
    import sys

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

Field mapping

Clearbit Enrichment moved into another product, no end date published. Source notice, read 2026-11-22.

Target: FoxAPIs POST /v1/get_company_snapshot.

Old fieldFoxAPIs fieldRuleBasis
namenone: not claimed: a similar field (subject_name) appears in a FoxAPIs company report sample, but no snapshot sample was captured to confirm itnullcompany report sample 2026-11-23
domainnone: FoxAPIs does not return a domain field; use the one you sentnullno field in the sample
legalNamenone: no equivalent fieldnullno field in the sample
descriptionnone: the snapshot has written sections, not one description fieldnullsample 2026-11-23
foundedYearnone: no equivalent fieldnullno field in the sample
category (sector, industry)none: no equivalent fieldnullno field in the sample
metrics (employees, raised, revenue)none: no equivalent field; figures appear only inside written sectionsnullsample 2026-11-23
location, geonone: no equivalent fieldnullno field in the sample
logonone: no equivalent fieldnullno field in the sample
linkedin, twitter, facebook, crunchbase handlesnone: no equivalent field on the company callnullno field in the sample
tech, tagsnone: no equivalent fieldnullno field in the sample

Clearbit's field reference could not be read (FoxAPIs alternatives page, 2026-11-22), so the old field names above are as remembered and not verified.

Web search through the Bing Search API, retired 2025-08-11. FoxAPIs has no web search endpoint, so the engine says so, leaves the code alone and adds a marker comment. This is the honest case: nothing is invented.

Input: input.js

// Web search for a query, using the Bing Search API.
const BING_KEY = process.env.BING_SEARCH_KEY;

export async function searchWeb(query) {
  const url = "https://api.bing.microsoft.com/v7.0/search?q=" + encodeURIComponent(query);
  const res = await fetch(url, { headers: { "Ocp-Apim-Subscription-Key": BING_KEY } });
  const data = await res.json();
  return data.webPages.value.map((p) => ({ title: p.name, link: p.url }));
}

Input: input.py

import os
import requests

BING_KEY = os.environ["BING_SEARCH_KEY"]


def search_web(query):
    response = requests.get(
        "https://api.bing.microsoft.com/v7.0/search",
        params={"q": query},
        headers={"Ocp-Apim-Subscription-Key": BING_KEY},
    )
    return [{"title": p["name"], "link": p["url"]} for p in response.json()["webPages"]["value"]]

Output: output.js (your code, plus the marker)

// Web search for a query, using the Bing Search API.
const BING_KEY = process.env.BING_SEARCH_KEY;

export async function searchWeb(query) {
  const url = "https://api.bing.microsoft.com/v7.0/search?q=" + encodeURIComponent(query);
  // RESURRECT: no FoxAPIs equivalent
  const res = await fetch(url, { headers: { "Ocp-Apim-Subscription-Key": BING_KEY } });
  const data = await res.json();
  return data.webPages.value.map((p) => ({ title: p.name, link: p.url }));
}

Output: output.py (your code, plus the marker)

import os
import requests

BING_KEY = os.environ["BING_SEARCH_KEY"]


def search_web(query):
    # RESURRECT: no FoxAPIs equivalent
    response = requests.get(
        "https://api.bing.microsoft.com/v7.0/search",
        params={"q": query},
        headers={"Ocp-Apim-Subscription-Key": BING_KEY},
    )
    return [{"title": p["name"], "link": p["url"]} for p in response.json()["webPages"]["value"]]

Field mapping

Bing Search APIs ended 2025-08-11. Source notice, read 2026-11-23.

No FoxAPIs equivalent. There is no web search endpoint in the FoxAPIs catalog. Follow Microsoft's own notice for what replaces it.