DEV Community

Michalis Solomou
Michalis Solomou

Posted on

Filtering SEC Form D Filings by Industry and State with Python

In an earlier post I covered pulling SEC Form D filings with Python. The obvious next question: how do you narrow that firehose down to just the companies you actually care about?

If you sell into healthcare, you don't want a feed full of crypto raises. If your territory is the Midwest, a Bay Area seed round isn't a lead. Here's how to filter Form D data by industry and state without paying for a dataset.

What's actually in a Form D filing

Each filing includes structured fields, not just free text — which makes filtering possible without NLP or guesswork:

  • Industry Group — the SEC's own classification (Technology, Health Care, Manufacturing, etc.)
  • State of Incorporation and the principal place of business state
  • Total Offering Amount
  • Related Persons (often includes the founding team)

Filtering with the EDGAR full-text search API

import requests

def search_form_d(industry=None, state=None, days_back=7):
    params = {
        "forms": "D",
        "dateRange": "custom",
    }
    if state:
        params["locationCode"] = state  # e.g. "CA", "NY", "TX"

    resp = requests.get(
        "https://efts.sec.gov/LATEST/search-index",
        params=params,
        headers={"User-Agent": "research example@example.com"},    )
    resp.raise_for_status()
    data = resp.json()

    hits = data.get("hits", {}).get("hits", [])
    if industry:
        hits = [h for h in hits if industry.lower() in str(h.get("_source", {})).lower()]
    return hits


if __name__ == "__main__":
    results = search_form_d(state="TX")
    for r in results[:10]:
        print(r["_source"].get("display_names"))
Enter fullscreen mode Exit fullscreen mode

The locationCode parameter does the state filtering server-side. Industry filtering is messier — EDGAR's own industry classification isn't always exposed cleanly in the search index, so a lot of people end up doing a second pass: pull the filing, then match against SIC codes or keyword-match the company description.

Where this breaks down

Two real limitations if you try to build this into an actual lead feed:

  1. State filtering catches the legal entity's state, not necessarily where the team is. A Delaware C-corp with a San Francisco team will show up under Delaware unless you also check "business location" fields separately.
  2. There's no clean industry taxonomy in the raw filing. You're often inferring industry from the company name and a one-line description, which is unreliable at scale.

The version I ended up building

This is exactly why I built Funding Signals — it pre-processes each filing, resolves the actual industry and location, and scores it for B2B sales relevance so you can filter by both without writing the matching logic yourself. There's a free /v1/sample endpoint if you want to see what a pre-filtered, scored result looks like.

If you're just experimenting, the raw EDGAR API above is free and gets you 80% of the way — just budget time for the industry-matching part.

Top comments (0)