SEC EDGAR (United States)

reference Facts, options, APIs

On this page

This example looks up an organization’s CIK (Central Index Key) in the U.S. Securities and Exchange Commission’s EDGAR submissions API. For each golden record it stores the name registered with the SEC, ticker symbols and exchanges, SIC industry code, EIN, filer category, state of incorporation, fiscal year end, business and mailing addresses, former names, and the date and form type of the latest filing. No API key is needed.

The US has no federal company register: companies are registered by each state. EDGAR covers only companies and people that file with the SEC, which is mostly public companies (including foreign companies listed in the US) and some funds and private issuers. Most private US companies aren’t in EDGAR.

Enricher version: V2
API key: not needed, but you must set USER_AGENT in the script to your company name and a contact e-mail address

To set up the enricher, see Add REST API enricher, then use the settings and script on this page.

Settings

  • Accepted Business Domain – /Organization, or the business domain that holds your companies.

  • Version – V2 (recommended).

  • API Key – leave empty.

  • Filters – we recommend a rule that only accepts golden records where organization.cik has a value. Otherwise, every record without a CIK is listed on the enricher’s Logs tab as having returned no results.

  • Process script – before you use the script, set USER_AGENT at the top of the script to your company name and a contact e-mail address, for example "Contoso Ltd data-team@contoso.com". The SEC’s fair access policy requires automated tools to declare themselves this way, and rejects requests that don’t. While USER_AGENT is empty, the script adds nothing and doesn’t call the SEC.

Vocabulary and Properties

organization.cik

organization.cik holds the CIK, with or without leading zeros. If your data uses another vocabulary key, change this field and the CIK_KEY value at the top of the script. To find a company’s CIK, use the SEC’s CIK lookup.

Request and response

Base URL: https://data.sec.gov
Endpoint: GET /submissions/CIK{cik}.json, where {cik} has 10 digits with leading zeros
Authentication: none; a User-Agent header with your company name and contact e-mail address is required
Rate limits: at most 10 requests per second, per the SEC’s fair access policy

The script sends one request per golden record:

GET https://data.sec.gov/submissions/CIK0000320193.json
User-Agent: Contoso Ltd data-team@contoso.com
Accept: application/json

Shortened response (the full response also lists up to 1,000 recent filings and is about 150–200 KB):

{
  "cik": "0000320193",
  "entityType": "operating",
  "sic": "3571",
  "sicDescription": "Electronic Computers",
  "name": "Apple Inc.",
  "tickers": ["AAPL"],
  "exchanges": ["Nasdaq"],
  "ein": "942404110",
  "lei": null,
  "website": "",
  "category": "Large accelerated filer",
  "fiscalYearEnd": "0925",
  "stateOfIncorporation": "CA",
  "stateOfIncorporationDescription": "CA",
  "addresses": {
    "mailing": { "street1": "ONE APPLE PARK WAY", "street2": null, "city": "CUPERTINO", "stateOrCountry": "CA", "zipCode": "95014", "stateOrCountryDescription": "CA" },
    "business": { "street1": "ONE APPLE PARK WAY", "street2": null, "city": "CUPERTINO", "stateOrCountry": "CA", "zipCode": "95014", "stateOrCountryDescription": "CA" }
  },
  "phone": "(408) 996-1010",
  "formerNames": [
    { "name": "APPLE INC", "from": "2007-01-10T05:00:00.000Z", "to": "2019-08-05T04:00:00.000Z" },
    { "name": "APPLE COMPUTER INC", "from": "1994-01-26T05:00:00.000Z", "to": "2007-01-04T05:00:00.000Z" }
  ],
  "filings": {
    "recent": {
      "accessionNumber": ["0001140361-26-043120", "..."],
      "filingDate": ["2026-11-30", "..."],
      "form": ["4", "..."]
    }
  }
}

Properties added by the enricher

Property Response field Example
edgar.cik cik 0000320193
edgar.name name Apple Inc.
edgar.entityType entityType operating
edgar.category category Large accelerated filer
edgar.sicCode sic 3571
edgar.sicDescription sicDescription Electronic Computers
edgar.tickers tickers, separated by ; AAPL
edgar.exchanges exchanges, separated by ; Nasdaq
edgar.ein ein (left out when it is all zeros) 942404110
edgar.lei lei HWUPKR0MPOU8FGXBT394 (illustrative)
edgar.stateOfIncorporation stateOfIncorporationDescription, or stateOfIncorporation CA
edgar.fiscalYearEnd fiscalYearEnd (month and day, MMDD) 0925
edgar.businessAddress addresses.business, on one line ONE APPLE PARK WAY, CUPERTINO, CA 95014
edgar.mailingAddress addresses.mailing, on one line ONE APPLE PARK WAY, CUPERTINO, CA 95014
edgar.phone phone (408) 996-1010
edgar.website website www.example.com
edgar.formerNames formerNames[].name, separated by ; APPLE INC; APPLE COMPUTER INC; APPLE COMPUTER INC/ FA
edgar.latestFilingDate first entry of filings.recent.filingDate 2026-11-30
edgar.latestFilingForm first entry of filings.recent.form 4

A property is added only when EDGAR returns a value for it; for example, few companies have lei or website filled in. For a company outside the US, addresses end with the country (for example 1 TOYOTA CHO TOYOTA CITY, AICHI PREFECTURE 471-8571, JAPAN) and edgar.stateOfIncorporation is the country name.

If the enricher has a Preview tab, the results appear there first. To add them to golden records, go to the Map tab, select Map Data, and choose Auto Mapping. Select the business domain, enter a new vocabulary named EDGAR with the key prefix edgar, and then create the mapping. Auto mapping also uses name as the golden record name, so remove that from the mapping if you want to keep your existing names. Then process the data on the Process tab. If the enricher has no Preview tab, the properties are added to the golden record as soon as it is enriched.

How the script handles input and errors

  • Spaces, dashes, and a leading CIK are removed, and the CIK is padded to 10 digits, so CIK 320193 is looked up as 0000320193. Golden records without a valid CIK (1 to 10 digits, not all zeros) are skipped without calling the SEC. Ticker symbols aren’t accepted as input.

  • If USER_AGENT is empty, the script logs a message and adds nothing.

  • If the CIK isn’t in EDGAR (HTTP 404), or the SEC returns another error, the script logs the reason and adds nothing.

  • If the SEC rejects the request as coming from an undeclared automated tool (HTTP 403), the script throws an error, so the golden record is listed on the Logs tab with a message to set USER_AGENT.

  • If the SEC limits the request rate (HTTP 429, or HTTP 403 with a “Request Rate Threshold Exceeded” page), the script throws an error that makes the enricher try the golden record again later.

  • Only the first entry of the recent filings list is read, so the large filings arrays don’t slow the script down.

  • Successful results are cached for 24 hours per CIK. Only the mapped properties are cached, not the whole response. Not-found answers and errors aren’t cached. To change this, edit CACHE_MILLISECONDS in the script.

Testing the enricher

  • Test connection checks only that the script runs. It doesn’t call the SEC.

  • To try the setup, create a golden record with organization.cik set to 320193 (Apple Inc.) or 789019 (Microsoft Corp).

Limitations

  • EDGAR covers SEC filers only, not every US business. For state-registered companies, use the relevant state’s business registry.

  • Filings, financial statements (XBRL facts), officers and shareholders aren’t added. EDGAR has separate APIs for financial data (/api/xbrl/companyfacts/CIK{cik}.json).

  • If you enrich many golden records at once, the enricher can exceed the SEC’s limit of 10 requests per second. The script then retries, but the SEC may block your server’s IP address for a short time if the limit is exceeded repeatedly.

Process script

