# USDA BioPreferred Program Catalog Scraper (`tehsnarf/usda-biopreferred-program-catalog`) Actor

Scrapes the official USDA BioPreferred Program catalog: product name/description, company, USDA Certified Biobased status, mandatory federal purchasing category flag, and full 2-level category hierarchy, across any/all of the catalog's 276 sub-categories.

- **URL**: https://apify.com/tehsnarf/usda-biopreferred-program-catalog.md
- **Developed by:** [Chris Hoover](https://apify.com/tehsnarf) (community)
- **Categories:** Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## USDA BioPreferred Program Catalog Scraper

Scrapes the official [USDA BioPreferred Program](https://www.biopreferred.gov) product catalog —
the federal government's authoritative list of biobased products, including which products carry
the official "USDA Certified Biobased" label and which fall into a mandatory federal purchasing
product category. Covers all 276 sub-categories (26 top-level groups) in the live catalog.

### Use cases

1. **Federal contractors / procurement teams** checking which products in a category qualify for
   mandatory federal biobased purchasing requirements before sourcing decisions.
2. **Sustainability / market researchers** tracking the biobased-products market: which companies
   and product categories are represented, and at what certification rate.
3. **Competitive intelligence for biobased brands** — see which competitors are listed in a given
   category and whether they hold the official USDA Certified Biobased label.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `categories` | array of strings | `[]` (all) | Sub-category names to scrape, e.g. `["Baby Wipes", "Diapers"]`. Leave empty to scrape all 276 sub-categories. |
| `maxItems` | integer | 500 | Cap on total products scraped across the run. |
| `delaySeconds` | number | 1.0 | Polite delay before each category request. |
| `concurrency` | integer | 5 | How many categories are fetched at once. |

### Output fields

| Field | Type | Description |
|---|---|---|
| `productName` | string | Product name as listed in the catalog |
| `productDescription` | string | Manufacturer-provided description |
| `companyName` | string | Manufacturer/company name |
| `usdaCertifiedBiobased` | boolean | Carries the official "USDA Certified Biobased" label |
| `mandatoryFederalPurchasing` | boolean | In a mandatory federal purchasing product category |
| `topCategory` | string | Top-level category group (e.g. "Baby And Kids") |
| `subCategory` | string | Specific sub-category scraped (e.g. "Diapers") |

**Not available from this data source** (checked directly against the live catalog, not assumed):
there is no company website, no per-product details URL, and no structured biobased-content
percentage field in the catalog's product table — only a plain product name/description and
company name per row, plus the two certification badges above.

### Example output

```json
{
  "productName": "SKILCRAFT Enviro Care Glass Cleaner",
  "productDescription": "GREEN SEAL APPROVED! A concentrated solution that leaves windows, mirrors, and all other polished surfaces squeaky clean and free of streaks and hard water deposits. Highly effective, even on heavily soiled surfaces.",
  "companyName": "Lighthouse for the Blind - St. Louis",
  "usdaCertifiedBiobased": true,
  "mandatoryFederalPurchasing": true,
  "topCategory": "Custodial Services",
  "subCategory": "Cleaning Supplies"
}
```

### How it works

The live catalog is a JSF/PrimeFaces single-page app with no per-category or per-product URLs —
browsing happens through AJAX postbacks. This Actor discovers the full category hierarchy from
the catalog's initial page load, then replicates the same AJAX postback per sub-category to pull
that category's complete product table in one request (no pagination exists on the target, even
for a 500+ item category). Rate-limited with a configurable delay and bounded concurrency.

### Pricing

Recommended: **$5–$8 per 1,000 results**.

| Results | Estimated cost |
|---|---|
| 100 | $0.50–$0.80 |
| 500 | $2.50–$4.00 |
| 1,000 | $5.00–$8.00 |
| 5,000 | $25.00–$40.00 |

# Actor input Schema

## `categories` (type: `array`):

Sub-category names to scrape (e.g. "Baby Wipes", "Diapers"). Leave empty to scrape all 276 discovered sub-categories.

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

Maximum number of products to scrape across the whole run

## `delaySeconds` (type: `number`):

Polite delay each fetch waits before requesting a category's product table

## `concurrency` (type: `integer`):

How many category pages to fetch at once (each still waits delaySeconds before requesting)

## Actor input object example

```json
{
  "categories": [],
  "maxItems": 500,
  "delaySeconds": 1,
  "concurrency": 5
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("tehsnarf/usda-biopreferred-program-catalog").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("tehsnarf/usda-biopreferred-program-catalog").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call tehsnarf/usda-biopreferred-program-catalog --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tehsnarf/usda-biopreferred-program-catalog"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qIQQfIhYxhuiM2zek/builds/3T74YvtmYt2uEhiGt/openapi.json
