<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bitrixa Limited</title>
    <description>The latest articles on DEV Community by Bitrixa Limited (@bitrixa_limited_b59865030).</description>
    <link>https://dev.to/bitrixa_limited_b59865030</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4123334%2Fbbf5155e-7a14-4474-b2f2-76677fd3bd00.png</url>
      <title>DEV Community: Bitrixa Limited</title>
      <link>https://dev.to/bitrixa_limited_b59865030</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bitrixa_limited_b59865030"/>
    <language>en</language>
    <item>
      <title>How I Turned the SAM.gov Public Bulk Dataset Into a Searchable Contractor Database</title>
      <dc:creator>Bitrixa Limited</dc:creator>
      <pubDate>Sun, 13 Sep 2026 15:59:08 +0000</pubDate>
      <link>https://dev.to/bitrixa_limited_b59865030/how-i-turned-the-samgov-public-bulk-dataset-into-a-searchable-contractor-database-421l</link>
      <guid>https://dev.to/bitrixa_limited_b59865030/how-i-turned-the-samgov-public-bulk-dataset-into-a-searchable-contractor-database-421l</guid>
      <description>&lt;p&gt;Working with public government datasets often sounds straightforward until you actually try to turn them into something useful.&lt;/p&gt;

&lt;p&gt;That was my experience with the &lt;strong&gt;SAM.gov public bulk dataset&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The data is valuable because it contains a large amount of publicly available information about registered entities and federal contractors. But if your goal is something practical — for example, building a targeted contractor list by NAICS code, geography, small-business status, CAGE availability or other criteria — the workflow can become surprisingly technical.&lt;/p&gt;

&lt;p&gt;You can absolutely solve the problem with Python, SQL, a database import, the SAM.gov API, or a commercial GovCon platform.&lt;/p&gt;

&lt;p&gt;But I wanted a workflow that was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;local&lt;/li&gt;
&lt;li&gt;repeatable&lt;/li&gt;
&lt;li&gt;easy to filter&lt;/li&gt;
&lt;li&gt;export-friendly&lt;/li&gt;
&lt;li&gt;independent of API limits&lt;/li&gt;
&lt;li&gt;usable by non-developers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built the &lt;strong&gt;SAM.gov Public Contractor &amp;amp; NAICS Database Compiler&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;A researcher might want to answer questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which active contractors operate under NAICS 541512?&lt;/li&gt;
&lt;li&gt;Which small businesses are registered in a particular state?&lt;/li&gt;
&lt;li&gt;Which entities have a CAGE code?&lt;/li&gt;
&lt;li&gt;Which records belong to particular SBA classifications?&lt;/li&gt;
&lt;li&gt;Which registrations include websites?&lt;/li&gt;
&lt;li&gt;Which contractors match particular PSC codes?&lt;/li&gt;
&lt;li&gt;Which results should be treated as individual registrations versus unique entities?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The raw public dataset contains the information, but turning it into a clean research database usually requires some kind of processing layer.&lt;/p&gt;

&lt;p&gt;For developers, that might mean writing a reusable script.&lt;/p&gt;

&lt;p&gt;For analysts, it might mean Power Query or a database import.&lt;/p&gt;

&lt;p&gt;For less technical users, it can mean relying on third-party platforms.&lt;/p&gt;

&lt;p&gt;I wanted to reduce that setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local processing instead of an API-first workflow
&lt;/h2&gt;

&lt;p&gt;One of the main design decisions was to process the official public bulk extract locally.&lt;/p&gt;

&lt;p&gt;That means the workflow does not depend on repeatedly calling an external API just to filter data that already exists in a downloadable public dataset.&lt;/p&gt;

&lt;p&gt;The basic process is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SAM.gov public bulk extract
        ↓
Local compiler
        ↓
Apply filters
        ↓
Select output structure
        ↓
Excel / CSV
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach has a few advantages.&lt;/p&gt;

&lt;p&gt;There is no API dependency during processing.&lt;/p&gt;

&lt;p&gt;There is no need to upload the source dataset to another service.&lt;/p&gt;

&lt;p&gt;And once the source file is available locally, the user can run different searches against it repeatedly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filters
&lt;/h2&gt;

&lt;p&gt;The current compiler supports filtering around fields that are useful in contractor research, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;registration status&lt;/li&gt;
&lt;li&gt;NAICS codes&lt;/li&gt;
&lt;li&gt;primary vs any declared NAICS&lt;/li&gt;
&lt;li&gt;state/province&lt;/li&gt;
&lt;li&gt;country&lt;/li&gt;
&lt;li&gt;small-business indicator&lt;/li&gt;
&lt;li&gt;business type&lt;/li&gt;
&lt;li&gt;SBA classifications&lt;/li&gt;
&lt;li&gt;Product or Service Codes&lt;/li&gt;
&lt;li&gt;CAGE availability&lt;/li&gt;
&lt;li&gt;entity website availability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are also different research modes depending on whether someone wants a guided workflow or more control over the criteria.&lt;/p&gt;

&lt;h2&gt;
  
  
  Entity-level vs registration-level output
&lt;/h2&gt;

&lt;p&gt;This was one of the more interesting parts of the workflow.&lt;/p&gt;