// REST API enricher (V2) - US public company lookup with SEC EDGAR
//
// Looks up a golden record's CIK (Central Index Key) in the U.S. Securities and Exchange
// Commission's EDGAR submissions API (https://www.sec.gov/search-filings/edgar-application-programming-interfaces),
// and adds the company details to the golden record as edgar.* properties:
//
//   edgar.cik                  10-digit CIK that was looked up
//   edgar.name                 company name as registered with the SEC
//   edgar.entityType           entity type, for example operating
//   edgar.category             filer category, for example Large accelerated filer
//   edgar.sicCode              SIC industry code, for example 3571
//   edgar.sicDescription       SIC industry description, for example Electronic Computers
//   edgar.tickers              ticker symbols, separated by "; "
//   edgar.exchanges            exchanges the tickers trade on, separated by "; "
//   edgar.ein                  employer identification number (EIN)
//   edgar.lei                  legal entity identifier (LEI), when the SEC has one
//   edgar.stateOfIncorporation state or country of incorporation
//   edgar.fiscalYearEnd        fiscal year end as MMDD, for example 0925
//   edgar.businessAddress      business address on one line
//   edgar.mailingAddress       mailing address on one line
//   edgar.phone                business phone number
//   edgar.website              website, when the company has given one
//   edgar.formerNames          former names, separated by "; "
//   edgar.latestFilingDate     date of the most recent filing (YYYY-MM-DD)
//   edgar.latestFilingForm     form type of the most recent filing, for example 10-K
//
// No API key is needed, but the SEC requires every automated request to declare who is making
// it: set USER_AGENT below to your company name and a contact e-mail address. See README.md next
// to this file for the enricher settings.
//
// EDGAR only covers companies and people that file with the SEC (mostly public companies). The
// US has no federal company register; most private companies aren't in EDGAR.
//
// A record gets no result (nothing is stored) when it has no valid CIK, when the CIK isn't in
// EDGAR, or when the API can't answer.

// ---- Settings -------------------------------------------------------------------------

// Vocabulary key to read. Add the same key to the Vocabulary and Properties field.
const CIK_KEY = "organization.cik";

// Required by the SEC: your company name and a contact e-mail address, for example
// "Contoso Ltd data-team@contoso.com". The script does nothing until this is set.
const USER_AGENT = "";

const EDGAR_URL = "https://data.sec.gov/submissions/CIK";

// How long to reuse an answer for the same CIK. 0 turns caching off.
const CACHE_MILLISECONDS = 24 * 60 * 60 * 1000;

// ---- Script ---------------------------------------------------------------------------

function getValue(key) {
  // A plain loop rather than vocabularies.find(...): vocabularies is a .NET list, and when
  // .find is called from inside a function, later calls return the first call's match.
  const items = vocabularies || [];
  for (let i = 0; i < items.length; i++) {
    if (items[i].Key === key) {
      const value = items[i].Value;
      return value === null || value === undefined ? "" : String(value).trim();
    }
  }
  return "";
}

// Accepts "320193", "0000320193", "CIK0000320193", "CIK 320193", etc. Returns the CIK as
// 10 digits, or null when it isn't a CIK.
function parseCik(raw) {
  const text = raw.toUpperCase().replace(/^CIK/, "");
  if (/[A-Z]/.test(text)) {
    return null;
  }
  const digits = text.replace(/[^0-9]/g, "");
  if (digits.length < 1 || digits.length > 10 || /^0+$/.test(digits)) {
    return null;
  }
  return ("0000000000" + digits).slice(-10);
}

function clean(value) {
  if (value === null || value === undefined) {
    return null;
  }
  const text = String(value).replace(/\s+/g, " ").trim();
  return text === "" ? null : text;
}

function parseJson(text) {
  try {
    return JSON.parse(text);
  } catch (e) {
    return null;
  }
}

function dateOnly(value) {
  const text = clean(value);
  return text && /^\d{4}-\d{2}-\d{2}/.test(text) ? text.substring(0, 10) : null;
}

// Joins the values of a short list (tickers, exchanges, former names) with "; ".
function joinList(values, pick) {
  const list = Array.isArray(values) ? values : [];
  const result = [];
  for (let i = 0; i < list.length && i < 50; i++) {
    const value = clean(pick ? pick(list[i]) : list[i]);
    if (value && result.indexOf(value) < 0) {
      result.push(value);
    }
  }
  return result.length > 0 ? result.join("; ") : null;
}

// Returns the address on one line, for example "ONE APPLE PARK WAY, CUPERTINO, CA 95014".
// EDGAR uses US state codes for US addresses, and other codes (with a description such as
// "Japan") for addresses outside the US.
function formatAddress(address) {
  if (!address) {
    return null;
  }
  const code = clean(address.stateOrCountry);
  const description = clean(address.stateOrCountryDescription);
  const zip = clean(address.zipCode) === "00000" ? null : clean(address.zipCode);
  const isUs = !!code && code === description;
  const lines = [clean(address.street1), clean(address.street2), clean(address.city)];
  if (isUs) {
    lines.push([code, zip].filter((x) => !!x).join(" "));
  } else {
    lines.push(zip);
    if (description && description.toUpperCase() !== String(clean(address.city) || "").toUpperCase()) {
      lines.push(description);
    }
  }
  const result = lines.filter((x) => !!x);
  return result.length > 0 ? result.join(", ") : null;
}

