# GSA eLibrary Contractor Scraper (`automation-lab/gsa-elibrary-contractor-scraper`) Actor

Extract GSA eLibrary contractor profiles with contract numbers, schedules, SINs, SAM UEI, contacts, websites, and addresses.

- **URL**: https://apify.com/automation-lab/gsa-elibrary-contractor-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## GSA eLibrary Contractor Scraper

Extract GSA eLibrary contractor profiles by keyword or URL.

Use this actor to build GovCon lead lists, enrich SAM.gov workflows, monitor schedule-holder markets, and export contractor contact data from public GSA eLibrary pages.

### What does GSA eLibrary Contractor Scraper do?

GSA eLibrary Contractor Scraper searches the public GSA eLibrary contractor directory and saves structured contractor records.

It can start from keywords such as `cybersecurity`, `cloud computing`, or `janitorial`, or from direct GSA eLibrary search and contractor URLs.

For each contractor it can collect contract numbers, schedule information, SINs, address, phone, email, website, SAM UEI, NAICS, socioeconomic categories, contract dates, and source URLs.

### Who is it for?

- 🧑‍💼 GovCon business development teams building subcontractor and partner lists.
- 📊 Procurement analysts mapping GSA schedule holder markets.
- 🧾 Capture managers researching competitors by service keyword or SIN.
- 🧠 Lead generation agencies enriching government contractor databases.
- 🔁 RevOps teams scheduling repeat contractor refreshes in Apify.

### Why use it?

GSA eLibrary pages are public but hard to export at scale.

This actor turns those pages into clean JSON, CSV, Excel, API, webhook, and integration-ready datasets.

You can run it once for quick research or schedule it to monitor contractor markets over time.

### How it works

1. Provide one or more search keywords or GSA eLibrary URLs.
2. The actor requests public `searchResults.do` pages.
3. It parses contractor detail links.
4. If detail enrichment is enabled, it fetches `contractorInfo.do` pages.
5. It saves one dataset row per contractor.

### Input options

| Field | Type | Description |
| --- | --- | --- |
| `searchTexts` | string[] | Keywords to search in GSA eLibrary. |
| `startUrls` | URL[] | Direct GSA eLibrary search or contractor URLs. |
| `maxItems` | number | Maximum contractor records to save. |
| `enrichDetails` | boolean | Fetch contractor profile pages for contacts and SINs. |
| `requestDelayMs` | number | Polite delay between detail requests. |

### Example input

```json
{
  "searchTexts": ["cybersecurity"],
  "maxItems": 25,
  "enrichDetails": true,
  "requestDelayMs": 250
}
````

### Output data

| Field | Description |
| --- | --- |
| `query` | Search keyword that produced the record. |
| `contractorName` | Contractor name from GSA eLibrary. |
| `contractNumber` | GSA contract number. |
| `schedule` | Schedule code such as MAS. |
| `scheduleTitle` | Schedule title when available. |
| `sin` | Comma-separated SIN list. |
| `sinTitles` | SIN descriptions. |
| `address` | Contractor address. |
| `phone` | Contractor phone. |
| `email` | Contractor email. |
| `website` | Contractor website. |
| `samUei` | SAM Unique Entity ID. |
| `naics` | NAICS code. |
| `socioEconomic` | Socioeconomic designations. |
| `currentOptionPeriodEndDate` | Current option period end date. |
| `ultimateContractEndDate` | Ultimate contract end date. |
| `governmentPocEmail` | Government POC email when shown. |
| `termsAndConditionsUrl` | Price list / terms URL when shown. |
| `detailUrl` | GSA eLibrary contractor profile URL. |
| `sourceUrl` | Search URL or source URL. |
| `scrapedAt` | ISO timestamp. |

### Example output

```json
{
  "query": "cybersecurity",
  "contractorName": "ADVANCED CYBERSECURITY EXPERTS LLC",
  "contractNumber": "47QTCA24D0082",
  "schedule": "MAS",
  "sin": "518210C, 54151HACS, 54151S, OLM",
  "address": "309 BRIARWOOD DR, LEANDER, TX 78641-8077",
  "phone": "254-458-0014",
  "email": "matt@example.com",
  "samUei": "J866DLWCTSG8",
  "detailUrl": "https://www.gsaelibrary.gsa.gov/ElibMain/contractorInfo.do?...",
  "scrapedAt": "2026-06-24T04:08:14.321Z"
}
```

### How much does it cost to scrape GSA eLibrary contractors?

This actor uses pay-per-event pricing.

You pay a small start fee plus a per-contractor record fee.

Use `maxItems` to control cost during testing.

Start with 10–25 contractors, inspect the dataset, then scale up.

### Search tips

- Use procurement nouns such as `cybersecurity`, `cloud`, `logistics`, `janitorial`, `construction`, or `IT services`.
- Use exact product or service phrases when researching a narrow market.
- Keep `enrichDetails` enabled when you need contacts, SINs, SAM UEI, and NAICS.
- Increase `requestDelayMs` for very large runs.
- Use direct GSA eLibrary URLs when you already have a filtered search page.

### Integrations

Send contractor records to:

- Google Sheets for quick lead review.
- Airtable for GovCon pipeline tracking.
- Salesforce or HubSpot through Apify integrations.
- Snowflake, BigQuery, or S3 for procurement intelligence.
- Webhooks for automated enrichment workflows.

### API usage

#### Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/gsa-elibrary-contractor-scraper').call({
  searchTexts: ['cybersecurity'],
  maxItems: 25,
  enrichDetails: true
});
console.log(run.defaultDatasetId);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/gsa-elibrary-contractor-scraper').call(run_input={
    'searchTexts': ['cybersecurity'],
    'maxItems': 25,
    'enrichDetails': True,
})
print(run['defaultDatasetId'])
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~gsa-elibrary-contractor-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTexts":["cybersecurity"],"maxItems":25,"enrichDetails":true}'
```

