// Dealright Leads API client for TypeScript and JavaScript (Node 18 or later, Deno, Bun, a browser). // Copy this file into your project. It has no dependencies. // // Generated from docs/openapi.json by leads/scripts/gen-dev-docs.mjs. Do not edit: run the script. // OpenAPI leads operations sha256: 3af5b10b284d551659e7875b08b570a5940d24ca5994a352a664e4218aabbcd8 // // const client = new DealrightLeads({ apiKey: process.env.DEALRIGHT_API_KEY! }); // const page = await client.searchCompanies({ q: "plumbing", state: "ID", limit: 5 }); // // Docs: https://dealright.ai/developers export const DEFAULT_BASE_URL = "https://api.dealright.ai"; /** Sent as User-Agent where the runtime allows it (Node, Deno, Bun). A browser keeps its own. */ export const USER_AGENT = "dealright-leads-ts/3af5b10b284d"; /** The stable error codes of the API: branch on `code`, never on the words of `error`. */ export const ERROR_CODES = ["bad_request","unauthorized","forbidden","not_found","payment_required","unlock_required","company_reveal_required","not_top_level","conflict","gone","rate_limited","in_progress","day_limit","upstream_failed","unavailable","not_offered"] as const; export type ErrorCode = (typeof ERROR_CODES)[number]; /** A refusal of the API. `status` is the HTTP status; `code` the stable error code; `body` is the JSON body, with `error` in words. */ export class DealrightLeadsError extends Error { readonly code: ErrorCode | null; constructor( readonly status: number, readonly body: { error?: string; code?: string; [key: string]: unknown } | null, /** Seconds to wait, from the Retry-After header, when the API sent one. */ readonly retryAfter: number | null, ) { super(`HTTP ${status}${body?.code ? ` ${body.code}` : ""}: ${body?.error ?? "no error message"}`); this.name = "DealrightLeadsError"; this.code = (ERROR_CODES as readonly string[]).includes(String(body?.code)) ? body!.code as ErrorCode : null; } } /** The answer of a CSV route: the text, and the headers (the X-Leads-* headers carry the row count, the charge and the cursor). */ export type CsvAnswer = { text: string; headers: Record }; export type DealrightLeadsOptions = { /** An API key of your organization (dlr_...). Make one on https://leads.dealright.ai/developers. */ apiKey: string; baseUrl?: string; /** Your own fetch, for a proxy or a test. */ fetch?: typeof fetch; }; type CallOptions = { query?: Record; body?: unknown; csv?: boolean }; export type SearchCompaniesQuery = { /** Words in the company name, site text or industry. Several values: a|b. Exact: =value. Not: !value. */ q?: string | number; /** US states as 2-letter codes, separated by commas. `!ID` leaves a state out. */ state?: string | number; /** One sector of the Dealright taxonomy, as GET /v3/leads/facets lists it. */ sector?: string | number; /** Industry name. Several values: a|b. Exact: =value. Not: !value. */ industry?: string | number; /** City name. Several values: a|b. Exact: =value. Not: !value. */ city?: string | number; /** ZIP code. */ zip?: string | number; /** Fewest employees, a whole number. */ emp_min?: string | number; /** Most employees, a whole number. */ emp_max?: string | number; /** Only companies with a phone. Give 1 to turn it on; any other value is ignored. */ has_phone?: string | number; /** Only companies with an email. Give 1 to turn it on; any other value is ignored. */ has_email?: string | number; /** Only companies with a named owner. Give 1 to turn it on; any other value is ignored. */ has_owner?: string | number; /** Only companies with named people. Give 1 to turn it on; any other value is ignored. */ has_people?: string | number; /** Only companies matched to a state business registry record. Give 1 to turn it on; any other value is ignored. */ registered?: string | number; /** Only companies matched to a licence record. Give 1 to turn it on; any other value is ignored. */ licensed?: string | number; /** Only companies with a Form 5500 benefit plan filing. Give 1 to turn it on; any other value is ignored. */ form5500?: string | number; /** Leave out network, toll-free-only, template and chain sites. Give 1 to turn it on; any other value is ignored. */ hide_sunk?: string | number; /** Centre of a radius search: a 5-digit ZIP code or a city as `City, ST`. */ near?: string | number; /** Radius in miles around `near`, 1 to 250. */ miles?: string | number; /** Signals that the company site shows, separated by commas. */ sig?: string | number; /** A service or skill that the company site names. Several values: a|b. Exact: =value. Not: !value. */ skill?: string | number; /** Services, keywords or credentials of the company site, each equal to one whole tag (case does not matter): `wills` does not match `wills and trusts`. Several: a|b (up to 20). Not: !value. */ service?: string | number; /** Earliest founding year, 4 digits. */ founded_min?: string | number; /** Latest founding year, 4 digits. */ founded_max?: string | number; /** NAICS codes of 2 to 6 digits; each is a prefix match (`5413` matches `541310`). Several: a|b. Not: !code. */ naics?: string | number; /** SIC 1987 codes of 2 to 4 digits; each is a prefix match (`87` matches `8711`). Exact: =code (4 digits). Several: a|b. Not: !code. A SIC code is a crosswalk mapping of the company's 6-digit NAICS 2022 code (Census concordances), never a reported code: the search keeps the companies whose NAICS code maps to it. A company with no 6-digit NAICS code has no SIC code. */ sic?: string | number; /** Words and phrases in the text of the company's own site (homepage, key pages and crawl pages). Words in one value are all required; "quotes" make a phrase; several values: a|b; !value leaves out the companies that match it. Each word matches by its stem: plumber matches plumbers. */ site?: string | number; /** The pages that `site` searches: `all` (the default) the homepage, the key pages and up to 20 crawl pages of the site (50,000 characters at most); `home` the homepage only. */ site_pages?: string | number; /** Ownership classes: family, owner_operated, franchise, multi_location, group, parent, employee_owned, nonprofit. Several: a|b. Not: !class. */ ownership?: string | number; /** Estimated revenue bands: lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m, 25m_plus. An estimate from employees and industry averages (Census SUSB 2022), never a reported figure. Several: a|b. Not: !band. */ revenue?: string | number; /** Metro areas (Census Core Based Statistical Areas, OMB July 2023): a 5-digit CBSA code (14260) or a CBSA title (Boise City, ID; case does not matter), from the company's ZIP code. Several: a|b. Not: !value. A company with no ZIP code, or a ZIP code in no CBSA, has no metro area and matches no value; Not keeps it. */ metro?: string | number; /** Website languages as ISO 639-1 codes (en, es, de): the language that the homepage declares (html lang), else the language that its text reads as. Several: a|b. Not: !code. A company whose language is unknown matches no code; Not keeps it. */ language?: string | number; /** 1: only companies with a job posting on the pages of their site that Dealright stored (schema.org JobPosting data, or a careers page of one job). A company with no posting found is unknown, not one that does not hire. */ has_postings?: string | number; /** Words of a job title (2 to 120 characters): only companies with a posting whose title has every word, for example `technician` or `dental assistant`. */ posting_title?: string | number; /** Days, 1 to 365: only companies with a posting dated in the last N days (its datePosted, or the date of the page). A posting with no date never matches. With posting_title, the same posting must match both. */ posted_within?: string | number; /** Business events: only companies with an event of one of these types in the last `changed_within` months. Types: owner_changed, person_added, person_removed, location_added, phone_changed, service_added, ownership_changed, site_alive, job_change (a person who joined the company from another site), site_dead and site_parked (a site that is a company again only matches these after it came back). Several: a|b. History starts at 2026-10: the first events are those of 2026-11. */ changed?: string | number; /** The months of the `changed` filter, 1 to 12, counted back from the month of the index. Default 3. */ changed_within?: string | number; /** Map area: west,south,east,north in decimal degrees. Only companies whose point (site point, else ZIP centroid) is in the area. With bbox, limit may be up to 2000. */ bbox?: string | number; /** SEC Form D: the least total amount sold, in whole US dollars (up to 12 digits). Only companies with a joined Form D filing match. */ funding_min?: string | number; /** SEC Form D: the earliest newest date of first sale, as YYYY-MM-DD, YYYY-MM or YYYY. Only companies with a joined Form D filing match. */ funded_since?: string | number; /** A domain: only the sites of the group whose parent site it is (schema 8). The company page names the parent of a company in `group.parent`. */ parent?: string | number; /** Only companies with a family or owner-operated class and no sign of a group, of several locations, of a franchise or of a parent (schema 8). Give 1 to turn it on; any other value is ignored. */ independent?: string | number; /** The least succession signal, 0 to 100 (schema 8). Refused with a `note` until the signal is turned on: it is a heuristic, not yet measured against real sales. */ succession_min?: string | number; /** Products that the company homepage loads, by name (Shopify, Google Analytics, HubSpot); a bare value is a prefix. Several values: a|b. Exact: =value. Not: !value. */ tech?: string | number; /** Business model: b2b, b2c, both. Several: a|b. Not: !model. */ model?: string | number; /** Niche of the industry label, for example Criminal defense. Several values: a|b. Exact: =value. Not: !value. */ niche?: string | number; /** Only rows with a business phone whose number block is wireless (an estimate: a ported number keeps its block). For people, a phone of the company. Give 1 to turn it on; any other value is ignored. */ has_mobile?: string | number; /** Only rows whose every business phone is in a landline block (an unknown phone fails it). For people, the phones of the company. Give 1 to turn it on; any other value is ignored. */ landline_only?: string | number; /** Only rows with a person-level number that is not the main company number. The index has no person-level numbers yet, so it answers no rows and a note. Give 1 to turn it on; any other value is ignored. */ has_direct_dial?: string | number; /** Activity signal kinds: hiring, funding, new_location, site_change, news. Several: a|b (a company with a signal of one of them in the window). Signals of the company's own site and of public records, not third-party intent data. */ activity?: string | number; /** The least Activity signals score, 1 to 100: hiring 25, funding (SEC Form D) 30, new location 20, other site change 15, news 10; each kind counts one time. */ activity_min?: string | number; /** The window of the activity filters and of each row's `activity_signals`, in days back from today: 1 to 365. Default 90. */ activity_within?: string | number; /** Tags of the organization, by name (any case) or id. Several: a|b (a row with one of them). Exact name: =Name. Not: !name. With only tags to include and no other filter, the answer is the tagged rows, in key order. With other filters, the tags filter the rows of each page of the search, so a page can have fewer rows than `limit`, and `note` says so. */ tag?: string | number; /** A list of domains: only these companies. Each entry is a domain, a URL or an email address; commas, spaces, semicolons or line ends separate entries, and an entry that is not a domain is left out. The two lists hold 500 domains at most together. A list with no domain is refused. The other filters apply too. */ include_domains?: string | number; /** A list of domains to leave out, written as `include_domains` (for example the companies that you already work with). */ exclude_domains?: string | number; /** The `id` of a saved list (GET /v3/leads/lists): only the companies of that list, read by the API (no cap of 500). The companies of a list are its companies and the companies of its people. A list that you do not see answers 404; a list with no company answers no rows and a `note`. */ include_list?: string | number; /** The `id` of a saved list: leave out the companies of that list (for example the companies that you already work with). */ exclude_list?: string | number; /** `name` or `employees`. Any other value, or none, is the default rank. */ sort?: string | number; /** Rows to skip, 0 to 9900. Default 0. */ offset?: string | number; /** Rows in the page, 1 to 200 (1 to 2000 with bbox). Default 25. */ limit?: string | number; }; export type SearchCompaniesResponse = { month: string | null; total: number; capped: boolean; rows: ({ /** Activity signals: the company's own activity from its site and public records. Not buying intent, and no third-party intent data. Absent on a page of a map (bbox) and from an older search service. */ activity_signals?: { /** 0 to 100: the sum of the points of each kind with a signal in the window */ score: number; /** The window in days */ within: number; /** The first day of the window, YYYY-MM-DD */ since: string; /** One line for each kind that counts: its points, its newest signal, the source and the date */ reasons: string[]; /** The signals in the window, newest first (at most 3 of each event kind) */ signals: ({ kind: "hiring" | "funding" | "new_location" | "site_change" | "news"; /** YYYY-MM-DD, or YYYY-MM for a monthly fact (hiring: the month the site was read; events: the month seen) */ date: string; /** company site, SEC Form D, business event (site change), or GDELT and the news site */ source: string; text: string; points: number; })[]; /** Kinds that this index cannot read: unknown, not a negative */ missing: string[]; }; domain: string; unlocked: boolean; emails_n: number; phones_n: number; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ line_types?: ("wireless" | "landline" | "voip" | "toll_free" | "unknown")[]; ownership_classes?: string[]; ownership_evidence?: ({ class: string; source: string; text: string | null; })[]; /** The products that the homepage loads, by name. Empty: unknown, not a negative. Schema 9. */ tech?: string[]; /** Business model: b2b, b2c or both. Null: unknown. Schema 9. */ model?: string | null; /** The niches of the industry label. Schema 9. */ niches?: string[]; site_hits?: ({ page: "home" | "pages"; url?: string; text: string; marks: number[][]; })[]; /** SEC Form D: the total amount sold in US dollars over the offerings of the issuer that the index joined to the company. null or absent: no issuer was joined, which is not a negative. */ funding_total?: number | null; /** SEC Form D: the newest date of first sale (YYYY-MM-DD) of those offerings. */ funded_last?: string | null; /** SEC Form D: the number of offerings (one per Form D file number). */ funding_n?: number | null; /** The company page only: the Funding block, the SEC Form D issuer and up to 20 of its offerings, newest first. */ funding?: { source: "sec_form_d"; /** The SEC Central Index Key of the issuer. */ cik: string; issuer: string; state: string; total_sold: number | null; last_date: string | null; offerings_n: number; offerings: ({ accession: string; form?: string | null; filing_date?: string | null; sale_date?: string | null; amount_sold?: number | null; amount_offered?: number | null; industry_group?: string | null; /** The filing on SEC EDGAR. */ url: string; [key: string]: unknown; })[]; } | null; /** The NAICS 2022 codes of the company, 2 to 6 digits (a shorter code is the shortest correct prefix). Empty: no code is known, which is not a negative. */ naics?: string[]; /** The NAICS 2022 title of each code in `naics`, in the same order. */ naics_titles?: (string | null)[]; /** Where the NAICS code came from. null: the company has no code. */ naics_evidence?: { /** `label` (the codes of the company's industry node in the Dealright taxonomy), `record` (a NAICS code that a federal file reports for the company), `ntee` (an IRS NTEE code, mapped to NAICS) or `licence` (a licence file of one trade). */ kind: string; /** For `label`, the source of the label; else the files, separated by commas. */ source: string | null; /** The taxonomy node (`dr:` id) of the label. */ node: string | null; /** For `label`: `lexicon`, `map` (the hand-checked code of the node) or `ancestor` (the code of the nearest parent node). */ code_source: string | null; } | null; /** SIC 1987 codes mapped from the NAICS 2022 code by the Census crosswalk, not codes that the company reports (US Census Bureau NAICS concordances, NAICS 2022 to SIC 1987 (public domain)). A NAICS code that maps to several SIC codes keeps all of them. Empty: the company has no 6-digit NAICS code, or one with no SIC code (unknown, not a negative). */ sic?: ({ /** A SIC 1987 code of 4 digits */ code: string; /** The SIC 1987 title */ title: string; /** The 6-digit NAICS 2022 code of the company that maps to it */ naics: string; /** Always `crosswalk`: a mapping of the NAICS code, never a code that the company or a record reports */ basis: "crosswalk"; })[]; /** What gave the industry label: `rules`, `model` or `federal` (the classifier), or for a company that the classifier left with no label, `record`, `ntee` or `licence` (as `naics_evidence.kind`). */ industry_source?: string | null; /** The tier of the industry label: 1 and 2 from the rules, 3 from a record of a company with no label (less sure). null: no tier. */ industry_tier?: number | null; /** Latitude of the company point: its site point, else the centroid of its ZIP code. Absent when there is neither. */ lat?: number; /** Longitude of the company point, as `lat`. */ lon?: number; /** Estimate from employees and industry averages: never a reported figure. Null when the company has no NAICS code or no employee count (unknown). Absent on an index older than schema 13. */ revenue_estimate?: { /** lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m or 25m_plus */ band: string; label: string; /** Low bound of the band in US dollars */ low: number; /** High bound of the band; null for 25m_plus */ high: number | null; /** Employees times receipts per employee, in 2022 US dollars */ estimate: number; /** Receipts per employee of the NAICS code and size band (Census SUSB 2022) */ per_employee: number; /** The SUSB NAICS cells used, separated by commas */ naics: string; source: string; note: string; } | null; /** The metro area (Census CBSA, OMB July 2023) of the company's ZIP code. Null: no ZIP code, a ZIP code with no ZCTA, or a ZIP code in no CBSA. Absent on an index older than schema 14. */ metro?: { /** The 5-digit CBSA code */ cbsa: string; /** The CBSA title, for example Boise City, ID */ name: string; /** metro (Metropolitan Statistical Area) or micro (Micropolitan Statistical Area) */ type: string; } | null; /** The language of the company's homepage. Null: unknown (no declared language and no clear language in the text), never a negative. Absent on an index older than schema 14. */ language?: { /** ISO 639-1 code, for example en or es */ code: string; /** declared (the homepage declares it: html lang, content-language or og:locale) or text (read from the homepage text) */ source: string; } | null; /** The sentence of the company's site that says it hires (signal hiring). Null: none seen, which is unknown, not a negative. */ hiring?: { /** home or pages */ source: string; text: string | null; } | null; /** The job postings of the company. Null: no posting found on the pages that Dealright stored, which is unknown, not a sign that it does not hire. Absent on an index older than schema 15. */ postings?: { /** The job postings found on the stored pages of the site (100 at most) */ n: number; /** The newest datePosted, YYYY-MM-DD; null when no posting has a date */ newest: string | null; } | null; /** The group of sites that the company is in ("Part of ..."). Null: in no group that the index knows; not a sign that the company is independent. */ group?: { /** The domain of the parent site of the group. Null when the parent is not served (suppressed). */ parent: string | null; /** The name of the parent site. */ name: string | null; /** The number of sites in the group. */ n: number; /** The role of this company in the group. */ role: "parent" | "member"; /** The evidence that joined the sites: registry (a state registry record), eo_group (an IRS group exemption), business (a business record), phone, operator (an ad or analytics id), name (the same company name). */ keys: string[]; } | null; /** The legal form: llc, corporation or partnership as the company name or the copyright line of the homepage prints it (source `name` or `home`), or nonprofit (source `irs_eo_bmf`). Null: not known. */ legal_form?: { form: string; source: string; text: string | null; } | null; /** The succession signal, 0 to 100: a heuristic from the business age, the copyright year of the site, the ownership classes and the locations, not a measured prediction. Only when the service turns it on. */ succession?: { score: number; heuristic: true; inputs: ({ input: string; value: string | number | Record | null; points: number; })[]; } | null; [key: string]: unknown; })[]; note?: string; }; export type SearchPeopleQuery = { /** Words in the name, the title or the company of the person. Several values: a|b. Exact: =value. Not: !value. */ q?: string | number; /** Name of the person. Several values: a|b. Exact: =value. Not: !value. */ name?: string | number; /** Job title. Several values: a|b. Exact: =value. Not: !value. */ title?: string | number; /** Company name. Several values: a|b. Exact: =value. Not: !value. */ company?: string | number; /** US states as 2-letter codes, separated by commas. */ state?: string | number; /** The city of the person's company, as the city filter of the company search. Several values: a|b. Exact: =value. Not: !value. */ city?: string | number; /** Role groups of the people: technical (IT, technical staff, systems and network administrators, developers, data people, IT managers, the CTO, the CIO, the VP or head of technology) or executive (the C-suite: a chief officer, the president, the founder, the owner), or the two (technical,executive). From the title words and the department; one tested rule set. A person with no title in a group is left out: unknown, not a negative. Each person row has role_groups. */ role?: string | number; /** Seniority levels, separated by commas. */ level?: string | number; /** Departments, separated by commas. */ department?: string | number; /** One sector of the Dealright taxonomy. */ sector?: string | number; /** Only the people of the company with this domain. */ domain?: string | number; /** Schools or degrees that the company site names, separated by commas. */ edu?: string | number; /** A skill that the company site names. Several values: a|b. Exact: =value. Not: !value. */ skill?: string | number; /** Centre of a radius search: a 5-digit ZIP code or a city as `City, ST`. */ near?: string | number; /** Radius in miles around `near`, 1 to 250. */ miles?: string | number; /** Years, 1 to 60: only people whose bio on the company site states at least this many years of experience ("15 years of experience", "practicing since 2001"). A person whose site states none is unknown and never matches (schema 15). */ exp_min?: string | number; /** 1: only the people of companies with a job posting (the company filter of the same name). */ has_postings?: string | number; /** Words of a job title: only the people of companies with a posting whose title has every word. */ posting_title?: string | number; /** Days, 1 to 365: only the people of companies with a posting dated in the last N days. */ posted_within?: string | number; /** Only rows with a business phone whose number block is wireless (an estimate: a ported number keeps its block). For people, a phone of the company. Give 1 to turn it on; any other value is ignored. */ has_mobile?: string | number; /** Only rows whose every business phone is in a landline block (an unknown phone fails it). For people, the phones of the company. Give 1 to turn it on; any other value is ignored. */ landline_only?: string | number; /** Only rows with a person-level number that is not the main company number. The index has no person-level numbers yet, so it answers no rows and a note. Give 1 to turn it on; any other value is ignored. */ has_direct_dial?: string | number; /** Activity signal kinds: hiring, funding, new_location, site_change, news. Several: a|b (a company with a signal of one of them in the window). Signals of the company's own site and of public records, not third-party intent data. */ activity?: string | number; /** The least Activity signals score, 1 to 100: hiring 25, funding (SEC Form D) 30, new location 20, other site change 15, news 10; each kind counts one time. */ activity_min?: string | number; /** The window of the activity filters and of each row's `activity_signals`, in days back from today: 1 to 365. Default 90. */ activity_within?: string | number; /** Tags of the organization, by name (any case) or id. Several: a|b (a row with one of them). Exact name: =Name. Not: !name. With only tags to include and no other filter, the answer is the tagged rows, in key order. With other filters, the tags filter the rows of each page of the search, so a page can have fewer rows than `limit`, and `note` says so. */ tag?: string | number; /** The `id` of a saved list (GET /v3/leads/lists): only the people of the companies of that list (its companies and the companies of its people). A list that you do not see answers 404. */ include_list?: string | number; /** The `id` of a saved list: leave out the people of the companies of that list. */ exclude_list?: string | number; /** Rows to skip, 0 to 9900. Default 0. */ offset?: string | number; /** Rows in the page, 1 to 200. Default 25. */ limit?: string | number; }; export type SearchPeopleResponse = { month: string | null; total: number; capped: boolean; rows: ({ name: string; domain: string; unlocked: boolean; company_emails_n: number; company_phones_n: number; /** The years of experience that the company's site states for the person. Null: none stated, which is unknown, never zero. Absent on an index older than schema 15. */ experience?: { /** The years of experience */ years: number; /** years: the site states N years; since: it states a start year */ kind: "years" | "since"; /** The start year of `since` */ year: number | null; /** The phrase that states it */ phrase: string; /** The sentence of the site that holds the phrase (emails and phones removed) */ text: string; /** pages (the key pages of the site), home, or the url of the crawl page */ source: string; } | null; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; company_emails?: string[]; company_phones?: string[]; /** For company_phones: The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ company_phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** For the phones of the company: The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ company_line_types?: string[]; [key: string]: unknown; })[]; note?: string; /** The full scrape of the company site: `status` none, queued, running, done or failed; `temporary` is true while the read has no full profile; `functions_done` of `functions_total` (the capture levels L0 to L5 and the analyzers A1 to A10), `total_final` (false while the crawl can still skip a level), `current_function` and `phase` (queued, crawl, analyze, done, failed), from the job rows and span rows of the scrape: no time estimate. `queued_at`; `sections`, the sections that a full scrape fills, which this read takes at the next build of the leads index (`sections_at`); `reason` for none and failed; `next`, what to do. A read of a company with no fresh full scrape asks for it (free, 120 an hour for each credential). */ refresh?: { status: "none" | "queued" | "running" | "done" | "failed"; temporary: boolean; phase: "queued" | "crawl" | "analyze" | "done" | "failed" | null; functions_done: number | null; functions_total: number | null; total_final: boolean; current_function: string | null; queued_at: string | null; scraped_at: string | null; sections: string[]; sections_at: string; waited_seconds: number; reason?: string; next?: string; }; }; export type SimilarPeopleQuery = { /** The domain of the company of the person. */ domain: string | number; /** The name of the person as the company page or the people search gives it. */ name: string | number; /** Rows, 1 to 50. Default 25. */ limit?: string | number; }; export type SimilarPeopleResponse = { month: string | null; seed: { name: string; domain: string; title: string | null; level: string | null; } | null; rows: ({ name: string; domain: string; unlocked: boolean; company_emails_n: number; company_phones_n: number; /** The years of experience that the company's site states for the person. Null: none stated, which is unknown, never zero. Absent on an index older than schema 15. */ experience?: { /** The years of experience */ years: number; /** years: the site states N years; since: it states a start year */ kind: "years" | "since"; /** The start year of `since` */ year: number | null; /** The phrase that states it */ phrase: string; /** The sentence of the site that holds the phrase (emails and phones removed) */ text: string; /** pages (the key pages of the site), home, or the url of the crawl page */ source: string; } | null; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; company_emails?: string[]; company_phones?: string[]; /** For company_phones: The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ company_phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** For the phones of the company: The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ company_line_types?: string[]; why: string; company_score: number | null; [key: string]: unknown; })[]; note?: string; }; export type FacetsResponse = { month: string | null; facets: Record; note?: string; }; export type PlacesQuery = { /** The text typed so far (60 characters at most). */ q?: string | number; }; export type PlacesResponse = { month: string | null; places: ({ kind: "state" | "city" | "zip"; v: string; label: string; state: string | null; n: number; })[]; note?: string; }; export type GetCompanyQuery = { /** Role groups of the people: technical (IT, technical staff, systems and network administrators, developers, data people, IT managers, the CTO, the CIO, the VP or head of technology) or executive (the C-suite: a chief officer, the president, the founder, the owner), or the two (technical,executive). From the title words and the department; one tested rule set. A person with no title in a group is left out: unknown, not a negative. Each person row has role_groups. */ role?: string | number; /** Seconds, 0 to 50: hold the answer while the full scrape is queued or running, until it ends or the time runs out. Default 0: answer at once. */ wait_seconds?: string | number; }; export type GetCompanyResponse = { /** Activity signals: the company's own activity from its site and public records. Not buying intent, and no third-party intent data. Absent on a page of a map (bbox) and from an older search service. */ activity_signals?: { /** 0 to 100: the sum of the points of each kind with a signal in the window */ score: number; /** The window in days */ within: number; /** The first day of the window, YYYY-MM-DD */ since: string; /** One line for each kind that counts: its points, its newest signal, the source and the date */ reasons: string[]; /** The signals in the window, newest first (at most 3 of each event kind) */ signals: ({ kind: "hiring" | "funding" | "new_location" | "site_change" | "news"; /** YYYY-MM-DD, or YYYY-MM for a monthly fact (hiring: the month the site was read; events: the month seen) */ date: string; /** company site, SEC Form D, business event (site change), or GDELT and the news site */ source: string; text: string; points: number; })[]; /** Kinds that this index cannot read: unknown, not a negative */ missing: string[]; }; domain: string; unlocked: boolean; emails_n: number; phones_n: number; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ line_types?: ("wireless" | "landline" | "voip" | "toll_free" | "unknown")[]; ownership_classes?: string[]; ownership_evidence?: ({ class: string; source: string; text: string | null; })[]; /** The products that the homepage loads, by name. Empty: unknown, not a negative. Schema 9. */ tech?: string[]; /** Business model: b2b, b2c or both. Null: unknown. Schema 9. */ model?: string | null; /** The niches of the industry label. Schema 9. */ niches?: string[]; site_hits?: ({ page: "home" | "pages"; url?: string; text: string; marks: number[][]; })[]; /** SEC Form D: the total amount sold in US dollars over the offerings of the issuer that the index joined to the company. null or absent: no issuer was joined, which is not a negative. */ funding_total?: number | null; /** SEC Form D: the newest date of first sale (YYYY-MM-DD) of those offerings. */ funded_last?: string | null; /** SEC Form D: the number of offerings (one per Form D file number). */ funding_n?: number | null; /** The company page only: the Funding block, the SEC Form D issuer and up to 20 of its offerings, newest first. */ funding?: { source: "sec_form_d"; /** The SEC Central Index Key of the issuer. */ cik: string; issuer: string; state: string; total_sold: number | null; last_date: string | null; offerings_n: number; offerings: ({ accession: string; form?: string | null; filing_date?: string | null; sale_date?: string | null; amount_sold?: number | null; amount_offered?: number | null; industry_group?: string | null; /** The filing on SEC EDGAR. */ url: string; [key: string]: unknown; })[]; } | null; /** The NAICS 2022 codes of the company, 2 to 6 digits (a shorter code is the shortest correct prefix). Empty: no code is known, which is not a negative. */ naics?: string[]; /** The NAICS 2022 title of each code in `naics`, in the same order. */ naics_titles?: (string | null)[]; /** Where the NAICS code came from. null: the company has no code. */ naics_evidence?: { /** `label` (the codes of the company's industry node in the Dealright taxonomy), `record` (a NAICS code that a federal file reports for the company), `ntee` (an IRS NTEE code, mapped to NAICS) or `licence` (a licence file of one trade). */ kind: string; /** For `label`, the source of the label; else the files, separated by commas. */ source: string | null; /** The taxonomy node (`dr:` id) of the label. */ node: string | null; /** For `label`: `lexicon`, `map` (the hand-checked code of the node) or `ancestor` (the code of the nearest parent node). */ code_source: string | null; } | null; /** SIC 1987 codes mapped from the NAICS 2022 code by the Census crosswalk, not codes that the company reports (US Census Bureau NAICS concordances, NAICS 2022 to SIC 1987 (public domain)). A NAICS code that maps to several SIC codes keeps all of them. Empty: the company has no 6-digit NAICS code, or one with no SIC code (unknown, not a negative). */ sic?: ({ /** A SIC 1987 code of 4 digits */ code: string; /** The SIC 1987 title */ title: string; /** The 6-digit NAICS 2022 code of the company that maps to it */ naics: string; /** Always `crosswalk`: a mapping of the NAICS code, never a code that the company or a record reports */ basis: "crosswalk"; })[]; /** What gave the industry label: `rules`, `model` or `federal` (the classifier), or for a company that the classifier left with no label, `record`, `ntee` or `licence` (as `naics_evidence.kind`). */ industry_source?: string | null; /** The tier of the industry label: 1 and 2 from the rules, 3 from a record of a company with no label (less sure). null: no tier. */ industry_tier?: number | null; /** Latitude of the company point: its site point, else the centroid of its ZIP code. Absent when there is neither. */ lat?: number; /** Longitude of the company point, as `lat`. */ lon?: number; /** Estimate from employees and industry averages: never a reported figure. Null when the company has no NAICS code or no employee count (unknown). Absent on an index older than schema 13. */ revenue_estimate?: { /** lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m or 25m_plus */ band: string; label: string; /** Low bound of the band in US dollars */ low: number; /** High bound of the band; null for 25m_plus */ high: number | null; /** Employees times receipts per employee, in 2022 US dollars */ estimate: number; /** Receipts per employee of the NAICS code and size band (Census SUSB 2022) */ per_employee: number; /** The SUSB NAICS cells used, separated by commas */ naics: string; source: string; note: string; } | null; /** The metro area (Census CBSA, OMB July 2023) of the company's ZIP code. Null: no ZIP code, a ZIP code with no ZCTA, or a ZIP code in no CBSA. Absent on an index older than schema 14. */ metro?: { /** The 5-digit CBSA code */ cbsa: string; /** The CBSA title, for example Boise City, ID */ name: string; /** metro (Metropolitan Statistical Area) or micro (Micropolitan Statistical Area) */ type: string; } | null; /** The language of the company's homepage. Null: unknown (no declared language and no clear language in the text), never a negative. Absent on an index older than schema 14. */ language?: { /** ISO 639-1 code, for example en or es */ code: string; /** declared (the homepage declares it: html lang, content-language or og:locale) or text (read from the homepage text) */ source: string; } | null; /** The sentence of the company's site that says it hires (signal hiring). Null: none seen, which is unknown, not a negative. */ hiring?: { /** home or pages */ source: string; text: string | null; } | null; /** The job postings of the company. Null: no posting found on the pages that Dealright stored, which is unknown, not a sign that it does not hire. Absent on an index older than schema 15. */ postings?: { /** The job postings found on the stored pages of the site (100 at most) */ n: number; /** The newest datePosted, YYYY-MM-DD; null when no posting has a date */ newest: string | null; } | null; /** The group of sites that the company is in ("Part of ..."). Null: in no group that the index knows; not a sign that the company is independent. */ group?: { /** The domain of the parent site of the group. Null when the parent is not served (suppressed). */ parent: string | null; /** The name of the parent site. */ name: string | null; /** The number of sites in the group. */ n: number; /** The role of this company in the group. */ role: "parent" | "member"; /** The evidence that joined the sites: registry (a state registry record), eo_group (an IRS group exemption), business (a business record), phone, operator (an ad or analytics id), name (the same company name). */ keys: string[]; } | null; /** The legal form: llc, corporation or partnership as the company name or the copyright line of the homepage prints it (source `name` or `home`), or nonprofit (source `irs_eo_bmf`). Null: not known. */ legal_form?: { form: string; source: string; text: string | null; } | null; /** The succession signal, 0 to 100: a heuristic from the business age, the copyright year of the site, the ownership classes and the locations, not a measured prediction. Only when the service turns it on. */ succession?: { score: number; heuristic: true; inputs: ({ input: string; value: string | number | Record | null; points: number; })[]; } | null; activity?: { unlocked_at: string | null; unlocked_via: "app" | "api" | "mcp" | null; unlocked_by?: string | null; lists: ({ id: string; name: string; })[]; /** the ids of the tags of the organization on the company */ tags?: string[]; }; /** The people that the site names, by department. Not a headcount. */ people_by_department?: { /** What is counted: the people that the site names, never a headcount. */ basis: "people the site names"; /** The people of the company on this page, after the sell gate. */ named: number; /** Each department with one or more named people, most first. A department that is not here is unknown, not zero. */ departments: ({ department: string; people: number; })[]; /** Named people with no department. */ department_unknown: number; /** True when the page holds the most people it serves (200): the index may name more, so the counts are a floor. */ capped: boolean; note: "A count of the people that the company site or a licence record names, by department. It is not a headcount. A department that is not listed is unknown, not zero."; }; /** The sites of the group of the company, in rank order, masked as in the search. */ group_members?: ({ /** Activity signals: the company's own activity from its site and public records. Not buying intent, and no third-party intent data. Absent on a page of a map (bbox) and from an older search service. */ activity_signals?: { /** 0 to 100: the sum of the points of each kind with a signal in the window */ score: number; /** The window in days */ within: number; /** The first day of the window, YYYY-MM-DD */ since: string; /** One line for each kind that counts: its points, its newest signal, the source and the date */ reasons: string[]; /** The signals in the window, newest first (at most 3 of each event kind) */ signals: ({ kind: "hiring" | "funding" | "new_location" | "site_change" | "news"; /** YYYY-MM-DD, or YYYY-MM for a monthly fact (hiring: the month the site was read; events: the month seen) */ date: string; /** company site, SEC Form D, business event (site change), or GDELT and the news site */ source: string; text: string; points: number; })[]; /** Kinds that this index cannot read: unknown, not a negative */ missing: string[]; }; domain: string; unlocked: boolean; emails_n: number; phones_n: number; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ line_types?: ("wireless" | "landline" | "voip" | "toll_free" | "unknown")[]; ownership_classes?: string[]; ownership_evidence?: ({ class: string; source: string; text: string | null; })[]; /** The products that the homepage loads, by name. Empty: unknown, not a negative. Schema 9. */ tech?: string[]; /** Business model: b2b, b2c or both. Null: unknown. Schema 9. */ model?: string | null; /** The niches of the industry label. Schema 9. */ niches?: string[]; site_hits?: ({ page: "home" | "pages"; url?: string; text: string; marks: number[][]; })[]; /** SEC Form D: the total amount sold in US dollars over the offerings of the issuer that the index joined to the company. null or absent: no issuer was joined, which is not a negative. */ funding_total?: number | null; /** SEC Form D: the newest date of first sale (YYYY-MM-DD) of those offerings. */ funded_last?: string | null; /** SEC Form D: the number of offerings (one per Form D file number). */ funding_n?: number | null; /** The company page only: the Funding block, the SEC Form D issuer and up to 20 of its offerings, newest first. */ funding?: { source: "sec_form_d"; /** The SEC Central Index Key of the issuer. */ cik: string; issuer: string; state: string; total_sold: number | null; last_date: string | null; offerings_n: number; offerings: ({ accession: string; form?: string | null; filing_date?: string | null; sale_date?: string | null; amount_sold?: number | null; amount_offered?: number | null; industry_group?: string | null; /** The filing on SEC EDGAR. */ url: string; [key: string]: unknown; })[]; } | null; /** The NAICS 2022 codes of the company, 2 to 6 digits (a shorter code is the shortest correct prefix). Empty: no code is known, which is not a negative. */ naics?: string[]; /** The NAICS 2022 title of each code in `naics`, in the same order. */ naics_titles?: (string | null)[]; /** Where the NAICS code came from. null: the company has no code. */ naics_evidence?: { /** `label` (the codes of the company's industry node in the Dealright taxonomy), `record` (a NAICS code that a federal file reports for the company), `ntee` (an IRS NTEE code, mapped to NAICS) or `licence` (a licence file of one trade). */ kind: string; /** For `label`, the source of the label; else the files, separated by commas. */ source: string | null; /** The taxonomy node (`dr:` id) of the label. */ node: string | null; /** For `label`: `lexicon`, `map` (the hand-checked code of the node) or `ancestor` (the code of the nearest parent node). */ code_source: string | null; } | null; /** SIC 1987 codes mapped from the NAICS 2022 code by the Census crosswalk, not codes that the company reports (US Census Bureau NAICS concordances, NAICS 2022 to SIC 1987 (public domain)). A NAICS code that maps to several SIC codes keeps all of them. Empty: the company has no 6-digit NAICS code, or one with no SIC code (unknown, not a negative). */ sic?: ({ /** A SIC 1987 code of 4 digits */ code: string; /** The SIC 1987 title */ title: string; /** The 6-digit NAICS 2022 code of the company that maps to it */ naics: string; /** Always `crosswalk`: a mapping of the NAICS code, never a code that the company or a record reports */ basis: "crosswalk"; })[]; /** What gave the industry label: `rules`, `model` or `federal` (the classifier), or for a company that the classifier left with no label, `record`, `ntee` or `licence` (as `naics_evidence.kind`). */ industry_source?: string | null; /** The tier of the industry label: 1 and 2 from the rules, 3 from a record of a company with no label (less sure). null: no tier. */ industry_tier?: number | null; /** Latitude of the company point: its site point, else the centroid of its ZIP code. Absent when there is neither. */ lat?: number; /** Longitude of the company point, as `lat`. */ lon?: number; /** Estimate from employees and industry averages: never a reported figure. Null when the company has no NAICS code or no employee count (unknown). Absent on an index older than schema 13. */ revenue_estimate?: { /** lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m or 25m_plus */ band: string; label: string; /** Low bound of the band in US dollars */ low: number; /** High bound of the band; null for 25m_plus */ high: number | null; /** Employees times receipts per employee, in 2022 US dollars */ estimate: number; /** Receipts per employee of the NAICS code and size band (Census SUSB 2022) */ per_employee: number; /** The SUSB NAICS cells used, separated by commas */ naics: string; source: string; note: string; } | null; /** The metro area (Census CBSA, OMB July 2023) of the company's ZIP code. Null: no ZIP code, a ZIP code with no ZCTA, or a ZIP code in no CBSA. Absent on an index older than schema 14. */ metro?: { /** The 5-digit CBSA code */ cbsa: string; /** The CBSA title, for example Boise City, ID */ name: string; /** metro (Metropolitan Statistical Area) or micro (Micropolitan Statistical Area) */ type: string; } | null; /** The language of the company's homepage. Null: unknown (no declared language and no clear language in the text), never a negative. Absent on an index older than schema 14. */ language?: { /** ISO 639-1 code, for example en or es */ code: string; /** declared (the homepage declares it: html lang, content-language or og:locale) or text (read from the homepage text) */ source: string; } | null; /** The sentence of the company's site that says it hires (signal hiring). Null: none seen, which is unknown, not a negative. */ hiring?: { /** home or pages */ source: string; text: string | null; } | null; /** The job postings of the company. Null: no posting found on the pages that Dealright stored, which is unknown, not a sign that it does not hire. Absent on an index older than schema 15. */ postings?: { /** The job postings found on the stored pages of the site (100 at most) */ n: number; /** The newest datePosted, YYYY-MM-DD; null when no posting has a date */ newest: string | null; } | null; /** The group of sites that the company is in ("Part of ..."). Null: in no group that the index knows; not a sign that the company is independent. */ group?: { /** The domain of the parent site of the group. Null when the parent is not served (suppressed). */ parent: string | null; /** The name of the parent site. */ name: string | null; /** The number of sites in the group. */ n: number; /** The role of this company in the group. */ role: "parent" | "member"; /** The evidence that joined the sites: registry (a state registry record), eo_group (an IRS group exemption), business (a business record), phone, operator (an ad or analytics id), name (the same company name). */ keys: string[]; } | null; /** The legal form: llc, corporation or partnership as the company name or the copyright line of the homepage prints it (source `name` or `home`), or nonprofit (source `irs_eo_bmf`). Null: not known. */ legal_form?: { form: string; source: string; text: string | null; } | null; /** The succession signal, 0 to 100: a heuristic from the business age, the copyright year of the site, the ownership classes and the locations, not a measured prediction. Only when the service turns it on. */ succession?: { score: number; heuristic: true; inputs: ({ input: string; value: string | number | Record | null; points: number; })[]; } | null; [key: string]: unknown; })[]; /** Dated facts of the company as a timeline, newest first: the founded year that its site prints, licence dates that its site prints, and Form 5500 plan years. A fact with no date is not here. */ events?: ({ date: string; kind: "founded" | "licence" | "form5500"; text: string; source: "site" | "form5500"; })[]; events_note?: string; /** With `role`: the groups asked, the people and org entries kept of those read, and the names with no title that the filter left out. */ role_filter?: { groups: ("technical" | "executive")[]; people: number; of: number; org: number; org_of: number; untitled_left_out: number; }; /** The full scrape of the company site: `status` none, queued, running, done or failed; `temporary` is true while the read has no full profile; `functions_done` of `functions_total` (the capture levels L0 to L5 and the analyzers A1 to A10), `total_final` (false while the crawl can still skip a level), `current_function` and `phase` (queued, crawl, analyze, done, failed), from the job rows and span rows of the scrape: no time estimate. `queued_at`; `sections`, the sections that a full scrape fills, which this read takes at the next build of the leads index (`sections_at`); `reason` for none and failed; `next`, what to do. A read of a company with no fresh full scrape asks for it (free, 120 an hour for each credential). */ refresh?: { status: "none" | "queued" | "running" | "done" | "failed"; temporary: boolean; phase: "queued" | "crawl" | "analyze" | "done" | "failed" | null; functions_done: number | null; functions_total: number | null; total_final: boolean; current_function: string | null; queued_at: string | null; scraped_at: string | null; sections: string[]; sections_at: string; waited_seconds: number; reason?: string; next?: string; }; /** The job postings that the stored pages of the site hold, newest first (100 at most), each with its page and capture. Empty: none found, which is unknown. Absent on an index older than schema 15. */ job_postings?: ({ /** The job title */ title: string; /** schema.org employmentType values, separated by commas (FULL_TIME, PART_TIME, CONTRACTOR) */ employment_type: string | null; /** datePosted, or the datePublished of the page, as YYYY-MM-DD; null: the page gives no date */ date_posted: string | null; /** validThrough, YYYY-MM-DD: the posting closes then */ valid_through: string | null; /** jobLocation: locality, region and country, or the address text */ location: string | null; /** The url of the posting */ url: string | null; /** The stored page that holds the posting */ page_url: string; /** The Arnor capture of that page (the sha256 of its stored bytes) */ capture_id: string | null; /** jsonld: a schema.org JobPosting of the page; page: the title of a careers page of one job */ source: "jsonld" | "page"; })[]; [key: string]: unknown; }; export type SimilarCompaniesQuery = { /** Rows, 1 to 50. Default 25. */ limit?: string | number; /** Leave out companies: `lists` (in the lists of the organization that the caller sees), `unlocked` (unlocked by the organization) or `lists,unlocked`. */ exclude?: string | number; }; export type SimilarCompaniesResponse = { month: string | null; domain: string; rows: ({ /** Activity signals: the company's own activity from its site and public records. Not buying intent, and no third-party intent data. Absent on a page of a map (bbox) and from an older search service. */ activity_signals?: { /** 0 to 100: the sum of the points of each kind with a signal in the window */ score: number; /** The window in days */ within: number; /** The first day of the window, YYYY-MM-DD */ since: string; /** One line for each kind that counts: its points, its newest signal, the source and the date */ reasons: string[]; /** The signals in the window, newest first (at most 3 of each event kind) */ signals: ({ kind: "hiring" | "funding" | "new_location" | "site_change" | "news"; /** YYYY-MM-DD, or YYYY-MM for a monthly fact (hiring: the month the site was read; events: the month seen) */ date: string; /** company site, SEC Form D, business event (site change), or GDELT and the news site */ source: string; text: string; points: number; })[]; /** Kinds that this index cannot read: unknown, not a negative */ missing: string[]; }; domain: string; unlocked: boolean; emails_n: number; phones_n: number; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ line_types?: ("wireless" | "landline" | "voip" | "toll_free" | "unknown")[]; ownership_classes?: string[]; ownership_evidence?: ({ class: string; source: string; text: string | null; })[]; /** The products that the homepage loads, by name. Empty: unknown, not a negative. Schema 9. */ tech?: string[]; /** Business model: b2b, b2c or both. Null: unknown. Schema 9. */ model?: string | null; /** The niches of the industry label. Schema 9. */ niches?: string[]; site_hits?: ({ page: "home" | "pages"; url?: string; text: string; marks: number[][]; })[]; /** SEC Form D: the total amount sold in US dollars over the offerings of the issuer that the index joined to the company. null or absent: no issuer was joined, which is not a negative. */ funding_total?: number | null; /** SEC Form D: the newest date of first sale (YYYY-MM-DD) of those offerings. */ funded_last?: string | null; /** SEC Form D: the number of offerings (one per Form D file number). */ funding_n?: number | null; /** The company page only: the Funding block, the SEC Form D issuer and up to 20 of its offerings, newest first. */ funding?: { source: "sec_form_d"; /** The SEC Central Index Key of the issuer. */ cik: string; issuer: string; state: string; total_sold: number | null; last_date: string | null; offerings_n: number; offerings: ({ accession: string; form?: string | null; filing_date?: string | null; sale_date?: string | null; amount_sold?: number | null; amount_offered?: number | null; industry_group?: string | null; /** The filing on SEC EDGAR. */ url: string; [key: string]: unknown; })[]; } | null; /** The NAICS 2022 codes of the company, 2 to 6 digits (a shorter code is the shortest correct prefix). Empty: no code is known, which is not a negative. */ naics?: string[]; /** The NAICS 2022 title of each code in `naics`, in the same order. */ naics_titles?: (string | null)[]; /** Where the NAICS code came from. null: the company has no code. */ naics_evidence?: { /** `label` (the codes of the company's industry node in the Dealright taxonomy), `record` (a NAICS code that a federal file reports for the company), `ntee` (an IRS NTEE code, mapped to NAICS) or `licence` (a licence file of one trade). */ kind: string; /** For `label`, the source of the label; else the files, separated by commas. */ source: string | null; /** The taxonomy node (`dr:` id) of the label. */ node: string | null; /** For `label`: `lexicon`, `map` (the hand-checked code of the node) or `ancestor` (the code of the nearest parent node). */ code_source: string | null; } | null; /** SIC 1987 codes mapped from the NAICS 2022 code by the Census crosswalk, not codes that the company reports (US Census Bureau NAICS concordances, NAICS 2022 to SIC 1987 (public domain)). A NAICS code that maps to several SIC codes keeps all of them. Empty: the company has no 6-digit NAICS code, or one with no SIC code (unknown, not a negative). */ sic?: ({ /** A SIC 1987 code of 4 digits */ code: string; /** The SIC 1987 title */ title: string; /** The 6-digit NAICS 2022 code of the company that maps to it */ naics: string; /** Always `crosswalk`: a mapping of the NAICS code, never a code that the company or a record reports */ basis: "crosswalk"; })[]; /** What gave the industry label: `rules`, `model` or `federal` (the classifier), or for a company that the classifier left with no label, `record`, `ntee` or `licence` (as `naics_evidence.kind`). */ industry_source?: string | null; /** The tier of the industry label: 1 and 2 from the rules, 3 from a record of a company with no label (less sure). null: no tier. */ industry_tier?: number | null; /** Latitude of the company point: its site point, else the centroid of its ZIP code. Absent when there is neither. */ lat?: number; /** Longitude of the company point, as `lat`. */ lon?: number; /** Estimate from employees and industry averages: never a reported figure. Null when the company has no NAICS code or no employee count (unknown). Absent on an index older than schema 13. */ revenue_estimate?: { /** lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m or 25m_plus */ band: string; label: string; /** Low bound of the band in US dollars */ low: number; /** High bound of the band; null for 25m_plus */ high: number | null; /** Employees times receipts per employee, in 2022 US dollars */ estimate: number; /** Receipts per employee of the NAICS code and size band (Census SUSB 2022) */ per_employee: number; /** The SUSB NAICS cells used, separated by commas */ naics: string; source: string; note: string; } | null; /** The metro area (Census CBSA, OMB July 2023) of the company's ZIP code. Null: no ZIP code, a ZIP code with no ZCTA, or a ZIP code in no CBSA. Absent on an index older than schema 14. */ metro?: { /** The 5-digit CBSA code */ cbsa: string; /** The CBSA title, for example Boise City, ID */ name: string; /** metro (Metropolitan Statistical Area) or micro (Micropolitan Statistical Area) */ type: string; } | null; /** The language of the company's homepage. Null: unknown (no declared language and no clear language in the text), never a negative. Absent on an index older than schema 14. */ language?: { /** ISO 639-1 code, for example en or es */ code: string; /** declared (the homepage declares it: html lang, content-language or og:locale) or text (read from the homepage text) */ source: string; } | null; /** The sentence of the company's site that says it hires (signal hiring). Null: none seen, which is unknown, not a negative. */ hiring?: { /** home or pages */ source: string; text: string | null; } | null; /** The job postings of the company. Null: no posting found on the pages that Dealright stored, which is unknown, not a sign that it does not hire. Absent on an index older than schema 15. */ postings?: { /** The job postings found on the stored pages of the site (100 at most) */ n: number; /** The newest datePosted, YYYY-MM-DD; null when no posting has a date */ newest: string | null; } | null; /** The group of sites that the company is in ("Part of ..."). Null: in no group that the index knows; not a sign that the company is independent. */ group?: { /** The domain of the parent site of the group. Null when the parent is not served (suppressed). */ parent: string | null; /** The name of the parent site. */ name: string | null; /** The number of sites in the group. */ n: number; /** The role of this company in the group. */ role: "parent" | "member"; /** The evidence that joined the sites: registry (a state registry record), eo_group (an IRS group exemption), business (a business record), phone, operator (an ad or analytics id), name (the same company name). */ keys: string[]; } | null; /** The legal form: llc, corporation or partnership as the company name or the copyright line of the homepage prints it (source `name` or `home`), or nonprofit (source `irs_eo_bmf`). Null: not known. */ legal_form?: { form: string; source: string; text: string | null; } | null; /** The succession signal, 0 to 100: a heuristic from the business age, the copyright year of the site, the ownership classes and the locations, not a measured prediction. Only when the service turns it on. */ succession?: { score: number; heuristic: true; inputs: ({ input: string; value: string | number | Record | null; points: number; })[]; } | null; why: string; score: number; [key: string]: unknown; })[]; /** With `exclude`: the rows left out. */ excluded?: number; note?: string; }; export type CompanyJudgeResponse = { domain: string; /** queued or running: a pass is on its way, ask again in a few seconds; done or fresh: the verdicts are final; unavailable: the judge model did not answer, and the page shows the stored values; off: the judge is not set up. */ status: "off" | "unavailable" | "queued" | "running" | "done" | "fresh" | "busy" | "absent" | "failed" | "no_evidence" | "none"; month: string | null; judged_at: string | null; model: string | null; note?: string; entries: ({ /** The field of the company page. */ field: "name" | "description" | "industry" | "services" | "phones" | "emails" | "addresses" | "people" | "owner" | "registration" | "similar"; /** The value as the index holds it (empty for a phone or an email of a company that is not unlocked). */ key: string; /** The value as the page showed it before the judge; null for a masked contact value. */ original: string | null; verdict: "keep" | "correct" | "drop"; /** The corrected value (correct only). */ value: string | null; /** Why, in one sentence, naming the evidence. */ reason: string | null; /** The Arnor v3 Decision (action field_correction) that holds the verdict. */ decision_id: string; at: string | null; })[]; }; export type StartCompanyJudgeResponse = { domain: string; /** queued or running: a pass is on its way, ask again in a few seconds; done or fresh: the verdicts are final; unavailable: the judge model did not answer, and the page shows the stored values; off: the judge is not set up. */ status: "off" | "unavailable" | "queued" | "running" | "done" | "fresh" | "busy" | "absent" | "failed" | "no_evidence" | "none"; month: string | null; judged_at: string | null; model: string | null; note?: string; entries: ({ /** The field of the company page. */ field: "name" | "description" | "industry" | "services" | "phones" | "emails" | "addresses" | "people" | "owner" | "registration" | "similar"; /** The value as the index holds it (empty for a phone or an email of a company that is not unlocked). */ key: string; /** The value as the page showed it before the judge; null for a masked contact value. */ original: string | null; verdict: "keep" | "correct" | "drop"; /** The corrected value (correct only). */ value: string | null; /** Why, in one sentence, naming the evidence. */ reason: string | null; /** The Arnor v3 Decision (action field_correction) that holds the verdict. */ decision_id: string; at: string | null; })[]; }; export type CompanyNewsResponse = { domain: string; state: "ready" | "stale" | "pending" | "unavailable" | "absent"; fetched_at: string | null; source: string; window: string; articles: ({ /** The title as GDELT gives it (GDELT puts spaces around punctuation). */ title: string | null; /** The article on the publisher's site. Dealright does not fetch or store the article. */ url: string; /** The domain of the publisher. */ source: string | null; /** When GDELT first saw the article (ISO 8601, UTC). */ date: string | null; language: string | null; /** The country of the publisher, as GDELT names it. */ country: string | null; /** How exact the match is, best first: `name_place` the title holds the name and the city or state; `domain` the article text names the company domain; `name` the title holds the name; `text` GDELT matched the name in the text only. */ match: "name_place" | "domain" | "name" | "text"; /** The queries that found the article. */ via: ("name" | "domain")[]; })[]; queries: ({ kind: "name" | "domain"; state: "ok" | "empty" | "unavailable"; n: number; })[]; day_max: number; lookups_left: number; note?: string; }; export type SimilarToSeedsQuery = { /** Seed companies: 1 to 10 domains, URLs or email addresses, separated by commas. Give this or `list_id`. */ seeds?: string | number; /** A list of the organization: its first 10 companies are the seeds. Give this or `seeds`. */ list_id?: string | number; /** Leave out companies: `lists` (in the lists of the organization that the caller sees), `unlocked` (unlocked by the organization) or `lists,unlocked`. */ exclude?: string | number; /** Rows, 1 to 50. Default 25. */ limit?: string | number; }; export type SimilarToSeedsResponse = { month: string | null; seeds: string[]; unmatched: string[]; rows: ({ /** Activity signals: the company's own activity from its site and public records. Not buying intent, and no third-party intent data. Absent on a page of a map (bbox) and from an older search service. */ activity_signals?: { /** 0 to 100: the sum of the points of each kind with a signal in the window */ score: number; /** The window in days */ within: number; /** The first day of the window, YYYY-MM-DD */ since: string; /** One line for each kind that counts: its points, its newest signal, the source and the date */ reasons: string[]; /** The signals in the window, newest first (at most 3 of each event kind) */ signals: ({ kind: "hiring" | "funding" | "new_location" | "site_change" | "news"; /** YYYY-MM-DD, or YYYY-MM for a monthly fact (hiring: the month the site was read; events: the month seen) */ date: string; /** company site, SEC Form D, business event (site change), or GDELT and the news site */ source: string; text: string; points: number; })[]; /** Kinds that this index cannot read: unknown, not a negative */ missing: string[]; }; domain: string; unlocked: boolean; emails_n: number; phones_n: number; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ line_types?: ("wireless" | "landline" | "voip" | "toll_free" | "unknown")[]; ownership_classes?: string[]; ownership_evidence?: ({ class: string; source: string; text: string | null; })[]; /** The products that the homepage loads, by name. Empty: unknown, not a negative. Schema 9. */ tech?: string[]; /** Business model: b2b, b2c or both. Null: unknown. Schema 9. */ model?: string | null; /** The niches of the industry label. Schema 9. */ niches?: string[]; site_hits?: ({ page: "home" | "pages"; url?: string; text: string; marks: number[][]; })[]; /** SEC Form D: the total amount sold in US dollars over the offerings of the issuer that the index joined to the company. null or absent: no issuer was joined, which is not a negative. */ funding_total?: number | null; /** SEC Form D: the newest date of first sale (YYYY-MM-DD) of those offerings. */ funded_last?: string | null; /** SEC Form D: the number of offerings (one per Form D file number). */ funding_n?: number | null; /** The company page only: the Funding block, the SEC Form D issuer and up to 20 of its offerings, newest first. */ funding?: { source: "sec_form_d"; /** The SEC Central Index Key of the issuer. */ cik: string; issuer: string; state: string; total_sold: number | null; last_date: string | null; offerings_n: number; offerings: ({ accession: string; form?: string | null; filing_date?: string | null; sale_date?: string | null; amount_sold?: number | null; amount_offered?: number | null; industry_group?: string | null; /** The filing on SEC EDGAR. */ url: string; [key: string]: unknown; })[]; } | null; /** The NAICS 2022 codes of the company, 2 to 6 digits (a shorter code is the shortest correct prefix). Empty: no code is known, which is not a negative. */ naics?: string[]; /** The NAICS 2022 title of each code in `naics`, in the same order. */ naics_titles?: (string | null)[]; /** Where the NAICS code came from. null: the company has no code. */ naics_evidence?: { /** `label` (the codes of the company's industry node in the Dealright taxonomy), `record` (a NAICS code that a federal file reports for the company), `ntee` (an IRS NTEE code, mapped to NAICS) or `licence` (a licence file of one trade). */ kind: string; /** For `label`, the source of the label; else the files, separated by commas. */ source: string | null; /** The taxonomy node (`dr:` id) of the label. */ node: string | null; /** For `label`: `lexicon`, `map` (the hand-checked code of the node) or `ancestor` (the code of the nearest parent node). */ code_source: string | null; } | null; /** SIC 1987 codes mapped from the NAICS 2022 code by the Census crosswalk, not codes that the company reports (US Census Bureau NAICS concordances, NAICS 2022 to SIC 1987 (public domain)). A NAICS code that maps to several SIC codes keeps all of them. Empty: the company has no 6-digit NAICS code, or one with no SIC code (unknown, not a negative). */ sic?: ({ /** A SIC 1987 code of 4 digits */ code: string; /** The SIC 1987 title */ title: string; /** The 6-digit NAICS 2022 code of the company that maps to it */ naics: string; /** Always `crosswalk`: a mapping of the NAICS code, never a code that the company or a record reports */ basis: "crosswalk"; })[]; /** What gave the industry label: `rules`, `model` or `federal` (the classifier), or for a company that the classifier left with no label, `record`, `ntee` or `licence` (as `naics_evidence.kind`). */ industry_source?: string | null; /** The tier of the industry label: 1 and 2 from the rules, 3 from a record of a company with no label (less sure). null: no tier. */ industry_tier?: number | null; /** Latitude of the company point: its site point, else the centroid of its ZIP code. Absent when there is neither. */ lat?: number; /** Longitude of the company point, as `lat`. */ lon?: number; /** Estimate from employees and industry averages: never a reported figure. Null when the company has no NAICS code or no employee count (unknown). Absent on an index older than schema 13. */ revenue_estimate?: { /** lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m or 25m_plus */ band: string; label: string; /** Low bound of the band in US dollars */ low: number; /** High bound of the band; null for 25m_plus */ high: number | null; /** Employees times receipts per employee, in 2022 US dollars */ estimate: number; /** Receipts per employee of the NAICS code and size band (Census SUSB 2022) */ per_employee: number; /** The SUSB NAICS cells used, separated by commas */ naics: string; source: string; note: string; } | null; /** The metro area (Census CBSA, OMB July 2023) of the company's ZIP code. Null: no ZIP code, a ZIP code with no ZCTA, or a ZIP code in no CBSA. Absent on an index older than schema 14. */ metro?: { /** The 5-digit CBSA code */ cbsa: string; /** The CBSA title, for example Boise City, ID */ name: string; /** metro (Metropolitan Statistical Area) or micro (Micropolitan Statistical Area) */ type: string; } | null; /** The language of the company's homepage. Null: unknown (no declared language and no clear language in the text), never a negative. Absent on an index older than schema 14. */ language?: { /** ISO 639-1 code, for example en or es */ code: string; /** declared (the homepage declares it: html lang, content-language or og:locale) or text (read from the homepage text) */ source: string; } | null; /** The sentence of the company's site that says it hires (signal hiring). Null: none seen, which is unknown, not a negative. */ hiring?: { /** home or pages */ source: string; text: string | null; } | null; /** The job postings of the company. Null: no posting found on the pages that Dealright stored, which is unknown, not a sign that it does not hire. Absent on an index older than schema 15. */ postings?: { /** The job postings found on the stored pages of the site (100 at most) */ n: number; /** The newest datePosted, YYYY-MM-DD; null when no posting has a date */ newest: string | null; } | null; /** The group of sites that the company is in ("Part of ..."). Null: in no group that the index knows; not a sign that the company is independent. */ group?: { /** The domain of the parent site of the group. Null when the parent is not served (suppressed). */ parent: string | null; /** The name of the parent site. */ name: string | null; /** The number of sites in the group. */ n: number; /** The role of this company in the group. */ role: "parent" | "member"; /** The evidence that joined the sites: registry (a state registry record), eo_group (an IRS group exemption), business (a business record), phone, operator (an ad or analytics id), name (the same company name). */ keys: string[]; } | null; /** The legal form: llc, corporation or partnership as the company name or the copyright line of the homepage prints it (source `name` or `home`), or nonprofit (source `irs_eo_bmf`). Null: not known. */ legal_form?: { form: string; source: string; text: string | null; } | null; /** The succession signal, 0 to 100: a heuristic from the business age, the copyright year of the site, the ownership classes and the locations, not a measured prediction. Only when the service turns it on. */ succession?: { score: number; heuristic: true; inputs: ({ input: string; value: string | number | Record | null; points: number; })[]; } | null; why: string; score: number; [key: string]: unknown; })[]; /** With `exclude` or `list_id`: the rows left out. */ excluded?: number; note?: string; }; export type MarketQuery = { /** An industry label or words of one, with the modifiers of the company search (`=label` for an exact label) */ industry?: string | number; /** A top-level sector of the taxonomy */ sector?: string | number; /** NAICS codes of 2 to 6 digits, each a prefix, `|` between them, `!code` for Not */ naics?: string | number; /** Two-letter states, separated by commas */ state?: string | number; /** A ZIP prefix of 3 to 5 digits: 3 digits is about one metro area */ zip?: string | number; /** A radius centre: a 5-digit ZIP or `City, ST` */ near?: string | number; /** The radius in miles, 1 to 250 (default 25) */ miles?: string | number; }; export type MarketResponse = { month: string | null; total: number; capped: boolean; exact: boolean; sample: { scanned: number; stride: number; }; owner_named: { /** companies (an estimate when the market is sampled) */ n: number; /** share of the companies, 0 to 1 */ share: number; }; chain: { /** companies (an estimate when the market is sampled) */ n: number; /** share of the companies, 0 to 1 */ share: number; }; single_location: { /** companies (an estimate when the market is sampled) */ n: number; /** share of the companies, 0 to 1 */ share: number; }; ownership: Record | null; bands: ({ /** companies (an estimate when the market is sampled) */ n: number; /** share of the companies, 0 to 1 */ share: number; band: string; emp_min: number | null; emp_max: number | null; })[]; cities: ({ /** companies (an estimate when the market is sampled) */ n: number; /** share of the companies, 0 to 1 */ share: number; city: string; state: string | null; })[]; fragmentation: { single_small: { /** companies (an estimate when the market is sampled) */ n: number; /** share of the companies, 0 to 1 */ share: number; known: number; }; hhi: number | null; concentration: string | null; top4_location_share: number | null; }; largest: ({ /** Activity signals: the company's own activity from its site and public records. Not buying intent, and no third-party intent data. Absent on a page of a map (bbox) and from an older search service. */ activity_signals?: { /** 0 to 100: the sum of the points of each kind with a signal in the window */ score: number; /** The window in days */ within: number; /** The first day of the window, YYYY-MM-DD */ since: string; /** One line for each kind that counts: its points, its newest signal, the source and the date */ reasons: string[]; /** The signals in the window, newest first (at most 3 of each event kind) */ signals: ({ kind: "hiring" | "funding" | "new_location" | "site_change" | "news"; /** YYYY-MM-DD, or YYYY-MM for a monthly fact (hiring: the month the site was read; events: the month seen) */ date: string; /** company site, SEC Form D, business event (site change), or GDELT and the news site */ source: string; text: string; points: number; })[]; /** Kinds that this index cannot read: unknown, not a negative */ missing: string[]; }; domain: string; unlocked: boolean; emails_n: number; phones_n: number; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ line_types?: ("wireless" | "landline" | "voip" | "toll_free" | "unknown")[]; ownership_classes?: string[]; ownership_evidence?: ({ class: string; source: string; text: string | null; })[]; /** The products that the homepage loads, by name. Empty: unknown, not a negative. Schema 9. */ tech?: string[]; /** Business model: b2b, b2c or both. Null: unknown. Schema 9. */ model?: string | null; /** The niches of the industry label. Schema 9. */ niches?: string[]; site_hits?: ({ page: "home" | "pages"; url?: string; text: string; marks: number[][]; })[]; /** SEC Form D: the total amount sold in US dollars over the offerings of the issuer that the index joined to the company. null or absent: no issuer was joined, which is not a negative. */ funding_total?: number | null; /** SEC Form D: the newest date of first sale (YYYY-MM-DD) of those offerings. */ funded_last?: string | null; /** SEC Form D: the number of offerings (one per Form D file number). */ funding_n?: number | null; /** The company page only: the Funding block, the SEC Form D issuer and up to 20 of its offerings, newest first. */ funding?: { source: "sec_form_d"; /** The SEC Central Index Key of the issuer. */ cik: string; issuer: string; state: string; total_sold: number | null; last_date: string | null; offerings_n: number; offerings: ({ accession: string; form?: string | null; filing_date?: string | null; sale_date?: string | null; amount_sold?: number | null; amount_offered?: number | null; industry_group?: string | null; /** The filing on SEC EDGAR. */ url: string; [key: string]: unknown; })[]; } | null; /** The NAICS 2022 codes of the company, 2 to 6 digits (a shorter code is the shortest correct prefix). Empty: no code is known, which is not a negative. */ naics?: string[]; /** The NAICS 2022 title of each code in `naics`, in the same order. */ naics_titles?: (string | null)[]; /** Where the NAICS code came from. null: the company has no code. */ naics_evidence?: { /** `label` (the codes of the company's industry node in the Dealright taxonomy), `record` (a NAICS code that a federal file reports for the company), `ntee` (an IRS NTEE code, mapped to NAICS) or `licence` (a licence file of one trade). */ kind: string; /** For `label`, the source of the label; else the files, separated by commas. */ source: string | null; /** The taxonomy node (`dr:` id) of the label. */ node: string | null; /** For `label`: `lexicon`, `map` (the hand-checked code of the node) or `ancestor` (the code of the nearest parent node). */ code_source: string | null; } | null; /** SIC 1987 codes mapped from the NAICS 2022 code by the Census crosswalk, not codes that the company reports (US Census Bureau NAICS concordances, NAICS 2022 to SIC 1987 (public domain)). A NAICS code that maps to several SIC codes keeps all of them. Empty: the company has no 6-digit NAICS code, or one with no SIC code (unknown, not a negative). */ sic?: ({ /** A SIC 1987 code of 4 digits */ code: string; /** The SIC 1987 title */ title: string; /** The 6-digit NAICS 2022 code of the company that maps to it */ naics: string; /** Always `crosswalk`: a mapping of the NAICS code, never a code that the company or a record reports */ basis: "crosswalk"; })[]; /** What gave the industry label: `rules`, `model` or `federal` (the classifier), or for a company that the classifier left with no label, `record`, `ntee` or `licence` (as `naics_evidence.kind`). */ industry_source?: string | null; /** The tier of the industry label: 1 and 2 from the rules, 3 from a record of a company with no label (less sure). null: no tier. */ industry_tier?: number | null; /** Latitude of the company point: its site point, else the centroid of its ZIP code. Absent when there is neither. */ lat?: number; /** Longitude of the company point, as `lat`. */ lon?: number; /** Estimate from employees and industry averages: never a reported figure. Null when the company has no NAICS code or no employee count (unknown). Absent on an index older than schema 13. */ revenue_estimate?: { /** lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m or 25m_plus */ band: string; label: string; /** Low bound of the band in US dollars */ low: number; /** High bound of the band; null for 25m_plus */ high: number | null; /** Employees times receipts per employee, in 2022 US dollars */ estimate: number; /** Receipts per employee of the NAICS code and size band (Census SUSB 2022) */ per_employee: number; /** The SUSB NAICS cells used, separated by commas */ naics: string; source: string; note: string; } | null; /** The metro area (Census CBSA, OMB July 2023) of the company's ZIP code. Null: no ZIP code, a ZIP code with no ZCTA, or a ZIP code in no CBSA. Absent on an index older than schema 14. */ metro?: { /** The 5-digit CBSA code */ cbsa: string; /** The CBSA title, for example Boise City, ID */ name: string; /** metro (Metropolitan Statistical Area) or micro (Micropolitan Statistical Area) */ type: string; } | null; /** The language of the company's homepage. Null: unknown (no declared language and no clear language in the text), never a negative. Absent on an index older than schema 14. */ language?: { /** ISO 639-1 code, for example en or es */ code: string; /** declared (the homepage declares it: html lang, content-language or og:locale) or text (read from the homepage text) */ source: string; } | null; /** The sentence of the company's site that says it hires (signal hiring). Null: none seen, which is unknown, not a negative. */ hiring?: { /** home or pages */ source: string; text: string | null; } | null; /** The job postings of the company. Null: no posting found on the pages that Dealright stored, which is unknown, not a sign that it does not hire. Absent on an index older than schema 15. */ postings?: { /** The job postings found on the stored pages of the site (100 at most) */ n: number; /** The newest datePosted, YYYY-MM-DD; null when no posting has a date */ newest: string | null; } | null; /** The group of sites that the company is in ("Part of ..."). Null: in no group that the index knows; not a sign that the company is independent. */ group?: { /** The domain of the parent site of the group. Null when the parent is not served (suppressed). */ parent: string | null; /** The name of the parent site. */ name: string | null; /** The number of sites in the group. */ n: number; /** The role of this company in the group. */ role: "parent" | "member"; /** The evidence that joined the sites: registry (a state registry record), eo_group (an IRS group exemption), business (a business record), phone, operator (an ad or analytics id), name (the same company name). */ keys: string[]; } | null; /** The legal form: llc, corporation or partnership as the company name or the copyright line of the homepage prints it (source `name` or `home`), or nonprofit (source `irs_eo_bmf`). Null: not known. */ legal_form?: { form: string; source: string; text: string | null; } | null; /** The succession signal, 0 to 100: a heuristic from the business age, the copyright year of the site, the ownership classes and the locations, not a measured prediction. Only when the service turns it on. */ succession?: { score: number; heuristic: true; inputs: ({ input: string; value: string | number | Record | null; points: number; })[]; } | null; [key: string]: unknown; })[]; note?: string; notes: string[]; }; export type CompanyEventsQuery = { /** Event types, separated by |: owner_changed, person_added, person_removed, location_added, phone_changed, service_added, ownership_changed, site_dead, site_parked, site_alive, job_change */ type?: string | number; /** Only the events of the last 1 to 120 months of the index */ months?: string | number; }; export type CompanyEventsResponse = { /** The month of the index */ month: string | null; domain: string; /** The first month of the history (2026-10) */ history_from: string; /** The first month that has events (2026-11) */ first_diff: string; /** True when the organization unlocked the company, so the values are not masked */ unlocked?: boolean; rows: ({ /** A stable id of the event */ id: string; /** What changed */ type: "owner_changed" | "person_added" | "person_removed" | "location_added" | "phone_changed" | "service_added" | "ownership_changed" | "site_dead" | "site_parked" | "site_alive" | "job_change"; /** The month in which the change was seen (YYYY-MM) */ month: string; /** The month it is compared with */ month_before: string; /** The site of the event; for job_change, the new site */ domain: string; /** The person of a person event, owner_changed (the new owner) and job_change */ person: string | null; /** The title of the person, as the site prints it */ title: string | null; /** The value in month_before: a name, a phone, an address, the ownership classes, the site state; for job_change the old site */ before: string | null; /** The value in month; for job_change the new site */ after: string | null; /** job_change only: the old site */ other_domain: string | null; /** job_change only: the fields that agree besides the exact name (title, place, industry) */ matched: string[]; evidence: { before: { /** The classify month of this side */ month: string; /** The page of the company's site that holds the value */ page?: string | null; /** The reader rule that took the value from the page */ rule?: string | null; /** The words of the page around the value (up to 300 characters); null when the sell gate removed it */ snippet?: string | null; /** When no page holds the value: the file of the month that does (for example labels/final.parquet) */ file?: string; /** When no page holds the value: what the file says */ note?: string; } | null; after: { /** The classify month of this side */ month: string; /** The page of the company's site that holds the value */ page?: string | null; /** The reader rule that took the value from the page */ rule?: string | null; /** The words of the page around the value (up to 300 characters); null when the sell gate removed it */ snippet?: string | null; /** When no page holds the value: the file of the month that does (for example labels/final.parquet) */ file?: string; /** When no page holds the value: what the file says */ note?: string; } | null; }; })[]; note?: string; }; export type BulkLookupBody = { values: string[]; }; export type BulkLookupResponse = { asked: number; matched: number; not_found: number; invalid: number; note?: string; results: ({ input: string; status: "matched" | "not_found" | "invalid" | "not_served"; rule?: string; domain?: string; candidates?: number; row?: { domain: string; unlocked: boolean; emails_n: number; phones_n: number; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; [key: string]: unknown; }; })[]; }; export type BulkLookupPeopleBody = { people: ({ first_name: string; last_name: string; company: string; })[]; }; export type BulkLookupPeopleResponse = { asked: number; matched: number; not_found: number; company_not_found: number; invalid: number; note?: string; results: ({ input: { first_name: string; last_name: string; company: string; }; status: "matched" | "not_found" | "company_not_found" | "invalid" | "not_served"; rule?: string; domain?: string; candidates?: number; row?: { name: string; domain: string; key: string; unlocked: boolean; company_emails_n: number; company_phones_n: number; company_emails?: string[]; company_phones?: string[]; [key: string]: unknown; }; })[]; }; export type AskBody = { /** The sentence that says which companies or people to find. */ q: string; /** Fix the search. Without it, the sentence decides. */ kind?: "companies" | "people"; }; export type AskResponse = { kind: "companies" | "people"; filters: Record; dropped: ({ key: string | null; value: string; why: string; })[]; explain: string; }; export type SearchInvestorsQuery = { /** Text in the firm name or legal name. */ q?: string | number; /** Fund types, commas between: pe, vc, hedge, real_estate, other. A firm that advises a private fund of one of the types. */ ftype?: string | number; /** Office states (2-letter codes), commas between. */ state?: string | number; /** AUM bands 1 to 4, commas between: 1 under $100M, 2 $100M to $1B, 3 $1B to $10B, 4 $10B and over. */ band?: string | number; /** The least number of private funds. */ pf_min?: string | number; /** Registered advisers or exempt reporting advisers. */ kind?: string | number; /** The order: aum (default, largest first), name or funds. */ sort?: string | number; /** Rows to skip. */ offset?: string | number; /** Rows in the page. */ limit?: string | number; }; export type SearchInvestorsResponse = { /** False when the investor search file is not built yet or the search service does not serve it: then `rows` is empty and `note` says why. */ ready: boolean; built_at: string | null; total: number; rows: ({ /** The SEC CRD number of the firm. */ crd: string; sec_no: string | null; name: string | null; legal_name: string | null; kind: "registered" | "exempt"; city: string | null; state: string | null; country: string | null; iso2: string | null; website: string | null; domain: string | null; /** Assets under management in US dollars, as `aum_basis` reports them. */ aum: number | null; aum_basis: "regulatory_assets" | "private_fund_gross" | null; aum_band: number | null; private_funds: number; private_fund_gross: number | null; funds: { pe: number; vc: number; hedge: number; real_estate: number; other: number; }; fund_types: ("pe" | "vc" | "hedge" | "real_estate" | "other")[]; /** The date of the latest Form ADV filing in the file. */ filed: string | null; /** The firm's IAPD page with its Form ADV. */ filing_url: string; })[]; /** What the data is: the SEC register of investment advisers, not a list of who buys which business. */ notice: string; note?: string; }; export type InvestorFacetsResponse = { ready: boolean; built_at: string | null; facets: Record; notice: string; note?: string; }; export type SbaAcquisitionsResponse = { domain: string; source: { /** The label of the source to show with the numbers. */ label: "SBA 7(a) FOIA"; name: string; dataset: string; file: string; downloaded: string; }; /** The field of the loan file that selects the loans, and the rules of the cells. */ field: string; /** The first NAICS code of the company in the index; null when it has none. */ naics: string | null; state: string | null; /** The published cells of the company industry, most specific first. */ matches: ({ /** The NAICS code of the cell: 6 digits, 4 digits or a sector (two digits, or a range such as 31-33). */ code: string; level: "naics6" | "naics4" | "sector"; us: { /** Change-of-ownership 7(a) loans in the cell (5 or more). */ loans: number; p25: number; /** The median gross approval in US dollars. */ median: number; p75: number; }; /** The cell of the company state; null when it is not published (fewer than 5 loans, or none). */ in_state: { /** Change-of-ownership 7(a) loans in the cell (5 or more). */ loans: number; p25: number; /** The median gross approval in US dollars. */ median: number; p75: number; } | null; })[]; note?: string; }; export type CompanyHoldersQuery = { /** Levels of holders above the company (clamped to 0 or 1 on free reads; deeper hops require a Dossier). */ up?: string | number; /** Levels of holdings below the company (clamped to 0 or 1 on free reads; deeper hops require a Dossier). */ down?: string | number; }; export type CompanyHoldersResponse = { domain: string; found: boolean; nodes: (Record)[]; edges: (Record)[]; counts?: Record; max_free_hops?: number; hidden_links_beyond_hop_1?: number; truncated_for_dossier?: boolean; note: string; [key: string]: unknown; }; export type CompanyRevealsResponse = { domain: string; total: number; limit: number; rows: ({ id: string; at: string; person: string | null; kind: string; status: "verified" | "not_found" | "error"; charged_cents: number; via: "api" | "member"; by?: string | null; })[]; }; export type UnlockBody = { domains: string[]; }; export type UnlockResponse = { rows: ({ /** Activity signals: the company's own activity from its site and public records. Not buying intent, and no third-party intent data. Absent on a page of a map (bbox) and from an older search service. */ activity_signals?: { /** 0 to 100: the sum of the points of each kind with a signal in the window */ score: number; /** The window in days */ within: number; /** The first day of the window, YYYY-MM-DD */ since: string; /** One line for each kind that counts: its points, its newest signal, the source and the date */ reasons: string[]; /** The signals in the window, newest first (at most 3 of each event kind) */ signals: ({ kind: "hiring" | "funding" | "new_location" | "site_change" | "news"; /** YYYY-MM-DD, or YYYY-MM for a monthly fact (hiring: the month the site was read; events: the month seen) */ date: string; /** company site, SEC Form D, business event (site change), or GDELT and the news site */ source: string; text: string; points: number; })[]; /** Kinds that this index cannot read: unknown, not a negative */ missing: string[]; }; domain: string; unlocked: boolean; emails_n: number; phones_n: number; /** The ids of the tags of the organization on this row (GET /v3/leads/tags names them). Absent when it has none. */ tags?: string[]; emails?: string[]; phones?: string[]; /** The check of each phone, in the order of `phones`. It is computed from the number only: no call, no message, no line lookup. `line_type` is an estimate from the number block (wireless, landline, voip, toll_free or unknown), replaced by the exact type when the organization revealed it (POST /v3/leads/reveal/line-type). It does not tell a live line from a disconnected one. Only with the values (an unlocked company). */ phone_checks?: ({ /** The number in E.164 form, without an extension. Null when the text is not a phone number. */ e164: string | null; /** True: a structurally valid NANP number. False: not valid, or not a NANP number. Null: not known (no area code). */ valid: boolean | null; /** toll_free (800, 833, 844, 855, 866, 877, 888), premium (900 or exchange 976: not a business line), geographic, invalid, or unknown. */ kind: "toll_free" | "premium" | "geographic" | "invalid" | "unknown"; /** The 3-digit area code of a NANP number. */ area_code: string | null; /** The US state or territory of the area code, from the NANPA NPA database. Null: not a US geographic code. */ area_state: string | null; /** True when area_state differs from the company state. A signal, not an error: the number stays. Null: one of the two is not known. */ state_mismatch: boolean | null; /** A short text for a person, for example `Toll-free` or `Area code: TX (company in ID)`. */ label: string; /** The line type. An estimate from the number block (line_type_source number_block: the NANPA block assignment and the FCC Form 499 type of its carrier; toll_free_npa: the area code), shown as "estimated (number block)", since a ported number keeps its block; or the exact type of a line lookup at Reveal (line_type_exact true). unknown: not known, never "not a mobile". */ line_type?: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** Where an estimated line_type comes from. Null when it is unknown or exact. */ line_type_source?: "number_block" | "toll_free_npa" | null; /** True when line_type is the exact type of a line lookup that the organization revealed (POST /v2/leads/reveal/line-type). */ line_type_exact?: boolean; })[]; /** The estimated line type of each phone, in the order of the phones (wireless, landline, voip, toll_free, unknown), also for a company that is not unlocked: no number is in it. An estimate from the number block (NANPA block assignments and the FCC Form 499 type of the carrier); a ported number can differ. */ line_types?: ("wireless" | "landline" | "voip" | "toll_free" | "unknown")[]; ownership_classes?: string[]; ownership_evidence?: ({ class: string; source: string; text: string | null; })[]; /** The products that the homepage loads, by name. Empty: unknown, not a negative. Schema 9. */ tech?: string[]; /** Business model: b2b, b2c or both. Null: unknown. Schema 9. */ model?: string | null; /** The niches of the industry label. Schema 9. */ niches?: string[]; site_hits?: ({ page: "home" | "pages"; url?: string; text: string; marks: number[][]; })[]; /** SEC Form D: the total amount sold in US dollars over the offerings of the issuer that the index joined to the company. null or absent: no issuer was joined, which is not a negative. */ funding_total?: number | null; /** SEC Form D: the newest date of first sale (YYYY-MM-DD) of those offerings. */ funded_last?: string | null; /** SEC Form D: the number of offerings (one per Form D file number). */ funding_n?: number | null; /** The company page only: the Funding block, the SEC Form D issuer and up to 20 of its offerings, newest first. */ funding?: { source: "sec_form_d"; /** The SEC Central Index Key of the issuer. */ cik: string; issuer: string; state: string; total_sold: number | null; last_date: string | null; offerings_n: number; offerings: ({ accession: string; form?: string | null; filing_date?: string | null; sale_date?: string | null; amount_sold?: number | null; amount_offered?: number | null; industry_group?: string | null; /** The filing on SEC EDGAR. */ url: string; [key: string]: unknown; })[]; } | null; /** The NAICS 2022 codes of the company, 2 to 6 digits (a shorter code is the shortest correct prefix). Empty: no code is known, which is not a negative. */ naics?: string[]; /** The NAICS 2022 title of each code in `naics`, in the same order. */ naics_titles?: (string | null)[]; /** Where the NAICS code came from. null: the company has no code. */ naics_evidence?: { /** `label` (the codes of the company's industry node in the Dealright taxonomy), `record` (a NAICS code that a federal file reports for the company), `ntee` (an IRS NTEE code, mapped to NAICS) or `licence` (a licence file of one trade). */ kind: string; /** For `label`, the source of the label; else the files, separated by commas. */ source: string | null; /** The taxonomy node (`dr:` id) of the label. */ node: string | null; /** For `label`: `lexicon`, `map` (the hand-checked code of the node) or `ancestor` (the code of the nearest parent node). */ code_source: string | null; } | null; /** SIC 1987 codes mapped from the NAICS 2022 code by the Census crosswalk, not codes that the company reports (US Census Bureau NAICS concordances, NAICS 2022 to SIC 1987 (public domain)). A NAICS code that maps to several SIC codes keeps all of them. Empty: the company has no 6-digit NAICS code, or one with no SIC code (unknown, not a negative). */ sic?: ({ /** A SIC 1987 code of 4 digits */ code: string; /** The SIC 1987 title */ title: string; /** The 6-digit NAICS 2022 code of the company that maps to it */ naics: string; /** Always `crosswalk`: a mapping of the NAICS code, never a code that the company or a record reports */ basis: "crosswalk"; })[]; /** What gave the industry label: `rules`, `model` or `federal` (the classifier), or for a company that the classifier left with no label, `record`, `ntee` or `licence` (as `naics_evidence.kind`). */ industry_source?: string | null; /** The tier of the industry label: 1 and 2 from the rules, 3 from a record of a company with no label (less sure). null: no tier. */ industry_tier?: number | null; /** Latitude of the company point: its site point, else the centroid of its ZIP code. Absent when there is neither. */ lat?: number; /** Longitude of the company point, as `lat`. */ lon?: number; /** Estimate from employees and industry averages: never a reported figure. Null when the company has no NAICS code or no employee count (unknown). Absent on an index older than schema 13. */ revenue_estimate?: { /** lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m or 25m_plus */ band: string; label: string; /** Low bound of the band in US dollars */ low: number; /** High bound of the band; null for 25m_plus */ high: number | null; /** Employees times receipts per employee, in 2022 US dollars */ estimate: number; /** Receipts per employee of the NAICS code and size band (Census SUSB 2022) */ per_employee: number; /** The SUSB NAICS cells used, separated by commas */ naics: string; source: string; note: string; } | null; /** The metro area (Census CBSA, OMB July 2023) of the company's ZIP code. Null: no ZIP code, a ZIP code with no ZCTA, or a ZIP code in no CBSA. Absent on an index older than schema 14. */ metro?: { /** The 5-digit CBSA code */ cbsa: string; /** The CBSA title, for example Boise City, ID */ name: string; /** metro (Metropolitan Statistical Area) or micro (Micropolitan Statistical Area) */ type: string; } | null; /** The language of the company's homepage. Null: unknown (no declared language and no clear language in the text), never a negative. Absent on an index older than schema 14. */ language?: { /** ISO 639-1 code, for example en or es */ code: string; /** declared (the homepage declares it: html lang, content-language or og:locale) or text (read from the homepage text) */ source: string; } | null; /** The sentence of the company's site that says it hires (signal hiring). Null: none seen, which is unknown, not a negative. */ hiring?: { /** home or pages */ source: string; text: string | null; } | null; /** The job postings of the company. Null: no posting found on the pages that Dealright stored, which is unknown, not a sign that it does not hire. Absent on an index older than schema 15. */ postings?: { /** The job postings found on the stored pages of the site (100 at most) */ n: number; /** The newest datePosted, YYYY-MM-DD; null when no posting has a date */ newest: string | null; } | null; /** The group of sites that the company is in ("Part of ..."). Null: in no group that the index knows; not a sign that the company is independent. */ group?: { /** The domain of the parent site of the group. Null when the parent is not served (suppressed). */ parent: string | null; /** The name of the parent site. */ name: string | null; /** The number of sites in the group. */ n: number; /** The role of this company in the group. */ role: "parent" | "member"; /** The evidence that joined the sites: registry (a state registry record), eo_group (an IRS group exemption), business (a business record), phone, operator (an ad or analytics id), name (the same company name). */ keys: string[]; } | null; /** The legal form: llc, corporation or partnership as the company name or the copyright line of the homepage prints it (source `name` or `home`), or nonprofit (source `irs_eo_bmf`). Null: not known. */ legal_form?: { form: string; source: string; text: string | null; } | null; /** The succession signal, 0 to 100: a heuristic from the business age, the copyright year of the site, the ownership classes and the locations, not a measured prediction. Only when the service turns it on. */ succession?: { score: number; heuristic: true; inputs: ({ input: string; value: string | number | Record | null; points: number; })[]; } | null; [key: string]: unknown; })[]; charged_cents: number; added: string[]; month: { month: string; leads: number; cents: number; }; unmatched: string[]; }; export type AccountResponse = { plan: string; month: { month: string; leads: number; cents: number; }; included: number; leads_left: number; next_lead_cents: number | null; /** The reveals and email checks of the month, charged or free */ reveals: number; /** The cents charged for the reveals and email checks of the month */ reveal_cents: number; /** month.cents plus reveal_cents: all the cents charged in the month */ total_cents: number; }; export type RevealBody = { domain: string; first_name: string; last_name: string; }; export type RevealResponse = { domain: string; name: string; status: "proved" | "not_proved" | "not_found"; email?: string; charged_cents: number; repeat: boolean; at: string; }; export type RevealLineTypeBody = { domain: string; phone: string; }; export type RevealLineTypeResponse = { domain: string; /** The phone in E.164 form */ phone: string; status: "found" | "not_found"; line_type: "wireless" | "landline" | "voip" | "toll_free" | "unknown"; /** True when the lookup named the exact type; false on a miss */ exact: boolean; /** Always null: this answer is exact, not an estimate (see `exact`). Kept for clients of the first version. */ line_type_source: null; /** The carrier name of the lookup; null when it gives none */ carrier: string | null; charged_cents: number; repeat: boolean; at: string; }; export type VerifyEmailsBody = { /** 1 to 100 work email addresses. Case and spaces around an address do not count; each address is checked one time. */ emails: string[]; }; export type VerifyEmailsResponse = { results: ({ /** The address in lower case, as it was checked (an input that is not an address: as it was given). */ email: string; /** deliverable: the mail server accepts the address and the domain does not accept every address. undeliverable: the server refuses the mailbox. catch_all: the domain accepts every address, so this one is not proved. unknown: no answer that proves either way. refused: not checked (see `reason`). not_checked: the time of this request ended first; send it again. */ status: "deliverable" | "undeliverable" | "catch_all" | "unknown" | "refused" | "not_checked"; /** Why an address is refused, not checked or unknown: invalid (not a plain address), personal_domain (a free-mail or ISP domain), not_a_business_domain (the domain is not a company of the Dealright index), suppressed (the sell gate refused the company or the address), service (the check service gave no answer), time. */ reason?: "invalid" | "personal_domain" | "not_a_business_domain" | "suppressed" | "service" | "time"; /** The class of the first MX host of the domain: google, microsoft (Microsoft 365), other or none (no MX). Null when no check ran. */ mx_provider: "google" | "microsoft" | "other" | "none" | null; charged_cents: number; /** True when the answer is from a check of this address earlier in this month (free). */ repeat: boolean; })[]; counts: { deliverable?: number; undeliverable?: number; catch_all?: number; unknown?: number; refused?: number; not_checked?: number; }; charged_cents: number; /** Checks of the organization in the last 24 hours, with this request. */ day_used: number; day_max: number; stopped_early: boolean; }; export type RevealPersonBody = { /** The domain of the unlocked company of the person. */ domain: string; first_name: string; last_name: string; /** email, phone or the two (the default). */ types?: ("email" | "phone")[]; }; export type RevealPersonResponse = { domain: string; name: string; types: ("email" | "phone")[]; /** found: at least one value; not_found: none (free). */ status: "found" | "not_found"; values: ({ type: "work_email" | "mobile" | "direct_phone"; value: string; /** True for a value of a paid step (the own mail server check, a source). */ paid: boolean; /** The proof of the value: `status` (verified, printed or valid_number), `method` (mail_server, source_check, printed_on_site or number_block, and `line_type_basis` number_block for a phone), `checked_at`, `grade` (A: proved by our own check now; B: printed by the company's site or checked by a source; C: an unlabelled number near the name) and, for an email, `mx_provider` when the mail server was asked. Only a verified value of a paid step is charged. */ proof: { status: "verified" | "printed" | "valid_number"; method: "mail_server" | "source_check" | "printed_on_site" | "number_block"; checked_at: string; grade: "A" | "B" | "C"; line_type?: string; line_type_basis?: "number_block"; mx_provider?: string | null; }; })[]; charged_cents: number; repeat: boolean; at: string; /** The role groups of the person (src/leads/roles.ts). */ role_groups: ("technical" | "executive")[]; /** The types asked that no step found. */ missing: ("email" | "phone")[]; }; export type RevealPeopleBody = { people: ({ /** The domain of the unlocked company of the person. */ domain: string; first_name: string; last_name: string; })[]; /** email, phone or the two (the default), for every person. */ types?: ("email" | "phone")[]; /** true: the cost of the batch, person by person; no source is asked and nothing is charged. */ dry_run?: boolean; /** The most cents that the batch may charge: a person who could pass it is not started. */ max_cents?: number; }; export type RevealPeopleResponse = { dry_run: boolean; types: ("email" | "phone")[]; results: (Record)[]; charged_cents: number; /** dry_run: the most that the batch can charge now. */ max_cents?: number; price_cents?: number; stopped_early: boolean; next: number | null; note?: string; }; export type DossierQuery = { /** standard ($1,000/mo / $199 single-deal test) or institutional ($2,500/mo / $399 single-deal test). Default standard. */ tier?: string | number; }; export type DossierResponse = { domain: string; tier: "standard" | "institutional"; price_cents: number | null; on_sale: boolean; tiers: { standard: { cents: number | null; label: string; max_hops: number; }; institutional: { cents: number | null; label: string; max_hops: number; }; }; preview: Record; purchased: boolean; status: "none" | "running" | "done"; steps: ({ key: string; label: string; state: string; functions_done?: number; functions_total?: number; total_final?: boolean; current_function?: string | null; })[]; done: number; total: number; result: Record | null; charged_cents: number; at: string | null; }; export type BuyDossierBody = { /** standard ($1,000/mo / $199 single-deal test) or institutional ($2,500/mo / $399 single-deal test). Default standard. */ tier?: "standard" | "institutional"; }; export type BuyDossierResponse = { domain: string; tier: "standard" | "institutional"; price_cents: number | null; on_sale: boolean; tiers: { standard: { cents: number | null; label: string; max_hops: number; }; institutional: { cents: number | null; label: string; max_hops: number; }; }; preview: Record; purchased: boolean; status: "none" | "running" | "done"; steps: ({ key: string; label: string; state: string; functions_done?: number; functions_total?: number; total_final?: boolean; current_function?: string | null; })[]; done: number; total: number; result: Record | null; charged_cents: number; at: string | null; }; export type IntelReportQuery = { /** Report tier: standard ($1,000/mo Basic / $199 single-deal test) or institutional ($2,500/mo Bank-Grade / $399 single-deal test). */ tier?: string | number; }; export type IntelReportResponse = Record; export type OrderIntelReportBody = { tier?: "standard" | "institutional"; }; export type OrderIntelReportResponse = Record; export type IntelGraphResponse = Record; export type IntelKgNodeQuery = { /** Maximum incoming/outgoing edges per direction (default 100). */ limit?: string | number; }; export type IntelKgNodeResponse = Record; export type IntelKgDominanceQuery = { /** Optional comma-separated peer entity IDs. */ peers?: string | number; /** Optional bitemporal date (YYYY-MM-DD or RFC3339). */ as_of?: string | number; }; export type IntelKgDominanceResponse = Record; export type IntelKgSupplyChainQuery = { /** Maximum traversal hop depth (default 3, max 6). */ hops?: string | number; /** Optional bitemporal date (YYYY-MM-DD or RFC3339). */ as_of?: string | number; }; export type IntelKgSupplyChainResponse = Record; export type IntelKgPowerQuery = { /** Comma-separated coalition entity node IDs. */ coalition: string | number; /** Optional state or market benchmark in USD. */ state_usd?: string | number; /** Optional bitemporal date (YYYY-MM-DD or RFC3339). */ as_of?: string | number; }; export type IntelKgPowerResponse = Record; export type IntelKgBillQuery = { /** Optional bitemporal date (YYYY-MM-DD or RFC3339). */ as_of?: string | number; }; export type IntelKgBillResponse = Record; export type ListListsResponse = { lists: ({ id: string; name: string; created_by: string; created_at: string; updated_at: string; companies: number; people: number; /** Investor firms of the SEC adviser register in the list */ investors: number; owner_sub: string | null; shared: boolean; })[]; limits: { lists: number; rows: number; }; }; export type CreateListBody = { name: string; }; export type CreateListResponse = { id: string; name: string; }; export type GetListQuery = { kind?: string | number; offset?: string | number; limit?: string | number; }; export type GetListResponse = { id: string; name: string; shared: boolean; kind: "companies" | "people"; total: number; offset: number; next_offset: number | null; companies: number; people: number; investors: number; rows: (Record)[]; missing_n: number; missing: string[]; note?: string; }; export type UpdateListBody = { name?: string; shared?: boolean; }; export type UpdateListResponse = { id: string; name: string; shared: boolean; }; export type DeleteListResponse = { id: string; deleted: boolean; }; export type GetListInvestorsQuery = { offset?: string | number; limit?: string | number; }; export type GetListInvestorsResponse = { id: string; name: string; shared: boolean; kind: "investors"; total: number; offset: number; next_offset: number | null; companies: number; people: number; investors: number; rows: (Record)[]; missing_n: number; missing: string[]; note?: string; }; export type AddToListBody = { companies?: string[]; people?: ({ domain: string; name: string; })[]; investors?: string[]; }; export type AddToListResponse = { id: string; added: number; invalid: string[]; }; export type RemoveFromListBody = { companies?: string[]; people?: ({ domain: string; name: string; })[]; investors?: string[]; }; export type RemoveFromListResponse = { id: string; removed: number; invalid: string[]; }; export type ListKeysQuery = { kind?: string | number; }; export type ListKeysResponse = { kind: "companies" | "people"; keys: string[]; capped: boolean; limit: number; }; export type ListTagsResponse = { tags: ({ id: string; name: string; color: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink"; created_by: string; created_at: string; updated_at: string; companies: number; people: number; })[]; colors: ("gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink")[]; limits: { tags: number; rows: number; }; }; export type CreateTagBody = { name: string; color?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink"; }; export type CreateTagResponse = { id: string; name: string; color: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink"; }; export type UpdateTagBody = { name?: string; color?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink"; }; export type UpdateTagResponse = { id: string; name?: string; color?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink"; }; export type DeleteTagResponse = { id: string; deleted: boolean; }; export type TagRowsBody = { companies?: string[]; people?: ({ domain: string; name: string; })[]; }; export type TagRowsResponse = { id: string; added: number; invalid: string[]; }; export type UntagRowsBody = { companies?: string[]; people?: ({ domain: string; name: string; })[]; }; export type UntagRowsResponse = { id: string; removed: number; invalid: string[]; }; export type ListNotesQuery = { /** The company: a domain, a URL or an email address */ domain: string | number; /** A person of the company, by name: only the notes on that person */ name?: string | number; }; export type ListNotesResponse = { notes: ({ id: string; kind: "company" | "person"; /** The domain of the company of the record */ domain: string; /** The person of a person note, in lower case as the key holds it; null for a company note */ name: string | null; body: string; /** Who wrote the note: user: (a member) or key: (an API key) */ author: string; /** True when the caller may change or delete the note */ editable: boolean; created_at: string; updated_at: string; })[]; limits: { chars: number; perRecord: number; }; }; export type CreateNoteBody = { /** The company: a domain, a URL or an email address */ domain: string; /** A person of the company, by name, for a note on that person */ name?: string; /** The text of the note, 1 to 5000 characters */ body: string; }; export type CreateNoteResponse = { id: string; kind: "company" | "person"; /** The domain of the company of the record */ domain: string; /** The person of a person note, in lower case as the key holds it; null for a company note */ name: string | null; body: string; /** Who wrote the note: user: (a member) or key: (an API key) */ author: string; /** True when the caller may change or delete the note */ editable: boolean; created_at: string; updated_at: string; }; export type UpdateNoteBody = { body: string; }; export type UpdateNoteResponse = { id: string; kind: "company" | "person"; /** The domain of the company of the record */ domain: string; /** The person of a person note, in lower case as the key holds it; null for a company note */ name: string | null; body: string; /** Who wrote the note: user: (a member) or key: (an API key) */ author: string; /** True when the caller may change or delete the note */ editable: boolean; created_at: string; updated_at: string; }; export type DeleteNoteResponse = { id: string; deleted: boolean; }; export type ListSearchesResponse = { searches: ({ id: string; name: string; kind: "companies" | "people"; query: Record; created_by: string; created_at: string; last_run_at: string | null; last_total: number | null; last_capped: boolean | null; last_month: string | null; /** how often the alert run runs the search: off, daily or weekly */ alert: "off" | "daily" | "weekly"; /** the time of the last alert run */ alert_run_at: string | null; /** new rows of the alert that no member has seen yet */ alert_new_n: number; /** new rows that GET /v3/leads/searches/{id}/new serves (the last ones found, at most 200) */ alert_new_kept: number; /** when the alert found the kept rows */ alert_new_at: string | null; /** the automation of the search (list, unlock, export file), or null */ automation: { /** the member who set the automation (user:); it runs as this member */ by: string; set_at: string; /** the list that gets the new rows */ list_id: string | null; /** the most new companies that one run unlocks */ unlock_n: number | null; /** the most cents that the unlocks of one run may cost */ unlock_cap_cents: number | null; /** the format of the export file of each run */ export_format: "default" | "hubspot" | "salesforce" | "pipedrive" | "zoho" | null; /** the conditions that a new row must meet before a step acts on it, or null for none */ conditions: { /** the fit score of the row for the profile is at least `min`; the must and exclude criteria of the profile must hold too */ score?: { /** a fit profile of the organization (GET /v3/leads/profiles) of the kind of the search */ profile_id: string; /** the least fit score, 0 to 100 */ min: number; }; /** the employee count of the row is at least this */ employees_min?: number; /** the employee count of the row is at most this */ employees_max?: number; /** the state of the row is one of these (two capital letters) */ states?: string[]; /** the row has an email (of the company, for a person row) */ has_email?: true; /** the row has a phone (of the company, for a person row) */ has_phone?: true; /** a company search only: the site of the company names an owner */ has_owner?: true; } | null; /** why the automation stopped; it does not run until a member sets it again */ stopped: string | null; stopped_at: string | null; /** what the last run did */ last: { at: string; period: string; new_rows: number; /** rows added to the list; null when the step is not set or did not run */ list_added: number | null; /** companies unlocked; null when the step is not set */ unlocked: number | null; /** the cents of those unlocks */ charged_cents: number | null; /** keys in the export file; null when the step is not set */ export_rows: number | null; /** why a step did less: the cost cap, the plan, the member limit, a full list, no row that met the conditions */ notices: string[]; /** with conditions: the new rows that met them, that a known value failed, and that had no value for one (these do not reach a step) */ conditions?: { kept: number; dropped: number; unknown: number; }; } | null; /** the last export file: its keys, the end of its link, and if the link is live */ export: { rows: number; expires_at: string; live: boolean; } | null; } | null; })[]; limits: { searches: number; }; }; export type SaveSearchBody = { name: string; kind: "companies" | "people"; query: Record; }; export type SaveSearchResponse = { id: string; name: string; kind: "companies" | "people"; query: Record; }; export type SetSearchAlertBody = { alert: "off" | "daily" | "weekly"; }; export type SetSearchAlertResponse = { id: string; alert: "off" | "daily" | "weekly"; }; export type DeleteSearchResponse = { id: string; deleted: boolean; }; export type NewSearchResultsQuery = { offset?: string | number; limit?: string | number; }; export type NewSearchResultsResponse = { id: string; name: string; kind: "companies" | "people"; query: Record; created_by: string; created_at: string; last_run_at: string | null; last_total: number | null; last_capped: boolean | null; last_month: string | null; /** how often the alert run runs the search: off, daily or weekly */ alert: "off" | "daily" | "weekly"; /** the time of the last alert run */ alert_run_at: string | null; /** new rows of the alert that no member has seen yet */ alert_new_n: number; /** new rows that GET /v3/leads/searches/{id}/new serves (the last ones found, at most 200) */ alert_new_kept: number; /** when the alert found the kept rows */ alert_new_at: string | null; /** the automation of the search (list, unlock, export file), or null */ automation: { /** the member who set the automation (user:); it runs as this member */ by: string; set_at: string; /** the list that gets the new rows */ list_id: string | null; /** the most new companies that one run unlocks */ unlock_n: number | null; /** the most cents that the unlocks of one run may cost */ unlock_cap_cents: number | null; /** the format of the export file of each run */ export_format: "default" | "hubspot" | "salesforce" | "pipedrive" | "zoho" | null; /** the conditions that a new row must meet before a step acts on it, or null for none */ conditions: { /** the fit score of the row for the profile is at least `min`; the must and exclude criteria of the profile must hold too */ score?: { /** a fit profile of the organization (GET /v3/leads/profiles) of the kind of the search */ profile_id: string; /** the least fit score, 0 to 100 */ min: number; }; /** the employee count of the row is at least this */ employees_min?: number; /** the employee count of the row is at most this */ employees_max?: number; /** the state of the row is one of these (two capital letters) */ states?: string[]; /** the row has an email (of the company, for a person row) */ has_email?: true; /** the row has a phone (of the company, for a person row) */ has_phone?: true; /** a company search only: the site of the company names an owner */ has_owner?: true; } | null; /** why the automation stopped; it does not run until a member sets it again */ stopped: string | null; stopped_at: string | null; /** what the last run did */ last: { at: string; period: string; new_rows: number; /** rows added to the list; null when the step is not set or did not run */ list_added: number | null; /** companies unlocked; null when the step is not set */ unlocked: number | null; /** the cents of those unlocks */ charged_cents: number | null; /** keys in the export file; null when the step is not set */ export_rows: number | null; /** why a step did less: the cost cap, the plan, the member limit, a full list, no row that met the conditions */ notices: string[]; /** with conditions: the new rows that met them, that a known value failed, and that had no value for one (these do not reach a step) */ conditions?: { kept: number; dropped: number; unknown: number; }; } | null; /** the last export file: its keys, the end of its link, and if the link is live */ export: { rows: number; expires_at: string; live: boolean; } | null; } | null; total: number; offset: number; next_offset: number | null; rows: (Record)[]; missing_n: number; note?: string; }; export type MarkSearchSeenResponse = { id: string; alert_new_n: number; }; export type RunSearchQuery = { offset?: string | number; limit?: string | number; }; export type RunSearchResponse = { id: string; name: string; kind: "companies" | "people"; query: Record; created_by: string; created_at: string; last_run_at: string | null; last_total: number | null; last_capped: boolean | null; last_month: string | null; /** how often the alert run runs the search: off, daily or weekly */ alert: "off" | "daily" | "weekly"; /** the time of the last alert run */ alert_run_at: string | null; /** new rows of the alert that no member has seen yet */ alert_new_n: number; /** new rows that GET /v3/leads/searches/{id}/new serves (the last ones found, at most 200) */ alert_new_kept: number; /** when the alert found the kept rows */ alert_new_at: string | null; /** the automation of the search (list, unlock, export file), or null */ automation: { /** the member who set the automation (user:); it runs as this member */ by: string; set_at: string; /** the list that gets the new rows */ list_id: string | null; /** the most new companies that one run unlocks */ unlock_n: number | null; /** the most cents that the unlocks of one run may cost */ unlock_cap_cents: number | null; /** the format of the export file of each run */ export_format: "default" | "hubspot" | "salesforce" | "pipedrive" | "zoho" | null; /** the conditions that a new row must meet before a step acts on it, or null for none */ conditions: { /** the fit score of the row for the profile is at least `min`; the must and exclude criteria of the profile must hold too */ score?: { /** a fit profile of the organization (GET /v3/leads/profiles) of the kind of the search */ profile_id: string; /** the least fit score, 0 to 100 */ min: number; }; /** the employee count of the row is at least this */ employees_min?: number; /** the employee count of the row is at most this */ employees_max?: number; /** the state of the row is one of these (two capital letters) */ states?: string[]; /** the row has an email (of the company, for a person row) */ has_email?: true; /** the row has a phone (of the company, for a person row) */ has_phone?: true; /** a company search only: the site of the company names an owner */ has_owner?: true; } | null; /** why the automation stopped; it does not run until a member sets it again */ stopped: string | null; stopped_at: string | null; /** what the last run did */ last: { at: string; period: string; new_rows: number; /** rows added to the list; null when the step is not set or did not run */ list_added: number | null; /** companies unlocked; null when the step is not set */ unlocked: number | null; /** the cents of those unlocks */ charged_cents: number | null; /** keys in the export file; null when the step is not set */ export_rows: number | null; /** why a step did less: the cost cap, the plan, the member limit, a full list, no row that met the conditions */ notices: string[]; /** with conditions: the new rows that met them, that a known value failed, and that had no value for one (these do not reach a step) */ conditions?: { kept: number; dropped: number; unknown: number; }; } | null; /** the last export file: its keys, the end of its link, and if the link is live */ export: { rows: number; expires_at: string; live: boolean; } | null; } | null; ran_at: string | null; month: string | null; total: number; capped: boolean; rows: (Record)[]; note?: string; new_since_last_run: number | null; new_is_exact: boolean; total_change: number | null; index_changed: boolean | null; compared_rows: number; recorded: boolean; }; export type DeleteAutomationResponse = { id: string; automation: Record | null; }; export type AutomationCostQuery = { /** 1 to 200 */ unlock_n: string | number; }; export type AutomationCostResponse = { unlock_n: number; plan: string; month_leads: number; cents: number | null; cents_one: number | null; refused: "free" | "cap" | null; }; export type ListProfilesResponse = { profiles: ({ id: string; name: string; kind: "companies" | "people"; criteria: ({ /** the column: company fields industry, sector, naics, state, near, employees, has_owner, has_phone, has_email, ownership, sig, founded, grade, rating, reviews; persona fields title, level, department */ field: "industry" | "sector" | "naics" | "state" | "near" | "employees" | "has_owner" | "has_phone" | "has_email" | "ownership" | "sig" | "founded" | "grade" | "rating" | "reviews" | "title" | "level" | "department"; /** must (a filter), exclude (a Not filter) or nice (adds its weight to the score) */ mode: "must" | "nice" | "exclude"; /** 1 to 10; counts for a nice criterion only */ weight?: number; /** words or codes; one match is enough (sig: every signal must hold). near: one ZIP or City, ST */ values?: string[]; /** employees, founded (a year), rating (0 to 5) or reviews: the lower bound */ min?: number; /** employees or founded: the upper bound */ max?: number; /** near: the radius in miles (default 25) */ miles?: number; })[]; created_by: string; created_at: string; updated_at: string; })[]; limits: { profiles: number; criteria: number; window: number; }; }; export type CreateProfileBody = { name: string; kind: "companies" | "people"; criteria: ({ /** the column: company fields industry, sector, naics, state, near, employees, has_owner, has_phone, has_email, ownership, sig, founded, grade, rating, reviews; persona fields title, level, department */ field: "industry" | "sector" | "naics" | "state" | "near" | "employees" | "has_owner" | "has_phone" | "has_email" | "ownership" | "sig" | "founded" | "grade" | "rating" | "reviews" | "title" | "level" | "department"; /** must (a filter), exclude (a Not filter) or nice (adds its weight to the score) */ mode: "must" | "nice" | "exclude"; /** 1 to 10; counts for a nice criterion only */ weight?: number; /** words or codes; one match is enough (sig: every signal must hold). near: one ZIP or City, ST */ values?: string[]; /** employees, founded (a year), rating (0 to 5) or reviews: the lower bound */ min?: number; /** employees or founded: the upper bound */ max?: number; /** near: the radius in miles (default 25) */ miles?: number; })[]; }; export type CreateProfileResponse = { id: string; name: string; kind: "companies" | "people"; criteria: ({ /** the column: company fields industry, sector, naics, state, near, employees, has_owner, has_phone, has_email, ownership, sig, founded, grade, rating, reviews; persona fields title, level, department */ field: "industry" | "sector" | "naics" | "state" | "near" | "employees" | "has_owner" | "has_phone" | "has_email" | "ownership" | "sig" | "founded" | "grade" | "rating" | "reviews" | "title" | "level" | "department"; /** must (a filter), exclude (a Not filter) or nice (adds its weight to the score) */ mode: "must" | "nice" | "exclude"; /** 1 to 10; counts for a nice criterion only */ weight?: number; /** words or codes; one match is enough (sig: every signal must hold). near: one ZIP or City, ST */ values?: string[]; /** employees, founded (a year), rating (0 to 5) or reviews: the lower bound */ min?: number; /** employees or founded: the upper bound */ max?: number; /** near: the radius in miles (default 25) */ miles?: number; })[]; created_by: string; created_at: string; updated_at: string; }; export type UpdateProfileBody = { name?: string; criteria?: ({ /** the column: company fields industry, sector, naics, state, near, employees, has_owner, has_phone, has_email, ownership, sig, founded, grade, rating, reviews; persona fields title, level, department */ field: "industry" | "sector" | "naics" | "state" | "near" | "employees" | "has_owner" | "has_phone" | "has_email" | "ownership" | "sig" | "founded" | "grade" | "rating" | "reviews" | "title" | "level" | "department"; /** must (a filter), exclude (a Not filter) or nice (adds its weight to the score) */ mode: "must" | "nice" | "exclude"; /** 1 to 10; counts for a nice criterion only */ weight?: number; /** words or codes; one match is enough (sig: every signal must hold). near: one ZIP or City, ST */ values?: string[]; /** employees, founded (a year), rating (0 to 5) or reviews: the lower bound */ min?: number; /** employees or founded: the upper bound */ max?: number; /** near: the radius in miles (default 25) */ miles?: number; })[]; }; export type UpdateProfileResponse = { id: string; name: string; kind: "companies" | "people"; criteria: ({ /** the column: company fields industry, sector, naics, state, near, employees, has_owner, has_phone, has_email, ownership, sig, founded, grade, rating, reviews; persona fields title, level, department */ field: "industry" | "sector" | "naics" | "state" | "near" | "employees" | "has_owner" | "has_phone" | "has_email" | "ownership" | "sig" | "founded" | "grade" | "rating" | "reviews" | "title" | "level" | "department"; /** must (a filter), exclude (a Not filter) or nice (adds its weight to the score) */ mode: "must" | "nice" | "exclude"; /** 1 to 10; counts for a nice criterion only */ weight?: number; /** words or codes; one match is enough (sig: every signal must hold). near: one ZIP or City, ST */ values?: string[]; /** employees, founded (a year), rating (0 to 5) or reviews: the lower bound */ min?: number; /** employees or founded: the upper bound */ max?: number; /** near: the radius in miles (default 25) */ miles?: number; })[]; created_by: string; created_at: string; updated_at: string; }; export type DeleteProfileResponse = { id: string; deleted: boolean; }; export type SearchByProfileQuery = { q?: string | number; state?: string | number; sector?: string | number; industry?: string | number; city?: string | number; zip?: string | number; emp_min?: string | number; emp_max?: string | number; has_phone?: string | number; has_email?: string | number; has_owner?: string | number; has_people?: string | number; registered?: string | number; licensed?: string | number; form5500?: string | number; hide_sunk?: string | number; near?: string | number; miles?: string | number; sig?: string | number; skill?: string | number; service?: string | number; founded_min?: string | number; founded_max?: string | number; naics?: string | number; sic?: string | number; site?: string | number; site_pages?: string | number; ownership?: string | number; revenue?: string | number; metro?: string | number; language?: string | number; has_postings?: string | number; posting_title?: string | number; posted_within?: string | number; changed?: string | number; changed_within?: string | number; bbox?: string | number; funding_min?: string | number; funded_since?: string | number; parent?: string | number; independent?: string | number; succession_min?: string | number; tech?: string | number; model?: string | number; niche?: string | number; has_mobile?: string | number; landline_only?: string | number; has_direct_dial?: string | number; activity?: string | number; activity_min?: string | number; activity_within?: string | number; tag?: string | number; include_domains?: string | number; exclude_domains?: string | number; include_list?: string | number; exclude_list?: string | number; sort?: string | number; offset?: string | number; limit?: string | number; name?: string | number; title?: string | number; company?: string | number; role?: string | number; level?: string | number; department?: string | number; domain?: string | number; edu?: string | number; exp_min?: string | number; score_min?: string | number; order?: string | number; }; export type SearchByProfileResponse = { profile: { id: string; name: string; kind: "companies" | "people"; }; month: string | null; index_total: number; index_capped: boolean; scope: "window"; window: number; scanned: number; dropped: number; score_min: number; order: "score" | "rank"; ignored_filters: string[]; /** the filters that the search ran with */ query: Record; total: number; capped: boolean; offset: number; next_offset: number | null; rows: ({ fit: { /** 0 to 100: the share of the weights of the nice criteria that the row matches */ score: number; /** the must criteria, and the nice criteria that the row matches */ matched: string[]; /** the nice criteria that the row does not match */ missed: string[]; /** the nice criteria for which the row has no value (not a negative) */ unknown: string[]; }; [key: string]: unknown; })[]; note?: string; }; export type ExportCountQuery = { /** The id of a list: export the rows of the list in place of a search. */ list?: string | number; /** `companies` (the default) or `people`. With `people`, the filters are those of GET /v3/leads/people. */ kind?: string | number; /** The row to start from: the X-Leads-Next-Cursor (or `next_cursor`) of the call before. Default 0. */ cursor?: string | number; /** Words in the company name, site text or industry. Several values: a|b. Exact: =value. Not: !value. */ q?: string | number; /** US states as 2-letter codes, separated by commas. `!ID` leaves a state out. */ state?: string | number; /** One sector of the Dealright taxonomy, as GET /v3/leads/facets lists it. */ sector?: string | number; /** Industry name. Several values: a|b. Exact: =value. Not: !value. */ industry?: string | number; /** City name. Several values: a|b. Exact: =value. Not: !value. */ city?: string | number; /** ZIP code. */ zip?: string | number; /** Fewest employees, a whole number. */ emp_min?: string | number; /** Most employees, a whole number. */ emp_max?: string | number; /** Only companies with a phone. Give 1 to turn it on; any other value is ignored. */ has_phone?: string | number; /** Only companies with an email. Give 1 to turn it on; any other value is ignored. */ has_email?: string | number; /** Only companies with a named owner. Give 1 to turn it on; any other value is ignored. */ has_owner?: string | number; /** Only companies with named people. Give 1 to turn it on; any other value is ignored. */ has_people?: string | number; /** Only companies matched to a state business registry record. Give 1 to turn it on; any other value is ignored. */ registered?: string | number; /** Only companies matched to a licence record. Give 1 to turn it on; any other value is ignored. */ licensed?: string | number; /** Only companies with a Form 5500 benefit plan filing. Give 1 to turn it on; any other value is ignored. */ form5500?: string | number; /** Leave out network, toll-free-only, template and chain sites. Give 1 to turn it on; any other value is ignored. */ hide_sunk?: string | number; /** Centre of a radius search: a 5-digit ZIP code or a city as `City, ST`. */ near?: string | number; /** Radius in miles around `near`, 1 to 250. */ miles?: string | number; /** Signals that the company site shows, separated by commas. */ sig?: string | number; /** A service or skill that the company site names. Several values: a|b. Exact: =value. Not: !value. */ skill?: string | number; /** Services, keywords or credentials of the company site, each equal to one whole tag (case does not matter): `wills` does not match `wills and trusts`. Several: a|b (up to 20). Not: !value. */ service?: string | number; /** Earliest founding year, 4 digits. */ founded_min?: string | number; /** Latest founding year, 4 digits. */ founded_max?: string | number; /** NAICS codes of 2 to 6 digits; each is a prefix match (`5413` matches `541310`). Several: a|b. Not: !code. */ naics?: string | number; /** SIC 1987 codes of 2 to 4 digits; each is a prefix match (`87` matches `8711`). Exact: =code (4 digits). Several: a|b. Not: !code. A SIC code is a crosswalk mapping of the company's 6-digit NAICS 2022 code (Census concordances), never a reported code: the search keeps the companies whose NAICS code maps to it. A company with no 6-digit NAICS code has no SIC code. */ sic?: string | number; /** Words and phrases in the text of the company's own site (homepage, key pages and crawl pages). Words in one value are all required; "quotes" make a phrase; several values: a|b; !value leaves out the companies that match it. Each word matches by its stem: plumber matches plumbers. */ site?: string | number; /** The pages that `site` searches: `all` (the default) the homepage, the key pages and up to 20 crawl pages of the site (50,000 characters at most); `home` the homepage only. */ site_pages?: string | number; /** Ownership classes: family, owner_operated, franchise, multi_location, group, parent, employee_owned, nonprofit. Several: a|b. Not: !class. */ ownership?: string | number; /** Estimated revenue bands: lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m, 25m_plus. An estimate from employees and industry averages (Census SUSB 2022), never a reported figure. Several: a|b. Not: !band. */ revenue?: string | number; /** Metro areas (Census Core Based Statistical Areas, OMB July 2023): a 5-digit CBSA code (14260) or a CBSA title (Boise City, ID; case does not matter), from the company's ZIP code. Several: a|b. Not: !value. A company with no ZIP code, or a ZIP code in no CBSA, has no metro area and matches no value; Not keeps it. */ metro?: string | number; /** Website languages as ISO 639-1 codes (en, es, de): the language that the homepage declares (html lang), else the language that its text reads as. Several: a|b. Not: !code. A company whose language is unknown matches no code; Not keeps it. */ language?: string | number; /** 1: only companies with a job posting on the pages of their site that Dealright stored (schema.org JobPosting data, or a careers page of one job). A company with no posting found is unknown, not one that does not hire. */ has_postings?: string | number; /** Words of a job title (2 to 120 characters): only companies with a posting whose title has every word, for example `technician` or `dental assistant`. */ posting_title?: string | number; /** Days, 1 to 365: only companies with a posting dated in the last N days (its datePosted, or the date of the page). A posting with no date never matches. With posting_title, the same posting must match both. */ posted_within?: string | number; /** Business events: only companies with an event of one of these types in the last `changed_within` months. Types: owner_changed, person_added, person_removed, location_added, phone_changed, service_added, ownership_changed, site_alive, job_change (a person who joined the company from another site), site_dead and site_parked (a site that is a company again only matches these after it came back). Several: a|b. History starts at 2026-10: the first events are those of 2026-11. */ changed?: string | number; /** The months of the `changed` filter, 1 to 12, counted back from the month of the index. Default 3. */ changed_within?: string | number; /** Map area: west,south,east,north in decimal degrees. Only companies whose point (site point, else ZIP centroid) is in the area. With bbox, limit may be up to 2000. */ bbox?: string | number; /** SEC Form D: the least total amount sold, in whole US dollars (up to 12 digits). Only companies with a joined Form D filing match. */ funding_min?: string | number; /** SEC Form D: the earliest newest date of first sale, as YYYY-MM-DD, YYYY-MM or YYYY. Only companies with a joined Form D filing match. */ funded_since?: string | number; /** A domain: only the sites of the group whose parent site it is (schema 8). The company page names the parent of a company in `group.parent`. */ parent?: string | number; /** Only companies with a family or owner-operated class and no sign of a group, of several locations, of a franchise or of a parent (schema 8). Give 1 to turn it on; any other value is ignored. */ independent?: string | number; /** The least succession signal, 0 to 100 (schema 8). Refused with a `note` until the signal is turned on: it is a heuristic, not yet measured against real sales. */ succession_min?: string | number; /** Products that the company homepage loads, by name (Shopify, Google Analytics, HubSpot); a bare value is a prefix. Several values: a|b. Exact: =value. Not: !value. */ tech?: string | number; /** Business model: b2b, b2c, both. Several: a|b. Not: !model. */ model?: string | number; /** Niche of the industry label, for example Criminal defense. Several values: a|b. Exact: =value. Not: !value. */ niche?: string | number; /** Only rows with a business phone whose number block is wireless (an estimate: a ported number keeps its block). For people, a phone of the company. Give 1 to turn it on; any other value is ignored. */ has_mobile?: string | number; /** Only rows whose every business phone is in a landline block (an unknown phone fails it). For people, the phones of the company. Give 1 to turn it on; any other value is ignored. */ landline_only?: string | number; /** Only rows with a person-level number that is not the main company number. The index has no person-level numbers yet, so it answers no rows and a note. Give 1 to turn it on; any other value is ignored. */ has_direct_dial?: string | number; /** Activity signal kinds: hiring, funding, new_location, site_change, news. Several: a|b (a company with a signal of one of them in the window). Signals of the company's own site and of public records, not third-party intent data. */ activity?: string | number; /** The least Activity signals score, 1 to 100: hiring 25, funding (SEC Form D) 30, new location 20, other site change 15, news 10; each kind counts one time. */ activity_min?: string | number; /** The window of the activity filters and of each row's `activity_signals`, in days back from today: 1 to 365. Default 90. */ activity_within?: string | number; /** Tags of the organization, by name (any case) or id. Several: a|b (a row with one of them). Exact name: =Name. Not: !name. With only tags to include and no other filter, the answer is the tagged rows, in key order. With other filters, the tags filter the rows of each page of the search, so a page can have fewer rows than `limit`, and `note` says so. */ tag?: string | number; /** A list of domains: only these companies. Each entry is a domain, a URL or an email address; commas, spaces, semicolons or line ends separate entries, and an entry that is not a domain is left out. The two lists hold 500 domains at most together. A list with no domain is refused. The other filters apply too. */ include_domains?: string | number; /** A list of domains to leave out, written as `include_domains` (for example the companies that you already work with). */ exclude_domains?: string | number; /** The `id` of a saved list (GET /v3/leads/lists): only the companies of that list, read by the API (no cap of 500). The companies of a list are its companies and the companies of its people. A list that you do not see answers 404; a list with no company answers no rows and a `note`. */ include_list?: string | number; /** The `id` of a saved list: leave out the companies of that list (for example the companies that you already work with). */ exclude_list?: string | number; /** `name` or `employees`. Any other value, or none, is the default rank. */ sort?: string | number; /** Name of the person. Several values: a|b. Exact: =value. Not: !value. */ name?: string | number; /** Job title. Several values: a|b. Exact: =value. Not: !value. */ title?: string | number; /** Company name. Several values: a|b. Exact: =value. Not: !value. */ company?: string | number; /** Role groups of the people: technical (IT, technical staff, systems and network administrators, developers, data people, IT managers, the CTO, the CIO, the VP or head of technology) or executive (the C-suite: a chief officer, the president, the founder, the owner), or the two (technical,executive). From the title words and the department; one tested rule set. A person with no title in a group is left out: unknown, not a negative. Each person row has role_groups. */ role?: string | number; /** Seniority levels, separated by commas. */ level?: string | number; /** Departments, separated by commas. */ department?: string | number; /** Only the people of the company with this domain. */ domain?: string | number; /** Schools or degrees that the company site names, separated by commas. */ edu?: string | number; /** Years, 1 to 60: only people whose bio on the company site states at least this many years of experience ("15 years of experience", "practicing since 2001"). A person whose site states none is unknown and never matches (schema 15). */ exp_min?: string | number; }; export type ExportCountResponse = { kind: "companies" | "people"; rows: number; unlocked: number; locked_with_contact: number; no_contact: number; unlock_cents: number | null; unlock_refused: "free" | "cap" | null; month_leads: number; stopped_early: boolean; next_cursor: number | null; }; export type ExportCountSelectionBody = { /** The companies: a domain, a URL or an email address of each. Give `domains` or `people`. */ domains?: string[]; /** The people: the company domain and the name of each, as in a person row of the search or of a list. Give `domains` or `people`. */ people?: ({ domain: string; name: string; })[]; cursor?: number; }; export type ExportCountSelectionResponse = { kind: "companies" | "people"; rows: number; unlocked: number; locked_with_contact: number; no_contact: number; unlock_cents: number | null; unlock_refused: "free" | "cap" | null; month_leads: number; stopped_early: boolean; next_cursor: number | null; }; export type ExportCsvQuery = { /** The id of a list: export the rows of the list in place of a search. */ list?: string | number; /** `companies` (the default) or `people`. With `people`, the filters are those of GET /v3/leads/people. */ kind?: string | number; /** `true` first opens each company of this call that has a contact value, at the unlock price. Companies only. */ unlock?: string | number; /** The row to start from: the X-Leads-Next-Cursor (or `next_cursor`) of the call before. Default 0. */ cursor?: string | number; /** Words in the company name, site text or industry. Several values: a|b. Exact: =value. Not: !value. */ q?: string | number; /** US states as 2-letter codes, separated by commas. `!ID` leaves a state out. */ state?: string | number; /** One sector of the Dealright taxonomy, as GET /v3/leads/facets lists it. */ sector?: string | number; /** Industry name. Several values: a|b. Exact: =value. Not: !value. */ industry?: string | number; /** City name. Several values: a|b. Exact: =value. Not: !value. */ city?: string | number; /** ZIP code. */ zip?: string | number; /** Fewest employees, a whole number. */ emp_min?: string | number; /** Most employees, a whole number. */ emp_max?: string | number; /** Only companies with a phone. Give 1 to turn it on; any other value is ignored. */ has_phone?: string | number; /** Only companies with an email. Give 1 to turn it on; any other value is ignored. */ has_email?: string | number; /** Only companies with a named owner. Give 1 to turn it on; any other value is ignored. */ has_owner?: string | number; /** Only companies with named people. Give 1 to turn it on; any other value is ignored. */ has_people?: string | number; /** Only companies matched to a state business registry record. Give 1 to turn it on; any other value is ignored. */ registered?: string | number; /** Only companies matched to a licence record. Give 1 to turn it on; any other value is ignored. */ licensed?: string | number; /** Only companies with a Form 5500 benefit plan filing. Give 1 to turn it on; any other value is ignored. */ form5500?: string | number; /** Leave out network, toll-free-only, template and chain sites. Give 1 to turn it on; any other value is ignored. */ hide_sunk?: string | number; /** Centre of a radius search: a 5-digit ZIP code or a city as `City, ST`. */ near?: string | number; /** Radius in miles around `near`, 1 to 250. */ miles?: string | number; /** Signals that the company site shows, separated by commas. */ sig?: string | number; /** A service or skill that the company site names. Several values: a|b. Exact: =value. Not: !value. */ skill?: string | number; /** Services, keywords or credentials of the company site, each equal to one whole tag (case does not matter): `wills` does not match `wills and trusts`. Several: a|b (up to 20). Not: !value. */ service?: string | number; /** Earliest founding year, 4 digits. */ founded_min?: string | number; /** Latest founding year, 4 digits. */ founded_max?: string | number; /** NAICS codes of 2 to 6 digits; each is a prefix match (`5413` matches `541310`). Several: a|b. Not: !code. */ naics?: string | number; /** SIC 1987 codes of 2 to 4 digits; each is a prefix match (`87` matches `8711`). Exact: =code (4 digits). Several: a|b. Not: !code. A SIC code is a crosswalk mapping of the company's 6-digit NAICS 2022 code (Census concordances), never a reported code: the search keeps the companies whose NAICS code maps to it. A company with no 6-digit NAICS code has no SIC code. */ sic?: string | number; /** Words and phrases in the text of the company's own site (homepage, key pages and crawl pages). Words in one value are all required; "quotes" make a phrase; several values: a|b; !value leaves out the companies that match it. Each word matches by its stem: plumber matches plumbers. */ site?: string | number; /** The pages that `site` searches: `all` (the default) the homepage, the key pages and up to 20 crawl pages of the site (50,000 characters at most); `home` the homepage only. */ site_pages?: string | number; /** Ownership classes: family, owner_operated, franchise, multi_location, group, parent, employee_owned, nonprofit. Several: a|b. Not: !class. */ ownership?: string | number; /** Estimated revenue bands: lt500k, 500k_1m, 1m_2.5m, 2.5m_5m, 5m_10m, 10m_25m, 25m_plus. An estimate from employees and industry averages (Census SUSB 2022), never a reported figure. Several: a|b. Not: !band. */ revenue?: string | number; /** Metro areas (Census Core Based Statistical Areas, OMB July 2023): a 5-digit CBSA code (14260) or a CBSA title (Boise City, ID; case does not matter), from the company's ZIP code. Several: a|b. Not: !value. A company with no ZIP code, or a ZIP code in no CBSA, has no metro area and matches no value; Not keeps it. */ metro?: string | number; /** Website languages as ISO 639-1 codes (en, es, de): the language that the homepage declares (html lang), else the language that its text reads as. Several: a|b. Not: !code. A company whose language is unknown matches no code; Not keeps it. */ language?: string | number; /** 1: only companies with a job posting on the pages of their site that Dealright stored (schema.org JobPosting data, or a careers page of one job). A company with no posting found is unknown, not one that does not hire. */ has_postings?: string | number; /** Words of a job title (2 to 120 characters): only companies with a posting whose title has every word, for example `technician` or `dental assistant`. */ posting_title?: string | number; /** Days, 1 to 365: only companies with a posting dated in the last N days (its datePosted, or the date of the page). A posting with no date never matches. With posting_title, the same posting must match both. */ posted_within?: string | number; /** Business events: only companies with an event of one of these types in the last `changed_within` months. Types: owner_changed, person_added, person_removed, location_added, phone_changed, service_added, ownership_changed, site_alive, job_change (a person who joined the company from another site), site_dead and site_parked (a site that is a company again only matches these after it came back). Several: a|b. History starts at 2026-10: the first events are those of 2026-11. */ changed?: string | number; /** The months of the `changed` filter, 1 to 12, counted back from the month of the index. Default 3. */ changed_within?: string | number; /** Map area: west,south,east,north in decimal degrees. Only companies whose point (site point, else ZIP centroid) is in the area. With bbox, limit may be up to 2000. */ bbox?: string | number; /** SEC Form D: the least total amount sold, in whole US dollars (up to 12 digits). Only companies with a joined Form D filing match. */ funding_min?: string | number; /** SEC Form D: the earliest newest date of first sale, as YYYY-MM-DD, YYYY-MM or YYYY. Only companies with a joined Form D filing match. */ funded_since?: string | number; /** A domain: only the sites of the group whose parent site it is (schema 8). The company page names the parent of a company in `group.parent`. */ parent?: string | number; /** Only companies with a family or owner-operated class and no sign of a group, of several locations, of a franchise or of a parent (schema 8). Give 1 to turn it on; any other value is ignored. */ independent?: string | number; /** The least succession signal, 0 to 100 (schema 8). Refused with a `note` until the signal is turned on: it is a heuristic, not yet measured against real sales. */ succession_min?: string | number; /** Products that the company homepage loads, by name (Shopify, Google Analytics, HubSpot); a bare value is a prefix. Several values: a|b. Exact: =value. Not: !value. */ tech?: string | number; /** Business model: b2b, b2c, both. Several: a|b. Not: !model. */ model?: string | number; /** Niche of the industry label, for example Criminal defense. Several values: a|b. Exact: =value. Not: !value. */ niche?: string | number; /** Only rows with a business phone whose number block is wireless (an estimate: a ported number keeps its block). For people, a phone of the company. Give 1 to turn it on; any other value is ignored. */ has_mobile?: string | number; /** Only rows whose every business phone is in a landline block (an unknown phone fails it). For people, the phones of the company. Give 1 to turn it on; any other value is ignored. */ landline_only?: string | number; /** Only rows with a person-level number that is not the main company number. The index has no person-level numbers yet, so it answers no rows and a note. Give 1 to turn it on; any other value is ignored. */ has_direct_dial?: string | number; /** Activity signal kinds: hiring, funding, new_location, site_change, news. Several: a|b (a company with a signal of one of them in the window). Signals of the company's own site and of public records, not third-party intent data. */ activity?: string | number; /** The least Activity signals score, 1 to 100: hiring 25, funding (SEC Form D) 30, new location 20, other site change 15, news 10; each kind counts one time. */ activity_min?: string | number; /** The window of the activity filters and of each row's `activity_signals`, in days back from today: 1 to 365. Default 90. */ activity_within?: string | number; /** Tags of the organization, by name (any case) or id. Several: a|b (a row with one of them). Exact name: =Name. Not: !name. With only tags to include and no other filter, the answer is the tagged rows, in key order. With other filters, the tags filter the rows of each page of the search, so a page can have fewer rows than `limit`, and `note` says so. */ tag?: string | number; /** A list of domains: only these companies. Each entry is a domain, a URL or an email address; commas, spaces, semicolons or line ends separate entries, and an entry that is not a domain is left out. The two lists hold 500 domains at most together. A list with no domain is refused. The other filters apply too. */ include_domains?: string | number; /** A list of domains to leave out, written as `include_domains` (for example the companies that you already work with). */ exclude_domains?: string | number; /** The `id` of a saved list (GET /v3/leads/lists): only the companies of that list, read by the API (no cap of 500). The companies of a list are its companies and the companies of its people. A list that you do not see answers 404; a list with no company answers no rows and a `note`. */ include_list?: string | number; /** The `id` of a saved list: leave out the companies of that list (for example the companies that you already work with). */ exclude_list?: string | number; /** `name` or `employees`. Any other value, or none, is the default rank. */ sort?: string | number; /** Name of the person. Several values: a|b. Exact: =value. Not: !value. */ name?: string | number; /** Job title. Several values: a|b. Exact: =value. Not: !value. */ title?: string | number; /** Company name. Several values: a|b. Exact: =value. Not: !value. */ company?: string | number; /** Role groups of the people: technical (IT, technical staff, systems and network administrators, developers, data people, IT managers, the CTO, the CIO, the VP or head of technology) or executive (the C-suite: a chief officer, the president, the founder, the owner), or the two (technical,executive). From the title words and the department; one tested rule set. A person with no title in a group is left out: unknown, not a negative. Each person row has role_groups. */ role?: string | number; /** Seniority levels, separated by commas. */ level?: string | number; /** Departments, separated by commas. */ department?: string | number; /** Only the people of the company with this domain. */ domain?: string | number; /** Schools or degrees that the company site names, separated by commas. */ edu?: string | number; /** Years, 1 to 60: only people whose bio on the company site states at least this many years of experience ("15 years of experience", "practicing since 2001"). A person whose site states none is unknown and never matches (schema 15). */ exp_min?: string | number; /** The CSV layout: the Dealright columns (the default) or the import columns of a CRM. */ format?: string | number; }; export type ExportCsvSelectionBody = { /** The companies: a domain, a URL or an email address of each. Give `domains` or `people`. */ domains?: string[]; /** The people: the company domain and the name of each, as in a person row of the search or of a list. Give `domains` or `people`. */ people?: ({ domain: string; name: string; })[]; cursor?: number; unlock?: boolean; format?: "default" | "hubspot" | "salesforce" | "pipedrive" | "zoho"; }; export type BillingResponse = { plan: "free" | "starter" | "growth" | "scale" | "api"; has_subscription: boolean; /** the plan that the org changes to at pending_plan_at; null when no change waits */ pending_plan: "free" | "starter" | "growth" | "scale" | "api" | null; /** when the change is made (ISO 8601): the end of the period that is paid */ pending_plan_at: string | null; can_change: boolean; checkout_plans: ("starter" | "growth" | "scale" | "api")[]; month: { month: string; leads: number; cents: number; }; }; export type UsageQuery = { month?: string | number; }; export type UsageResponse = { month: string; /** the leads opened in the month */ leads: number; /** the cents charged for the opened leads (not the reveals) */ cents: number; opened: ({ lead: string; at: string; cents: number; via: "app" | "api" | "mcp"; })[]; /** the reveals of the month, charged or free */ reveals: number; /** the cents charged for the reveals */ reveal_cents: number; /** cents + reveal_cents: all the cents charged in the month */ total_cents: number; revealed: ({ /** the company domain of the lead; `(removed)` when the purge removed the lead */ company: string; /** the person of the lead key (lower case), or null */ person: string | null; /** what was revealed, for example `work_email` */ kind: string; /** `verified` (charged), `not_found` or `error` (free) */ status: string; /** an email check (kind `email_verify`) only: `deliverable`, `undeliverable`, `catch_all` or `unknown`. A check that is not `deliverable` has the status `not_found` and is free */ check?: string; cents: number; at: string; /** `api`: an API key; `member`: a signed-in member (the app or the MCP tools) */ via: "api" | "member"; })[]; }; export type UsageCsvQuery = { month?: string | number; }; export type SettingsResponse = { /** toll-free phones (800, 833, 844, 855, 866, 877, 888) are not shown, exported or charged */ hide_toll_free: boolean; /** phones whose area code is in another state than the company are not shown, exported or charged */ hide_area_mismatch: boolean; /** the email of a reveal result older than this many days is deleted; null keeps it */ reveal_retention_days: 30 | 90 | 180 | 365 | Record | null; /** the most leads the whole organization opens in one calendar month (UTC), under the plan; null: no limit */ month_limit: number | null; updated_by: string | null; updated_at: string | null; /** always true: a company row and an export hold only the contacts of the business */ business_contacts_only: true; /** what the leads product never gives, in words */ never_included: string[]; }; export class DealrightLeads { private readonly apiKey: string; private readonly baseUrl: string; private readonly doFetch: typeof fetch; constructor(o: DealrightLeadsOptions) { if (!o.apiKey) throw new Error("DealrightLeads: apiKey is missing"); this.apiKey = o.apiKey; this.baseUrl = (o.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, ""); this.doFetch = o.fetch ?? fetch; } private async call(method: string, path: string, o: CallOptions = {}): Promise { const q = new URLSearchParams(); for (const [k, v] of Object.entries(o.query ?? {})) if (v !== undefined && v !== "") q.set(k, String(v)); const qs = q.toString(); const url = `${this.baseUrl}${path}${qs ? `?${qs}` : ""}`; const headers: Record = { Authorization: `Bearer ${this.apiKey}`, Accept: o.csv ? "text/csv" : "application/json", "User-Agent": USER_AGENT }; if (o.body !== undefined) headers["Content-Type"] = "application/json"; const res = await this.doFetch(url, { method, headers, body: o.body === undefined ? undefined : JSON.stringify(o.body) }); if (!res.ok) { const text = await res.text(); let body: DealrightLeadsError["body"] = null; try { body = JSON.parse(text); } catch { body = { error: text.slice(0, 300) }; } const retry = Number(res.headers.get("retry-after")); throw new DealrightLeadsError(res.status, body, Number.isFinite(retry) && retry > 0 ? retry : null); } if (o.csv) return { text: await res.text(), headers: Object.fromEntries(res.headers.entries()) }; return res.json(); } /** Search companies (contact values masked until unlocked). GET /v3/leads/companies. Permission: search. */ searchCompanies(query?: SearchCompaniesQuery): Promise { return this.call("GET", `/v3/leads/companies`, { query }) as Promise; } /** Search people named on a company site or licence. GET /v3/leads/people. Permission: search. */ searchPeople(query?: SearchPeopleQuery): Promise { return this.call("GET", `/v3/leads/people`, { query }) as Promise; } /** People like one person: same title and level at similar companies. GET /v3/leads/people/similar. Permission: search. */ similarPeople(query: SimilarPeopleQuery): Promise { return this.call("GET", `/v3/leads/people/similar`, { query }) as Promise; } /** The values of the search filters, with counts. GET /v3/leads/facets. Permission: search. */ facets(): Promise { return this.call("GET", `/v3/leads/facets`) as Promise; } /** Location typeahead: states, cities and ZIP codes with counts. GET /v3/leads/places. Permission: search. */ places(query?: PlacesQuery): Promise { return this.call("GET", `/v3/leads/places`, { query }) as Promise; } /** One company page (contact values masked until unlocked). GET /v3/leads/companies/{domain}. Permission: search. */ getCompany(domain: string, query?: GetCompanyQuery): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}`, { query }) as Promise; } /** Companies like one company, ranked (contact values masked). GET /v3/leads/companies/{domain}/similar. Permission: search. */ similarCompanies(domain: string, query?: SimilarCompaniesQuery): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/similar`, { query }) as Promise; } /** The judge verdicts of one company page. GET /v3/leads/companies/{domain}/judge. Permission: search. */ companyJudge(domain: string): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/judge`) as Promise; } /** Start the judge on one company page. POST /v3/leads/companies/{domain}/judge. Permission: search. */ startCompanyJudge(domain: string): Promise { return this.call("POST", `/v3/leads/companies/${encodeURIComponent(domain)}/judge`) as Promise; } /** News articles about one company, from GDELT. GET /v3/leads/companies/{domain}/news. Permission: search. */ companyNews(domain: string): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/news`) as Promise; } /** Companies like several seed companies or a list, ranked (contact values masked). GET /v3/leads/similar. Permission: search. */ similarToSeeds(query?: SimilarToSeedsQuery): Promise { return this.call("GET", `/v3/leads/similar`, { query }) as Promise; } /** The size and the structure of one market (free). GET /v3/leads/market. Permission: search. */ market(query?: MarketQuery): Promise { return this.call("GET", `/v3/leads/market`, { query }) as Promise; } /** What changed on one company's site, month over month. GET /v3/leads/companies/{domain}/events. Permission: search. */ companyEvents(domain: string, query?: CompanyEventsQuery): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/events`, { query }) as Promise; } /** Bulk lookup of domains, URLs, emails or company names (masked). POST /v3/leads/bulk. Permission: search. */ bulkLookup(body: BulkLookupBody): Promise { return this.call("POST", `/v3/leads/bulk`, { body }) as Promise; } /** Bulk lookup of people by name and company (masked). POST /v3/leads/bulk/people. Permission: search. */ bulkLookupPeople(body: BulkLookupPeopleBody): Promise { return this.call("POST", `/v3/leads/bulk/people`, { body }) as Promise; } /** Turn a sentence into search filters (natural-language search). POST /v3/leads/ask. Permission: search. */ ask(body: AskBody): Promise { return this.call("POST", `/v3/leads/ask`, { body }) as Promise; } /** Search investment adviser firms (the SEC register): private equity, venture and other private funds. GET /v3/leads/investors. Permission: search. */ searchInvestors(query?: SearchInvestorsQuery): Promise { return this.call("GET", `/v3/leads/investors`, { query }) as Promise; } /** The values of the investor filters, with counts. GET /v3/leads/investors/facets. Permission: search. */ investorFacets(): Promise { return this.call("GET", `/v3/leads/investors/facets`) as Promise; } /** Acquisitions financed by SBA 7(a) loans in the industry and state of one company (SBA 7(a) FOIA). GET /v3/leads/companies/{domain}/sba-acquisitions. Permission: search. */ sbaAcquisitions(domain: string): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/sba-acquisitions`) as Promise; } /** The direct 1-hop holder chain of one company. GET /v3/leads/companies/{domain}/holders. Permission: search. */ companyHolders(domain: string, query?: CompanyHoldersQuery): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/holders`, { query }) as Promise; } /** The reveal history of one company in your organization. GET /v3/leads/companies/{domain}/reveals. Permission: search. */ companyReveals(domain: string): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/reveals`) as Promise; } /** Unlock companies: their emails and phones, charged once each. POST /v3/leads/unlock. Permission: unlock. */ unlock(body: UnlockBody): Promise { return this.call("POST", `/v3/leads/unlock`, { body }) as Promise; } /** The plan and the leads and cost of this month. GET /v3/leads/account. Permission: account. */ account(): Promise { return this.call("GET", `/v3/leads/account`) as Promise; } /** Reveal the work email of one person at an unlocked company. POST /v3/leads/reveal. Permission: reveal. */ reveal(body: RevealBody): Promise { return this.call("POST", `/v3/leads/reveal`, { body }) as Promise; } /** Reveal the exact line type of one business phone of an unlocked company. POST /v3/leads/reveal/line-type. Permission: reveal. */ revealLineType(body: RevealLineTypeBody): Promise { return this.call("POST", `/v3/leads/reveal/line-type`, { body }) as Promise; } /** Verify work email addresses (SMTP check, no message sent). POST /v3/leads/verify. Permission: reveal. */ verifyEmails(body: VerifyEmailsBody): Promise { return this.call("POST", `/v3/leads/verify`, { body }) as Promise; } /** Reveal the work email and phone of one person, each value with its proof. POST /v3/leads/reveal/person. Permission: reveal. */ revealPerson(body: RevealPersonBody): Promise { return this.call("POST", `/v3/leads/reveal/person`, { body }) as Promise; } /** Reveal the contacts of up to 25 people; dry_run gives the cost first. POST /v3/leads/reveal/people. Permission: reveal. */ revealPeople(body: RevealPeopleBody): Promise { return this.call("POST", `/v3/leads/reveal/people`, { body }) as Promise; } /** The Dossier of one company: preview, progress and result. GET /v3/leads/companies/{domain}/dossier. Permission: search. */ dossier(domain: string, query?: DossierQuery): Promise { return this.call("GET", `/v3/leads/companies/${encodeURIComponent(domain)}/dossier`, { query }) as Promise; } /** Order a Business or Bank-Grade Institutional Dossier. POST /v3/leads/companies/{domain}/dossier. Permission: reveal. */ buyDossier(domain: string, body?: BuyDossierBody): Promise { return this.call("POST", `/v3/leads/companies/${encodeURIComponent(domain)}/dossier`, { body }) as Promise; } /** Preview, status, or completed Diligence Report for one company. GET /v3/intel/reports/{domain}. Permission: search. */ intelReport(domain: string, query?: IntelReportQuery): Promise { return this.call("GET", `/v3/intel/reports/${encodeURIComponent(domain)}`, { query }) as Promise; } /** Order and generate a Business or Institutional Diligence Report. POST /v3/intel/reports/{domain}. Permission: reveal. */ orderIntelReport(domain: string, body?: OrderIntelReportBody): Promise { return this.call("POST", `/v3/intel/reports/${encodeURIComponent(domain)}`, { body }) as Promise; } /** Universal Knowledge Graph view for a company (1-hop free; multi-hop unlocked by report). GET /v3/intel/graph/{domain}. Permission: search. */ intelGraph(domain: string): Promise { return this.call("GET", `/v3/intel/graph/${encodeURIComponent(domain)}`) as Promise; } /** Lookup any entity node and its provenance-backed edges in Arnor v4 KG. GET /v3/intel/kg/node/{id}. Permission: search. */ intelKgNode(id: string, query?: IntelKgNodeQuery): Promise { return this.call("GET", `/v3/intel/kg/node/${encodeURIComponent(id)}`, { query }) as Promise; } /** Competitive Dominance & Asymmetric Delta analysis in Arnor v4 KG. GET /v3/intel/kg/dominance/{id}. Permission: search. */ intelKgDominance(id: string, query?: IntelKgDominanceQuery): Promise { return this.call("GET", `/v3/intel/kg/dominance/${encodeURIComponent(id)}`, { query }) as Promise; } /** Multi-Tier Supply Chain, SPOF, HHI & Contagion Risk trace in Arnor v4 KG. GET /v3/intel/kg/supply-chain/{id}. Permission: search. */ intelKgSupplyChain(id: string, query?: IntelKgSupplyChainQuery): Promise { return this.call("GET", `/v3/intel/kg/supply-chain/${encodeURIComponent(id)}`, { query }) as Promise; } /** Coalition Power Index vs state USD benchmark in Arnor v4 KG. GET /v3/intel/kg/power. Permission: search. */ intelKgPower(query: IntelKgPowerQuery): Promise { return this.call("GET", `/v3/intel/kg/power`, { query }) as Promise; } /** Legislative Lineage & Bill Attribution in Arnor v4 KG. GET /v3/intel/kg/bill/{id}. Permission: search. */ intelKgBill(id: string, query?: IntelKgBillQuery): Promise { return this.call("GET", `/v3/intel/kg/bill/${encodeURIComponent(id)}`, { query }) as Promise; } /** The lists of the organization. GET /v3/leads/lists. Permission: search. */ listLists(): Promise { return this.call("GET", `/v3/leads/lists`) as Promise; } /** Make a list. POST /v3/leads/lists. Permission: lists. */ createList(body: CreateListBody): Promise { return this.call("POST", `/v3/leads/lists`, { body }) as Promise; } /** One page of the companies or the people of a list (masked). GET /v3/leads/lists/{id}. Permission: search. */ getList(id: string, query?: GetListQuery): Promise { return this.call("GET", `/v3/leads/lists/${encodeURIComponent(id)}`, { query }) as Promise; } /** Rename a list; make it shared or private. PATCH /v3/leads/lists/{id}. Permission: lists. */ updateList(id: string, body?: UpdateListBody): Promise { return this.call("PATCH", `/v3/leads/lists/${encodeURIComponent(id)}`, { body }) as Promise; } /** Delete a list and its rows. DELETE /v3/leads/lists/{id}. Permission: lists. */ deleteList(id: string): Promise { return this.call("DELETE", `/v3/leads/lists/${encodeURIComponent(id)}`) as Promise; } /** One page of the investor firms of a list. GET /v3/leads/lists/{id}/investors. Permission: search. */ getListInvestors(id: string, query?: GetListInvestorsQuery): Promise { return this.call("GET", `/v3/leads/lists/${encodeURIComponent(id)}/investors`, { query }) as Promise; } /** Add companies, people and investor firms to a list. POST /v3/leads/lists/{id}/rows. Permission: lists. */ addToList(id: string, body?: AddToListBody): Promise { return this.call("POST", `/v3/leads/lists/${encodeURIComponent(id)}/rows`, { body }) as Promise; } /** Remove companies, people and investor firms from a list. POST /v3/leads/lists/{id}/rows/remove. Permission: lists. */ removeFromList(id: string, body?: RemoveFromListBody): Promise { return this.call("POST", `/v3/leads/lists/${encodeURIComponent(id)}/rows/remove`, { body }) as Promise; } /** The keys of every list that the caller sees, in one read. GET /v3/leads/list-keys. Permission: search. */ listKeys(query?: ListKeysQuery): Promise { return this.call("GET", `/v3/leads/list-keys`, { query }) as Promise; } /** The tags of the organization. GET /v3/leads/tags. Permission: search. */ listTags(): Promise { return this.call("GET", `/v3/leads/tags`) as Promise; } /** Make a tag. POST /v3/leads/tags. Permission: lists. */ createTag(body: CreateTagBody): Promise { return this.call("POST", `/v3/leads/tags`, { body }) as Promise; } /** Rename a tag or change its color. PATCH /v3/leads/tags/{id}. Permission: lists. */ updateTag(id: string, body?: UpdateTagBody): Promise { return this.call("PATCH", `/v3/leads/tags/${encodeURIComponent(id)}`, { body }) as Promise; } /** Delete a tag. DELETE /v3/leads/tags/{id}. Permission: lists. */ deleteTag(id: string): Promise { return this.call("DELETE", `/v3/leads/tags/${encodeURIComponent(id)}`) as Promise; } /** Put a tag on companies and people. POST /v3/leads/tags/{id}/rows. Permission: lists. */ tagRows(id: string, body?: TagRowsBody): Promise { return this.call("POST", `/v3/leads/tags/${encodeURIComponent(id)}/rows`, { body }) as Promise; } /** Take a tag off companies and people. POST /v3/leads/tags/{id}/rows/remove. Permission: lists. */ untagRows(id: string, body?: UntagRowsBody): Promise { return this.call("POST", `/v3/leads/tags/${encodeURIComponent(id)}/rows/remove`, { body }) as Promise; } /** The notes on a company or a person. GET /v3/leads/notes. Permission: search. */ listNotes(query: ListNotesQuery): Promise { return this.call("GET", `/v3/leads/notes`, { query }) as Promise; } /** Write a note on a company or a person. POST /v3/leads/notes. Permission: lists. */ createNote(body: CreateNoteBody): Promise { return this.call("POST", `/v3/leads/notes`, { body }) as Promise; } /** Change the text of a note. PATCH /v3/leads/notes/{id}. Permission: lists. */ updateNote(id: string, body: UpdateNoteBody): Promise { return this.call("PATCH", `/v3/leads/notes/${encodeURIComponent(id)}`, { body }) as Promise; } /** Delete a note. DELETE /v3/leads/notes/{id}. Permission: lists. */ deleteNote(id: string): Promise { return this.call("DELETE", `/v3/leads/notes/${encodeURIComponent(id)}`) as Promise; } /** The saved searches of the organization. GET /v3/leads/searches. Permission: search. */ listSearches(): Promise { return this.call("GET", `/v3/leads/searches`) as Promise; } /** Save a search. POST /v3/leads/searches. Permission: lists. */ saveSearch(body: SaveSearchBody): Promise { return this.call("POST", `/v3/leads/searches`, { body }) as Promise; } /** Set the alert of a saved search: off, daily or weekly. PATCH /v3/leads/searches/{id}. Permission: lists. */ setSearchAlert(id: string, body: SetSearchAlertBody): Promise { return this.call("PATCH", `/v3/leads/searches/${encodeURIComponent(id)}`, { body }) as Promise; } /** Delete a saved search. DELETE /v3/leads/searches/{id}. Permission: lists. */ deleteSearch(id: string): Promise { return this.call("DELETE", `/v3/leads/searches/${encodeURIComponent(id)}`) as Promise; } /** The new rows that the alert of a saved search found (masked). GET /v3/leads/searches/{id}/new. Permission: search. */ newSearchResults(id: string, query?: NewSearchResultsQuery): Promise { return this.call("GET", `/v3/leads/searches/${encodeURIComponent(id)}/new`, { query }) as Promise; } /** Mark the new rows of the alert of a saved search as seen. POST /v3/leads/searches/{id}/seen. Permission: lists. */ markSearchSeen(id: string): Promise { return this.call("POST", `/v3/leads/searches/${encodeURIComponent(id)}/seen`) as Promise; } /** Run a saved search: one page, and the count of new results. POST /v3/leads/searches/{id}/run. Permission: search. */ runSearch(id: string, query?: RunSearchQuery): Promise { return this.call("POST", `/v3/leads/searches/${encodeURIComponent(id)}/run`, { query }) as Promise; } /** Turn the automation of a saved search off. DELETE /v3/leads/searches/{id}/automation. Permission: lists. */ deleteAutomation(id: string): Promise { return this.call("DELETE", `/v3/leads/searches/${encodeURIComponent(id)}/automation`) as Promise; } /** What the unlocks of an automation run cost now. GET /v3/leads/searches/{id}/automation/cost. Permission: search. */ automationCost(id: string, query: AutomationCostQuery): Promise { return this.call("GET", `/v3/leads/searches/${encodeURIComponent(id)}/automation/cost`, { query }) as Promise; } /** The fit profiles and personas of the organization. GET /v3/leads/profiles. Permission: search. */ listProfiles(): Promise { return this.call("GET", `/v3/leads/profiles`) as Promise; } /** Make a fit profile or a persona. POST /v3/leads/profiles. Permission: lists. */ createProfile(body: CreateProfileBody): Promise { return this.call("POST", `/v3/leads/profiles`, { body }) as Promise; } /** Change the name or the criteria of a profile. PATCH /v3/leads/profiles/{id}. Permission: lists. */ updateProfile(id: string, body?: UpdateProfileBody): Promise { return this.call("PATCH", `/v3/leads/profiles/${encodeURIComponent(id)}`, { body }) as Promise; } /** Delete a fit profile or a persona. DELETE /v3/leads/profiles/{id}. Permission: lists. */ deleteProfile(id: string): Promise { return this.call("DELETE", `/v3/leads/profiles/${encodeURIComponent(id)}`) as Promise; } /** A search scored by a fit profile or a persona (masked rows). GET /v3/leads/profiles/{id}/search. Permission: search. */ searchByProfile(id: string, query?: SearchByProfileQuery): Promise { return this.call("GET", `/v3/leads/profiles/${encodeURIComponent(id)}/search`, { query }) as Promise; } /** Dry run of a CSV export: the row counts and the unlock cost. GET /v3/leads/export/count. Permission: search. */ exportCount(query?: ExportCountQuery): Promise { return this.call("GET", `/v3/leads/export/count`, { query }) as Promise; } /** Dry run of a CSV export of a selection of companies or people. POST /v3/leads/export/count. Permission: search. */ exportCountSelection(body?: ExportCountSelectionBody): Promise { return this.call("POST", `/v3/leads/export/count`, { body }) as Promise; } /** CSV export of a search or a list; unlock=true opens the rows first. GET /v3/leads/export.csv. Permission: search; unlock when unlock is on. */ exportCsv(query?: ExportCsvQuery): Promise { return this.call("GET", `/v3/leads/export.csv`, { query, csv: true }) as Promise; } /** CSV export of a selection of companies or people; unlock opens companies first. POST /v3/leads/export.csv. Permission: search; unlock when unlock is on. */ exportCsvSelection(body?: ExportCsvSelectionBody): Promise { return this.call("POST", `/v3/leads/export.csv`, { body, csv: true }) as Promise; } /** The last export file of the automation of a saved search. GET /v3/leads/searches/{id}/automation/export.csv. Permission: search. */ automationFile(id: string): Promise { return this.call("GET", `/v3/leads/searches/${encodeURIComponent(id)}/automation/export.csv`, { csv: true }) as Promise; } /** The plan, the subscription state and the use of this month. GET /v3/leads/billing. Permission: account. */ billing(): Promise { return this.call("GET", `/v3/leads/billing`) as Promise; } /** The leads, reveals and cents of a month. GET /v3/leads/usage. Permission: account. */ usage(query?: UsageQuery): Promise { return this.call("GET", `/v3/leads/usage`, { query }) as Promise; } /** The leads opened and the reveals of a month as CSV. GET /v3/leads/usage.csv. Permission: account. */ usageCsv(query?: UsageCsvQuery): Promise { return this.call("GET", `/v3/leads/usage.csv`, { query, csv: true }) as Promise; } /** The contact, privacy and limit settings of the organization. GET /v3/leads/settings. Permission: account. */ settings(): Promise { return this.call("GET", `/v3/leads/settings`) as Promise; } }