// Calls the API. Returns the mapped properties, or null when there's no answer to store.
function lookUp(cik) {
  const apiResponse = http.send({
    url: `${EDGAR_URL}${cik}.json`,
    method: "GET",
    headers: [
      { Key: "User-Agent", Value: USER_AGENT },
      { Key: "Accept", Value: "application/json" },
    ],
  });

  const status = String(apiResponse.HttpStatus || "");
  const content = String(apiResponse.Content || "");

  // The SEC answers 403 with a "Request Rate Threshold Exceeded" page when more than 10
  // requests a second are sent.
  if (status === "TooManyRequests" || (status === "Forbidden" && content.indexOf("Request Rate Threshold") >= 0)) {
    throw new Error("TooManyRequests - SEC EDGAR is limiting requests, the record will be retried");
  }

  if (status === "Forbidden") {
    throw new Error("SEC EDGAR rejected the request (HTTP Forbidden). Set USER_AGENT in the script to your company name and a contact e-mail address.");
  }

  const body = status === "OK" ? parseJson(content) : null;
  if (body && body.cik) {
    return toData(cik, body);
  }

  // 404 (an S3 "NoSuchKey" error): no company with this CIK.
  log(`SEC EDGAR could not look up CIK ${cik}. HTTP ${status}. ${content.substring(0, 200)}`);
  return null;
}

function toData(cik, company) {
  const addresses = company.addresses || {};
  // filings.recent holds up to 1,000 filings as parallel arrays, newest first. Only the first
  // entry is read; the arrays aren't looped over.
  const recent = (company.filings || {}).recent || {};
  const latestDate = Array.isArray(recent.filingDate) && recent.filingDate.length > 0 ? recent.filingDate[0] : null;
  const latestForm = Array.isArray(recent.form) && recent.form.length > 0 ? recent.form[0] : null;
  const ein = clean(company.ein);

  const data = {
    "edgar.cik": cik,
    "edgar.name": clean(company.name),
    "edgar.entityType": clean(company.entityType),
    "edgar.category": clean(company.category),
    "edgar.sicCode": clean(company.sic),
    "edgar.sicDescription": clean(company.sicDescription),
    "edgar.tickers": joinList(company.tickers),
    "edgar.exchanges": joinList(company.exchanges),
    "edgar.ein": ein && !/^0+$/.test(ein) ? ein : null,
    "edgar.lei": clean(company.lei),
    "edgar.stateOfIncorporation": clean(company.stateOfIncorporationDescription) || clean(company.stateOfIncorporation),
    "edgar.fiscalYearEnd": clean(company.fiscalYearEnd),
    "edgar.businessAddress": formatAddress(addresses.business),
    "edgar.mailingAddress": formatAddress(addresses.mailing),
    "edgar.phone": clean(company.phone),
    "edgar.website": clean(company.website),
    "edgar.formerNames": joinList(company.formerNames, (x) => x && x.name),
    "edgar.latestFilingDate": dateOnly(latestDate),
    "edgar.latestFilingForm": clean(latestForm),
  };

  // Leave out values EDGAR didn't return, so they don't overwrite existing data with blanks.
  Object.keys(data).forEach((key) => {
    if (data[key] === null) {
      delete data[key];
    }
  });
  return data;
}

function run() {
  const cik = parseCik(getValue(CIK_KEY));
  if (!cik) {
    // No valid CIK on this record (this is also what Test connection hits, because it passes
    // placeholder values instead of real ones).
    return [];
  }

  if (!clean(USER_AGENT)) {
    log("SEC EDGAR needs a User-Agent. Set USER_AGENT in the script to your company name and a contact e-mail address.");
    return [];
  }

  // The mapped properties are cached, not the whole response (which can be over 150 KB).
  const cacheKey = `edgar:${cik}`;
  const cached = CACHE_MILLISECONDS > 0 ? cache.get(cacheKey) : null;
  let data = cached ? parseJson(String(cached)) : null;

  if (!data) {
    data = lookUp(cik);
    if (!data) {
      return [];
    }
    if (CACHE_MILLISECONDS > 0) {
      cache.set(cacheKey, JSON.stringify(data), CACHE_MILLISECONDS);
    }
  }

  return [{ Data: data, Score: 100 }];
}

response = JSON.stringify(run());