### MCP usage

Use the Apify MCP server with Claude Code or Claude Desktop.

MCP URL:

```text
https://mcp.apify.com/?tools=automation-lab/gsa-elibrary-contractor-scraper
```

Claude Code setup:

```bash
claude mcp add apify-gsa-elibrary https://mcp.apify.com/?tools=automation-lab/gsa-elibrary-contractor-scraper
```

Claude Desktop JSON config:

```json
{
  "mcpServers": {
    "apify-gsa-elibrary": {
      "url": "https://mcp.apify.com/?tools=automation-lab/gsa-elibrary-contractor-scraper"
    }
  }
}
```

Example prompts:

- "Find 50 GSA eLibrary cybersecurity contractors and summarize the top SINs."
- "Scrape cloud computing schedule holders and export contractor emails."
- "Monitor GSA eLibrary logistics contractors weekly and alert me about new records."

### Scheduling

Create an Apify schedule to refresh a keyword every week or month.

For repeat market monitoring, use stable inputs and compare dataset exports over time.

### Data quality notes

The actor extracts data as published by GSA eLibrary.

Some contractors may omit websites, emails, or optional metadata.

Use `detailUrl` to verify any record in the public source.

### Legality

This actor reads public GSA eLibrary pages.

You are responsible for using the data lawfully, respecting applicable terms, and complying with privacy, procurement, and outreach rules.

Do not use extracted contacts for unlawful spam or prohibited solicitation.

### FAQ

#### Can I scrape by SIN?

Use a GSA eLibrary URL that already reflects your SIN/category filtering, or search by a SIN-related service keyword.

#### Does it require a GSA account?

No. The actor reads public GSA eLibrary search and contractor detail pages.

### Troubleshooting

#### Why did I get fewer contractors than expected?

The keyword may only show a small set of contractor links on the public result page. Try a broader keyword or direct filtered GSA eLibrary URL.

#### Why are some contact fields missing?

GSA eLibrary pages do not always publish every optional field. The actor leaves unavailable values empty rather than inventing data.

#### Should I disable detail enrichment?

Disable it only when you need fast search-level records. Keep it enabled for address, email, website, SAM UEI, NAICS, and SIN enrichment.

### Related scrapers

- https://apify.com/automation-lab/samgov-government-contracts-scraper
- https://apify.com/automation-lab/government-contracts-multi-source-monitor

### Changelog

- Initial version: keyword and URL-based GSA eLibrary contractor extraction with detail enrichment.

### Support

Open an Apify issue if a GSA eLibrary page changes or if you need additional fields from the public contractor profile.

# Actor input Schema

## `searchTexts` (type: `array`):

Keywords to search in GSA eLibrary, such as cybersecurity, cloud computing, janitorial, logistics, or a product/service phrase.

## `startUrls` (type: `array`):

Optional GSA eLibrary searchResults.do or contractorInfo.do URLs to scrape directly.

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

Maximum contractor records to save across all searches and URLs.

## `enrichDetails` (type: `boolean`):

Fetch each contractor profile page to add address, phone, email, website, SAM UEI, NAICS, SINs, and contract dates.

## `requestDelayMs` (type: `integer`):

Polite delay between contractor detail requests. Increase if GSA eLibrary responds slowly.

## Actor input object example

```json
{
  "searchTexts": [
    "cybersecurity"
  ],
  "startUrls": [],
  "maxItems": 20,
  "enrichDetails": true,
  "requestDelayMs": 250
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "searchTexts": [
        "cybersecurity"
    ],
    "startUrls": [],
    "maxItems": 20,
    "enrichDetails": true,
    "requestDelayMs": 250
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/gsa-elibrary-contractor-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 = {
    "searchTexts": ["cybersecurity"],
    "startUrls": [],
    "maxItems": 20,
    "enrichDetails": True,
    "requestDelayMs": 250,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/gsa-elibrary-contractor-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 '{
  "searchTexts": [
    "cybersecurity"
  ],
  "startUrls": [],
  "maxItems": 20,
  "enrichDetails": true,
  "requestDelayMs": 250
}' |
apify call automation-lab/gsa-elibrary-contractor-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/gsa-elibrary-contractor-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GSA eLibrary Contractor Scraper",
        "description": "Extract GSA eLibrary contractor profiles with contract numbers, schedules, SINs, SAM UEI, contacts, websites, and addresses.",
        "version": "0.1",
        "x-build-id": "bwqBqhDAMZaTQbtHu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~gsa-elibrary-contractor-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-gsa-elibrary-contractor-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~gsa-elibrary-contractor-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-gsa-elibrary-contractor-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~gsa-elibrary-contractor-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-gsa-elibrary-contractor-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchTexts": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "Keywords to search in GSA eLibrary, such as cybersecurity, cloud computing, janitorial, logistics, or a product/service phrase.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Direct GSA eLibrary URLs",
                        "type": "array",
                        "description": "Optional GSA eLibrary searchResults.do or contractorInfo.do URLs to scrape directly.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Maximum contractors",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum contractor records to save across all searches and URLs.",
                        "default": 20
                    },
                    "enrichDetails": {
                        "title": "Enrich from contractor detail pages",
                        "type": "boolean",
                        "description": "Fetch each contractor profile page to add address, phone, email, website, SAM UEI, NAICS, SINs, and contract dates.",
                        "default": true
                    },
                    "requestDelayMs": {
                        "title": "Delay between detail requests (ms)",
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Polite delay between contractor detail requests. Increase if GSA eLibrary responds slowly.",
                        "default": 250
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
