Skip to content

About

SEC EDGAR scraper API: SEC EDGAR Company Filings, SEC EDGAR Company Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

SEC EDGAR Scraper API

Scrape SEC EDGAR with a JSON API. This repo has working Python examples for DataGuru's SEC EDGAR scraper APIs: SEC EDGAR Company Filings and SEC EDGAR Company Search.

DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.0012 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.

SEC EDGAR APIs

API What it returns Price Page
SEC EDGAR Company Filings Get a company's SEC EDGAR profile and filings, including industry, state of incorporation, fiscal year end, addresses and former names, plus each filing's form type, dates, description and document links. $0.0022 https://dataguru.cc/apis/secedgar-company-filings/
SEC EDGAR Company Search Search SEC EDGAR by company name, person name or ticker and get matching filers with their CIK number, tickers, exchanges, state and EDGAR page links. $0.0012 https://dataguru.cc/apis/secedgar-company-search/

Quick start

  1. Create a free account and an API key at dashboard.dataguru.cc.
  2. Install and run:
git clone https://github.com/dataguru-cc/sec-edgar-scraper-api.git
cd sec-edgar-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py secedgar-company-filings

Examples

Every example covers all 2 SEC EDGAR APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.

File Style Run
examples/sdk_example.py DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ python examples/sdk_example.py
examples/requests_example.py Plain requests, synchronous python examples/requests_example.py
examples/async_example.py asyncio + httpx, concurrent with a limit python examples/async_example.py
examples/scrapy_spider.py Scrapy spider, items to JSON/CSV scrapy runspider examples/scrapy_spider.py -O sec-edgar.json

All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.

API reference

SEC EDGAR Company Filings

Get a company's SEC EDGAR profile and filings, including industry, state of incorporation, fiscal year end, addresses and former names, plus each filing's form type, dates, description and document links.

Parameter Type Required Description
cik string yes CIK number (e.g. 320193), stock ticker (e.g. AAPL) or EDGAR company URL (e.g. https://www.sec.gov/edgar/browse/?CIK=320193).
form_type string no Only return these form types, comma separated (e.g. "10-K,10-Q,8-K"). Leave empty for all forms.
limit integer no Maximum number of filings to return (1-200). Default: 20.

Response fields: cik, name, url, entity_type, tickers, exchanges, sic, sic_description, filer_category, ein, state_of_incorporation, fiscal_year_end, phone, website, business_address, mailing_address, former_names, form_types, total_filings, returned_filings, filings, error, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/secedgar/companies/filings" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cik": "320193"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "cik": "string",
  "name": "string",
  "url": "https://example.com/...",
  "entity_type": "string",
  "tickers": [
    "string"
  ],
  "exchanges": [
    "string"
  ],
  "sic": "string",
  "sic_description": "string",
  "filer_category": "string",
  "ein": "string",
  "state_of_incorporation": "string",
  "fiscal_year_end": "string",
  "phone": "string",
  "website": "string",
  "business_address": {
    "street1": "string",
    "street2": "string",
    "city": "string",
    "state_or_country": "string",
    "zip_code": "string"
  },
  "mailing_address": {
    "street1": "string",
    "street2": "string",
    "city": "string",
    "state_or_country": "string",
    "zip_code": "string"
  },
  "former_names": [
    {
      "name": "string",
      "from": "string",
      "to": "string"
    }
  ],
  "form_types": [
    "string"
  ],
  "total_filings": 0,
  "returned_filings": 0,
  "filings": [
    {
      "accession_number": "string",
      "form": "string",
      "filing_date": "2026-01-01T12:00:00Z",
      "report_date": "2026-01-01T12:00:00Z",
      "acceptance_datetime": "string",
      "description": "string",
      "items": [
        "string"
      ],
      "file_number": "string",
      "size_bytes": 0,
      "is_xbrl": false,
      "primary_document": "string",
      "document_url": "https://example.com/...",
      "filing_index_url": "https://example.com/..."
    }
  ],
  "error": "string",
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "SEC EDGAR Company Filings",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

SEC EDGAR Company Search

Search SEC EDGAR by company name, person name or ticker and get matching filers with their CIK number, tickers, exchanges, state and EDGAR page links.

Parameter Type Required Description
limit integer no Maximum number of results to return (1-100). Default: 20.
query string yes Company name, person name or ticker, e.g. "apple" or "TSLA".

Response fields: query, total_results, returned_results, results, error, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/secedgar/companies/search" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "apple"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "query": "string",
  "total_results": 0,
  "returned_results": 0,
  "results": [
    {
      "cik": "string",
      "name": "string",
      "tickers": [
        "string"
      ],
      "exchanges": [
        "string"
      ],
      "state": "string",
      "url": "https://example.com/...",
      "filings_url": "https://example.com/..."
    }
  ],
  "error": "string",
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "SEC EDGAR Company Search",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

More

License

The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.

About

SEC EDGAR scraper API: SEC EDGAR Company Filings, SEC EDGAR Company Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors