# SBA Small Business Search Scraper — Federal Contractors & Leads (`haketa/sba-small-business-scraper`) Actor

Scrape the SBA Small Business Search for US federal contractors: company, email, phone, contact, address, UEI, NAICS, SBA certifications (8a, WOSB, VOSB, SDVOSB, HUBZone), capabilities & keywords. Filter by NAICS, state or certification. Export JSON/CSV/Excel for B2B lead generation.

- **URL**: https://apify.com/haketa/sba-small-business-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SBA Small Business Search Scraper — Federal Contractors & Leads

Extract structured company data from the **SBA Small Business Search (SBS)** — the U.S. Small Business Administration's official directory of small businesses that qualify for federal contracts (the system that replaced the legacy Dynamic Small Business Search / DSBS in 2025). Search by keyword, NAICS code, state or SBA certification and get clean, ready-to-use records: **company name, email, phone, contact person, website, full address, UEI, CAGE code, NAICS codes, SBA certifications, capabilities and keywords**.

No code, no login, no API key. Run it from the Apify Console, on a schedule, or from your own app via the API. Results download as **JSON, CSV, Excel, HTML or XML**, or sync straight into Google Sheets, Airtable, HubSpot, Make, Zapier and n8n.

> **📇 Built for B2B lead generation & supplier diversity.** Nearly every record includes a **contact email and phone** — ideal for outreach lists, supplier sourcing and federal-contracting market research.

***

### 📋 What this scraper does

The SBA directory holds tens of thousands of registered small businesses seeking federal work. This actor turns a search into a clean, structured dataset you can analyse, enrich or feed into a CRM.

Give it a search term (for example `solar panel installation`, `cybersecurity`, or a NAICS code like `541512`), optionally narrow it by state, NAICS or certification, and it will:

- ✅ Return every matching company, with **numeric-clean fields** ready for a spreadsheet or CRM
- ✅ Capture **email, phone, fax, contact person and website** for direct outreach
- ✅ Break out the **full address** — street, city, state, ZIP, county and congressional district
- ✅ Include federal identifiers — **UEI (Unique Entity ID)** and **CAGE code**
- ✅ List **primary and all NAICS codes**
- ✅ Flag active **SBA certifications** — 8(a), WOSB, EDWOSB, VOSB, SDVOSB, HUBZone
- ✅ Pull the company's **capabilities narrative and keywords** for qualification
- ✅ Filter by **state, NAICS, certification, SAM.gov status or "has email"** so your list is ready to use

Every company is unique in the output (de-duplicated by entity ID / UEI).

***

### ⭐ Why choose this scraper

- **Outreach-ready contacts.** ~97% of records include an email and phone plus a named contact person — not just a company name.
- **Certification filters for diversity sourcing.** Instantly build lists of 8(a), Woman-Owned (WOSB/EDWOSB), Veteran-Owned (VOSB/SDVOSB) or HUBZone firms.
- **Federal identifiers included.** UEI and CAGE codes let you cross-reference SAM.gov, USAspending and contract records.
- **Current source.** Targets the live **SBA Small Business Search**, not the retired DSBS endpoint.
- **Fast and cheap.** Data comes from a single API call per search — hundreds of companies in seconds.

***

### 💡 Popular use cases

| Use case | How this scraper helps |
| --- | --- |
| **B2B lead generation** | Build targeted outreach lists with email, phone and contact person by industry and location. |
| **Supplier diversity sourcing** | Find certified 8(a), WOSB, VOSB, SDVOSB or HUBZone suppliers for diversity spend goals. |
| **Federal subcontracting** | Primes can find qualified small-business subcontractors by NAICS and set-aside type. |
| **Market & competitor research** | Map the small-business landscape for any NAICS or capability. |
| **CRM enrichment** | Enrich existing accounts with UEI, CAGE, NAICS and certification data. |
| **Grant & program outreach** | Reach eligible small businesses for programs, events or funding. |

***

### 🚀 Quick start

1. Open the actor in the Apify Console.
2. In **Search term**, enter something specific — e.g. `solar panel installation`, `IT staffing`, or a NAICS code like `541512`.
3. (Optional) Filter by **state**, **NAICS**, **certification**, **SAM status** or **has email**.
4. Set **Max items** (default 100) and click **Start**.
5. Download your data from the **Storage → Dataset** tab.

> **Tip:** Be specific with the search term. Broad terms like `construction` match tens of thousands of companies. A focused term plus filters gives a fast, relevant list.

***

### ⚙️ Input

| Field | Type | Description |
| --- | --- | --- |
| **Search term** | string | Full-text search over company name, NAICS, keywords and capabilities. **Required.** Be specific. |
| **States** | array | Keep only companies in these US states (2-letter codes or names). |
| **NAICS codes** | array | Keep only companies with one of these NAICS codes (primary or any listed). |
| **Certifications** | array | Keep only companies with an active 8(a), WOSB, EDWOSB, VOSB, SDVOSB or HUBZone certification. |
| **Active SAM only** | boolean | Keep only companies with an active SAM.gov registration. |
| **Only companies with an email** | boolean | Skip companies without a published email — great for outreach lists. |
| **Max items** | integer | Maximum companies to save. Default 100. |
| **Proxy** | object | Apify Proxy (datacenter US) is recommended and sufficient — the API is open. |

#### Example 1 — Simple keyword search

```json
{ "searchTerm": "cybersecurity", "maxItems": 200 }
```

#### Example 2 — Diversity sourcing (WOSB + HUBZone in Texas, with email)

```json
{
  "searchTerm": "IT services",
  "states": ["TX"],
  "certifications": ["wosb", "hubzone"],
  "requireEmail": true,
  "maxItems": 300
}
```

#### Example 3 — By NAICS + state

```json
{
  "searchTerm": "engineering",
  "naicsCodes": ["541330"],
  "states": ["CA", "NV"],
  "maxItems": 500
}
```

#### Example 4 — 8(a) firms with an active SAM registration

```json
{
  "searchTerm": "construction management",
  "certifications": ["8a"],
  "activeSamOnly": true,
  "maxItems": 250
}
```

***

### 📦 Output

Each company becomes one dataset record:

```json
{
  "legalBusinessName": "CREATIVE BUILDS CORPORATION",
  "dbaName": null,
  "email": "rodolfo@creativebuildsusa.com",
  "phone": "6192691320",
  "fax": null,
  "contactPerson": "RODOLFO FARBER",
  "website": "https://www.creativebuildsusa.com",
  "address1": "123 Example St",
  "city": "SAN DIEGO",
  "state": "California",
  "zipCode": "92101",
  "county": "San Diego",
  "congressionalDistrict": "CA51",
  "uei": "ABC123DEF456",
  "cageCode": "9ABC1",
  "entityId": "351791",
  "naicsPrimary": "236220",
  "naicsAllCodes": "236220, 236118, 238160",
  "certifications": "HUBZone",
  "is8a": false,
  "isWosb": false,
  "isVosb": false,
  "isSdvosb": false,
  "isHubzone": true,
  "selfCertifiedSmall": true,
  "legalStructure": "Corporation",
  "yearEstablished": "2015",
  "currentPrincipals": "Rodolfo Farber",
  "capabilitiesNarrative": "SBA 8(a) and HUBZone certified general contractor specializing in ...",
  "keywords": "general contractor, construction management, solar",
  "exporterStatus": null,
  "samActive": true,
  "lastUpdated": "2026-05-18",
  "searchTerm": "solar panel installation",
  "scrapedAt": "2026-07-01T11:02:00.000Z"
}
```

#### Output fields

| Field | Description |
| --- | --- |
| `legalBusinessName` / `dbaName` | Legal and doing-business-as names. |
| `email` / `phone` / `fax` / `contactPerson` | Direct contact details. |
| `website` | Company website. |
| `address1` / `city` / `state` / `zipCode` / `county` / `congressionalDistrict` | Full location. |
| `uei` / `cageCode` / `entityId` | Federal identifiers (SAM.gov UEI, CAGE, SBA entity ID). |
| `naicsPrimary` / `naicsAllCodes` | Primary and all NAICS codes. |
| `certifications` | Active SBA certifications (comma-separated). |
| `is8a` / `isWosb` / `isEdwosb` / `isVosb` / `isSdvosb` / `isHubzone` | Individual certification flags. |
| `selfCertifiedSmall` | Self-certified small business. |
| `legalStructure` / `yearEstablished` | Legal structure and founding year. |
| `currentPrincipals` | Current principals/owners. |
| `capabilitiesNarrative` / `keywords` | Capabilities statement and business keywords. |
| `exporterStatus` | Exporter status, when provided. |
| `samActive` | Active SAM.gov registration. |
| `lastUpdated` | Profile last-updated date. |
| `searchTerm` / `scrapedAt` | The search used and extraction timestamp. |

***

### 🏷️ SBA certifications explained

| Code | Meaning |
| --- | --- |
| **8(a)** | 8(a) Business Development program (socially/economically disadvantaged). |
| **WOSB** | Woman-Owned Small Business. |
| **EDWOSB** | Economically Disadvantaged Woman-Owned Small Business. |
| **VOSB** | Veteran-Owned Small Business. |
| **SDVOSB** | Service-Disabled Veteran-Owned Small Business. |
| **HUBZone** | Historically Underutilized Business Zone. |

Use the **Certifications** filter to keep only companies holding one or more of these active certifications — the fastest way to build a supplier-diversity or set-aside list.

***

### 🧭 Tips for best results

- **Be specific.** A focused search term returns a fast, relevant set. Broad terms match tens of thousands of records.
- **Layer filters.** Combine a term with state + NAICS + certification for a precisely targeted list.
- **Outreach lists:** turn on *Only companies with an email* to drop records you can't contact.
- **Federal-ready leads:** turn on *Active SAM only* to keep companies eligible for contracts right now.
- **Cross-reference:** use the `uei` and `cageCode` fields to join against SAM.gov, USAspending or award data.

***

### 🔌 Integrations & export

- **Download formats:** JSON, CSV, Excel, HTML, XML, RSS.
- **CRM / Sheets / Airtable / Make / Zapier / n8n:** push results automatically after each run.
- **API:** start runs and fetch data with the Apify API or the JavaScript / Python clients.
- **Scheduling:** run weekly to keep a fresh pipeline of newly registered small businesses.

