Skip to main content
This tutorial builds a small source-aware search over SEC enforcement releases. The useful result is not a label by itself: it is a short list of releases, each with a stable URL a researcher can read. It is a retrieval workflow, not a legal-screening decision or a determination that a person or issuer is the respondent.

Prerequisites

  • An API key in SECAPI_API_KEY
  • Node.js 18+ for the JavaScript example, or curl

1. Start with a bounded query

The endpoint returns a list envelope: data, hasMore, nextCursor, and requestId. Each row includes a source type, publication date, title, excerpt, document URL, and any respondent or classification fields that were available from the release. The expected outcome is a review queue whose records retain documentUrl and requestId.

2. Add a retrieval filter

The API accepts these normalized violation_type values: fraud, insider_trading, reporting_violation, market_manipulation, registration_violation, investment_adviser, broker_dealer, municipal_securities, and other.
You can also pass ticker or cik, penalty_min, penalty_max, date_from, and date_to. These filters help discover releases; they are not evidence that an issuer or person is a respondent.

3. Keep the source with the result

Create search-enforcement.mjs:
Run node search-enforcement.mjs. The expected outcome is a small list of source URLs and titles. When you save a match, retain documentUrl, the returned source type, and requestId. Read the release before assigning a risk label, calculating a penalty total, or joining the record to an issuer.

4. Page safely

Create page-enforcement.mjs:
Run node page-enforcement.mjs to retrieve each available page in order. Keep the cursor only for this query; a cursor from another filter set does not describe this result sequence.

Source and provenance

Each row is a pointer to a published SEC litigation release, administrative proceeding, or Accounting and Auditing Enforcement Release. Store the source type, publication date, title, documentUrl, normalized retrieval fields, and requestId; the linked SEC release is the source for respondent identity, allegations, disposition, and amount.

Limits and failure modes

  • violationType is a classifier-derived retrieval label, not the SEC’s final legal classification.
  • penaltyAmount can be null or can capture only the amount the release made machine-readable.
  • A name, ticker, or CIK association should be checked against the linked release before it is used in a compliance, legal, or investment workflow.

Next steps