&lt;p&gt;Sometimes you want every matching registration/CAGE variation.&lt;/p&gt;

&lt;p&gt;Other times, you really want one result per unique entity.&lt;/p&gt;

&lt;p&gt;So the compiler can produce either:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;All matching registration records
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;One row per Unique Entity Identifier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That distinction can significantly change the usefulness of an exported contractor list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Excel and CSV output
&lt;/h2&gt;

&lt;p&gt;The tool can export:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excel&lt;/li&gt;
&lt;li&gt;CSV&lt;/li&gt;
&lt;li&gt;both formats&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is also a choice between a smaller set of curated research fields and a broader output based on the supported public source fields.&lt;/p&gt;

&lt;p&gt;For business users, Excel is usually convenient.&lt;/p&gt;

&lt;p&gt;For developers or larger downstream workflows, CSV often makes more sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I included a Python version as well
&lt;/h2&gt;

&lt;p&gt;The product includes a standalone Windows EXE, but I also wanted a Python/BAT version available.&lt;/p&gt;

&lt;p&gt;The EXE is aimed at users who do not want to set up a programming environment.&lt;/p&gt;

&lt;p&gt;The Python version is more useful for technical users who prefer a script-driven workflow or want to understand the processing approach more directly.&lt;/p&gt;

&lt;p&gt;I like the idea of the same product being usable by both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Analyst → guided Windows workflow
Developer → Python-based workflow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why not just use SAM.gov search?
&lt;/h2&gt;

&lt;p&gt;SAM.gov itself is obviously the authoritative source and is excellent for many individual searches.&lt;/p&gt;

&lt;p&gt;The use case here is different.&lt;/p&gt;

&lt;p&gt;If you need to produce a repeatable dataset involving potentially hundreds or thousands of matching entities, bulk processing becomes useful.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Find active small businesses in California matching several NAICS codes, requiring a CAGE code and website, then export the results.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is more of a data-processing problem than an individual record lookup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not use a commercial GovCon platform?
&lt;/h2&gt;

&lt;p&gt;There are excellent commercial platforms that provide far more functionality than this tool.&lt;/p&gt;

&lt;p&gt;They may include opportunity intelligence, bid tracking, historical awards, competitive analysis, alerts and CRM-style features.&lt;/p&gt;

&lt;p&gt;I wasn't trying to reproduce that.&lt;/p&gt;

&lt;p&gt;The idea was much narrower:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Give people a practical way to process the underlying public contractor dataset without requiring them to build their own data pipeline or take on another recurring subscription.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Performance considerations
&lt;/h2&gt;

&lt;p&gt;Large public datasets create some basic engineering decisions that don't matter with small CSV files.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;avoiding unnecessary repeated parsing&lt;/li&gt;
&lt;li&gt;applying filters efficiently&lt;/li&gt;
&lt;li&gt;limiting memory overhead&lt;/li&gt;
&lt;li&gt;handling Excel row limits&lt;/li&gt;
&lt;li&gt;deciding when CSV is the better output format&lt;/li&gt;
&lt;li&gt;preserving identifiers correctly&lt;/li&gt;
&lt;li&gt;dealing with blank or inconsistent classification fields&lt;/li&gt;
&lt;li&gt;avoiding accidental duplication at entity level&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even when the final interface is simple, those details matter if the software is expected to process large datasets reliably.&lt;/p&gt;

&lt;h2&gt;
  
  
  The commercial version
&lt;/h2&gt;

&lt;p&gt;I eventually packaged the workflow into a commercial product:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SAM.gov Public Contractor &amp;amp; NAICS Database Compiler&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.bitrixa.com/product/sam-gov-contractor-database-compiler/" rel="noopener noreferrer"&gt;https://www.bitrixa.com/product/sam-gov-contractor-database-compiler/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a one-time purchase rather than a monthly subscription, and includes both the Windows EXE and Python/BAT editions.&lt;/p&gt;

&lt;p&gt;The underlying contractor information still comes from the official SAM.gov public dataset. The software is the processing and filtering layer around that data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I’m considering next
&lt;/h2&gt;

&lt;p&gt;A few features I’m thinking about for future versions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQLite export&lt;/li&gt;
&lt;li&gt;DuckDB export&lt;/li&gt;
&lt;li&gt;saved filter profiles&lt;/li&gt;
&lt;li&gt;incremental monthly updates&lt;/li&gt;
&lt;li&gt;command-line automation&lt;/li&gt;
&lt;li&gt;more advanced combinations of NAICS/PSC criteria&lt;/li&gt;
&lt;li&gt;reusable research presets&lt;/li&gt;
&lt;li&gt;summary statistics before export&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m particularly interested in the SQLite/DuckDB question.&lt;/p&gt;

&lt;p&gt;For developers working with large public datasets, would you rather receive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSV
SQLite
DuckDB
Parquet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of Excel?&lt;/p&gt;

&lt;p&gt;And if you regularly work with SAM.gov or other government bulk datasets, what part of the workflow usually causes the most friction?&lt;/p&gt;

&lt;p&gt;Interested to hear how other developers and data people approach this.&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>automation</category>
      <category>database</category>
    </item>
  </channel>
</rss>