#### Run via API (example)

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR~sba-small-business-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "searchTerm": "cybersecurity", "states": ["VA"], "maxItems": 200 }'
```

***

### ❓ FAQ

**Do I need an SBA or SAM.gov account?**
No. You only need an Apify account. No API key or login is required.

**Is this the current SBA directory?**
Yes — it targets the live SBA Small Business Search that replaced the legacy DSBS.

**Why do only some companies show an SBA certification?**
Most registered small businesses are self-certified small but do not hold a formal SBA certification. Use the Certifications filter to keep only certified firms.

**Can I get thousands of companies?**
Yes, up to your Max items. Very broad terms return large result sets — narrow with filters for relevance and speed.

**Does it return duplicates?**
No. Companies are de-duplicated by entity ID / UEI within a run.

***

### ⚖️ Legal & responsible use

This actor collects **publicly available** information from the SBA Small Business Search — data small businesses publish themselves to be found for federal contracting. It does not bypass logins or access private data.

You are responsible for how you use the data. Please:

- Respect the SBA's Terms of Use and applicable law (including CAN-SPAM for outreach).
- Use the data for lawful business purposes such as sourcing, research and B2B outreach.
- Honor opt-out requests and do not use the data for spam or any purpose that infringes privacy.

If you have questions about compliance for your use case, consult a legal professional.

***

### 🛟 Support

Need a field added or hit an issue? Open a ticket from the actor's **Issues** tab and include your input configuration — most requests are quick to address.

Happy sourcing! 🇺🇸

### 📅 Changelog & Maintenance

**Last updated:** 2026-07-02 — Actor verified and maintained. Data pipeline tested for quality, structure and freshness; selectors/endpoints confirmed against the live site.

# Actor input Schema

## `searchTerm` (type: `string`):

What to look for in the SBA directory — a company name, an industry, a capability or keyword. Try 'solar panel installation', 'cybersecurity', 'janitorial services' or a NAICS code like '541512'. Tip: be specific — very broad terms return tens of thousands of records. Leave this empty to get a ready-made mixed sample of popular federal contractors across industries.

## `states` (type: `array`):

Pick one or more US states to keep only companies located there. Leave empty to include every state.

## `certifications` (type: `array`):

Keep only companies that hold at least one of the selected active SBA certifications. Leave empty to include companies with any (or no) certification.

## `activeSamOnly` (type: `boolean`):

Turn on to keep only companies with an active SAM.gov registration (eligible to win federal contracts right now).

## `requireEmail` (type: `boolean`):

Turn on to skip companies that do not publish an email address — handy when you are building an outreach list.

## `naicsCodes` (type: `array`):

Optional. Keep only companies matching one of these 6-digit NAICS industry codes (e.g. '541330', '236220'). Most people can skip this and just use the search box above. Leave empty to include all industries.

## `maxItems` (type: `integer`):

Upper limit on how many companies to save. Use 0 for no limit. A value around 100 keeps runs fast and cheap.

## `proxyConfiguration` (type: `object`):

Proxy configuration. The default Apify Proxy (US datacenter) works well for this source.

## Actor input object example

```json
{
  "searchTerm": "solar panel installation",
  "activeSamOnly": false,
  "requireEmail": false,
  "naicsCodes": [
    "541330",
    "541512"
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `legalBusinessName` (type: `string`):

Legal business name

## `dbaName` (type: `string`):

Doing-business-as name

## `email` (type: `string`):

Contact email

## `phone` (type: `string`):

Contact phone

## `fax` (type: `string`):

Fax

## `contactPerson` (type: `string`):

Primary contact

## `website` (type: `string`):

Company website

## `city` (type: `string`):

City

## `state` (type: `string`):

State

## `zipCode` (type: `string`):

ZIP code

## `county` (type: `string`):

County

## `address1` (type: `string`):

Street address

## `congressionalDistrict` (type: `string`):

Congressional district

## `uei` (type: `string`):

Unique Entity ID (SAM.gov)

## `cageCode` (type: `string`):

CAGE code

## `entityId` (type: `string`):

SBA entity detail ID

## `naicsPrimary` (type: `string`):

Primary NAICS code

## `naicsAllCodes` (type: `string`):

All NAICS codes

## `certifications` (type: `string`):

Active SBA certifications

## `is8a` (type: `string`):

Active 8(a) certification

## `isWosb` (type: `string`):

Active WOSB certification

## `isEdwosb` (type: `string`):

Active EDWOSB certification

## `isVosb` (type: `string`):

Active VOSB certification

## `isSdvosb` (type: `string`):

Active SDVOSB certification

## `isHubzone` (type: `string`):

Active HUBZone certification

## `selfCertifiedSmall` (type: `string`):

Self-certified small business

## `legalStructure` (type: `string`):

Legal structure

## `yearEstablished` (type: `string`):

Year established

## `currentPrincipals` (type: `string`):

Current principals

## `capabilitiesNarrative` (type: `string`):

Capabilities narrative

## `capabilitiesLink` (type: `string`):

Capabilities statement link

## `keywords` (type: `string`):

Business keywords

## `exporterStatus` (type: `string`):

Exporter status

## `samActive` (type: `string`):

Active SAM.gov registration

## `lastUpdated` (type: `string`):

Profile last-updated date

## `searchTerm` (type: `string`):

Search used

## `scrapedAt` (type: `string`):

Extraction timestamp

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerm": "solar panel installation",
    "naicsCodes": [
        "541330",
        "541512"
    ],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/sba-small-business-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerm": "solar panel installation",
    "naicsCodes": [
        "541330",
        "541512",
    ],
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/sba-small-business-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerm": "solar panel installation",
  "naicsCodes": [
    "541330",
    "541512"
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/sba-small-business-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=haketa/sba-small-business-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pTWUBn9HJ8j54OGPt/builds/dM711RA8RPEWtkuWw/openapi.json
