SEC Blast API

Full-Text Search

Search across SEC filing documents using Elasticsearch-powered full-text search.

Parameters

NameTypeDescription
queryrequiredstringSearch query string
query_typestring'match' | 'match_phrase' | 'query_string'
ciksstring[]Filter by CIK numbers
form_typesstring[]Filter by form types
date_fromstringStart date (YYYY-MM-DD)
date_tostringEnd date (YYYY-MM-DD)
fromnumberPagination start index
tonumberPagination end index (max 10000)

Query Types

match (default)

Standard full-text search with automatic word splitting and stemming.

typescript
const result = await client.fulltextSearch({
  query: 'material contract',
  form_types: ['10-K', '8-K']
});

console.log(`Found ${result.total_hits} hits`);

match_phrase

Exact phrase matching - words must appear in the exact order specified.

typescript
const result = await client.fulltextSearch({
  query: 'material contract',
  query_type: 'match_phrase',
  form_types: ['10-K']
});

query_string

Lucene query syntax with AND, OR, NOT operators and wildcards.

typescript
// Boolean operators
const result = await client.fulltextSearch({
  query: 'revenue AND growth AND NOT decline',
  query_type: 'query_string'
});

// Grouping with parentheses
const result2 = await client.fulltextSearch({
  query: '(merger OR acquisition) AND agreement',
  query_type: 'query_string'
});

Complete Example

typescript
const results = await client.fulltextSearch({
  query: 'cybersecurity AND (breach OR incident)',
  query_type: 'query_string',
  form_types: ['10-K', '8-K'],
  date_from: '2023-01-01',
  to: 20
});

console.log(`Found ${results.total_hits} hits\n`);

for (const hit of results.hits) {
  console.log(`${hit.form_type} (${hit.filing_date})`);
  console.log(`  Score: ${hit.score?.toFixed(2)}`);

  if (hit.highlights) {
    for (const snippet of hit.highlights.slice(0, 2)) {
      const clean = snippet.replace(/<[^>]+>/g, '');
      console.log(`  "${clean.substring(0, 100)}..."`);
    }
  }
}