# GSA eLibrary Scraper (`parseforge/gsa-elibrary-scraper`) Actor

Scrape government contract listings from GSA eLibrary. Extract contract details including agency, category, sin, price, and availability.

- **URL**: https://apify.com/parseforge/gsa-elibrary-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Automation, Other, Lead generation
- **Stats:** 22 total users, 2 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## 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 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

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## GSA eLibrary Contract Scraper

> **Collect GSA contract and schedule data from GSA eLibrary in minutes.** Filter by category or paste any eLibrary URL. Export contractor info, rates, contact details, and contract numbers. No coding, no GSA account required.

The **GSA eLibrary Contract Scraper** collects government contractor data from GSA's eLibrary, returning **20+ fields per contractor**: company name, contract number, schedule, SIN codes, rates, contact person, phone, email, address, and socioeconomic status. Runs support up to 1,000,000 records on a paid plan.

The Actor supports two input modes: direct eLibrary URL and category filter. Optional detail-page fetching adds granular rate tables and contract specifics.

### What the GSA eLibrary Scraper does

URL or category input with optional details:

- **URL mode.** Paste any GSA eLibrary search or listing URL.
- **Category filter.** Select from predefined GSA categories.
- **Detail page toggle.** Fetch full rate tables and contract specifics per contractor.

Each record includes company name, contract number, schedule, SIN codes, contractor address, contact person, phone, email, socioeconomic status, and contract dates.

### 📊 Data fields

Each record includes: `address`, `call`, `catalogLinks`, `contractNumber`, `contractor`, `contractorInformationUrl`, `currentOptionPeriodEndDate`, `email`, `epls`, `govtPocEmail`, `govtPocName`, `govtPocPhoneNumber`, `samUei`, `socioEconomic`, `termsConditions`, `title`, `webAddress`. All 17 field names come from a real production run, so what you see here is what lands in your dataset.

> ⚠️ **Good to Know:** GSA eLibrary is the official source for GSA Schedule contractor data. Enabling `includeDetails` fetches rate tables and full contract info per contractor, which is slower but much richer.

### How to use

1. **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. **Open the Actor.** Go to the GSA eLibrary Contract Scraper page on the Apify Store.
3. **Set input.** Pick a category or paste an eLibrary URL. Set maxItems.
4. **Run it.** Click **Start** and let the Actor collect your data.
5. **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

### Recommended Actors

- [**FINRA BrokerCheck Scraper**](https://apify.com/parseforge/finra-brokercheck-scraper) - Broker and firm regulatory data
- [**NPI/NPPES Scraper**](https://apify.com/parseforge/npi-nppes-scraper) - Healthcare provider registry
- [**Wyoming Business Scraper**](https://apify.com/parseforge/wyoming-business-scraper) - Business entity filings
- [**CSLB California Scraper**](https://apify.com/parseforge/cslb-california-scraper) - California contractor licenses
- [**TDLR Texas Scraper**](https://apify.com/parseforge/tdlr-texas-scraper) - Texas licensed professionals

> **Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the General Services Administration (GSA) or the U.S. federal government. All trademarks mentioned are the property of their respective owners. Only publicly available eLibrary data is collected.

### 🆘 Need Help?

If you hit a bug, have questions about setup, or need a scraper we haven't built yet, open our [contact form](https://tally.so/r/BzdKgA) or write to parseforge@protonmail.com. We also take on paid custom data projects.

For faster answers, join our [Discord](https://parseforge.co/discord). It's the best place to get support and suggest new actors.

# Actor input Schema

## `startUrl` (type: `string`):

GSA eLibrary URL to start scraping from. Use this for custom searches or specific URLs. Supports search results URLs (searchResults.do), SIN details URLs (sinDetails.do), or contractor list URLs (contractorList.do). IMPORTANT: You must choose EITHER startUrl OR category, not both. These options are mutually exclusive.

## `category` (type: `array`):

Select one or more predefined categories to scrape contractors from specific service areas. Choose 'All Categories' to scrape from all predefined categories. This will automatically generate the appropriate GSA eLibrary URLs for easy category-based scraping. IMPORTANT: You must choose EITHER category OR startUrl, not both. These options are mutually exclusive.

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

How many contractors to collect per run.

## `includeDetails` (type: `boolean`):

When false (default): Only extracts data from listing pages (faster, less detailed). When true: Visits each contractor's detail page to get comprehensive information (slower, more detailed). See README for details on what data is available from listing vs detail pages.

## Actor input object example

```json
{
  "category": [
    "all"
  ],
  "maxItems": 1
}
```

# Actor output Schema

## `contracts` (type: `string`):

Complete dataset with all scraped contract and schedule data including contractor information, contact details, contract specifications, and pricing

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

Overview view of contracts with key fields displayed in a table format

# 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 = {
    "category": [
        "all"
    ],
    "maxItems": 1,
    "includeDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/gsa-elibrary-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 = {
    "category": ["all"],
    "maxItems": 1,
    "includeDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/gsa-elibrary-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 '{
  "category": [
    "all"
  ],
  "maxItems": 1,
  "includeDetails": false
}' |
apify call parseforge/gsa-elibrary-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/CB7yWHtFIUDH9oyTm/builds/EhMh0L1gYZaXAZh3q/openapi.json
