# Regulations.gov Comments — Full-Text Extractor (`bikram07/regulations-gov-comments`) Actor

Extract the FULL TEXT of public comments on US federal rulemaking dockets from Regulations.gov — not just metadata. Get who is arguing for or against a rule, in their own words. Filter by docket, search term, or date. Zero-config returns recent comments with body text. Official US gov API.

- **URL**: https://apify.com/bikram07/regulations-gov-comments.md
- **Developed by:** [Bikram](https://apify.com/bikram07) (community)
- **Categories:** News, Automation, Developer tools
- **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 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

## Regulations.gov Comments — Full-Text Extractor

Extract the **full text of public comments** submitted on U.S. federal rulemaking dockets, straight from the official **[Regulations.gov API v4](https://open.gsa.gov/api/regulationsgov/)**. When a federal agency proposes a rule, the public — companies, trade associations, advocacy groups, individuals — files comments arguing for or against it. This actor pulls those comments and, crucially, **the actual words people wrote**, not just the titles.

Run it with **zero configuration** to get recent comments (last 30 days) complete with their body text.

### The wedge — body text, not just metadata

Every other Regulations.gov scraper and the API's own `/comments` list endpoint return **metadata only**: comment id, agency, posted date, and a title like *"Comment from Anonymous."* The thing you actually want — *what the comment says* — is hidden behind a separate per-comment detail call.

**This actor makes that detail call for you.** For each comment it fetches `/comments/{id}`, reads `attributes.comment`, decodes the HTML entities, and hands you clean plain text. That is the entire differentiator: you get the argument, the citation, the lobbying position — in the commenter's own words.

### Why this matters

Public comments are the raw material of regulatory intelligence:

- **Government affairs & lobbying** — see exactly which firms and trade groups are arguing for or against a proposed rule, and what they're claiming, before the final rule drops.
- **Legal & compliance** — read the substantive objections to a rule to anticipate litigation angles and the agency's likely response in the final rule.
- **Policy research & journalism** — quantify support vs. opposition, surface mass-comment campaigns, quote real submissions.
- **Competitive intelligence** — track when competitors file comments and what positions they take on rules that affect your industry.
- **AI / LLM pipelines** — feed full comment text into summarization, stance detection, or entity extraction over MCP.

### Input

Every field is optional. **Empty input `{}` returns recent comments (last 30 days) with body text.**

| Field | Type | Default | Description |
|---|---|---|---|
| `searchTerm` | string | `""` | Full-text search across comments, e.g. `menthol cigarettes`. Blank = most recent comments across all dockets. |
| `docketId` | string | `""` | Restrict to one rulemaking docket, e.g. `FDA-2025-P-7321`. Cross-sells with the **Federal Register Monitor** actor, which outputs docketIds. |
| `postedAfter` | string | `30 days ago` | Only comments posted on or after this `YYYY-MM-DD` date. |
| `fetchBody` | boolean | `true` | **The differentiator.** ON = one extra request per comment to pull the real body text. OFF = metadata only (faster, no per-comment calls). |
| `apiKey` | string | `DEMO_KEY` | Regulations.gov API key. `DEMO_KEY` works with no signup but is rate-limited. See below. |
| `maxComments` | integer | `50` | Max comments to output. Kept low because `DEMO_KEY` is rate-limited and each body needs its own request. |

#### Zero-config (recent comments, last 30 days, with body text)

```json
{}
````

#### By docket (everything filed on one rule)

```json
{ "docketId": "FDA-2025-P-7321", "maxComments": 200 }
```

#### By topic

```json
{ "searchTerm": "net neutrality", "postedAfter": "2026-01-01", "maxComments": 100 }
```

### Get a free API key for higher limits (recommended)

The default `DEMO_KEY` works with **no signup**, but it shares a heavily-used, low rate-limit bucket (only a handful of requests per hour). Because fetching each comment body costs one request, `DEMO_KEY` runs are best kept small — and the actor will **warn you and suggest a key** if it hits the limit (HTTP 429), returning whatever it managed to fetch.

To unlock **1,000 requests/hour**:

1. Go to **[api.data.gov/signup](https://api.data.gov/signup/)** and enter your name + email.
2. The key is emailed **instantly** — no approval wait, no cost.
3. Paste it into the `apiKey` input.

That's enough to pull hundreds of full-text comments per run.

### Output

One dataset item per comment:

| Field | Type | Description |
|---|---|---|
| `commentId` | string | Regulations.gov comment/document id, e.g. `FDA-2025-P-7321-3668`. |
| `docketId` | string | null | Parent rulemaking docket id. |
| `documentId` | string | null | The comment's own document id (same as `commentId`). |
| `agencyId` | string | null | Issuing agency acronym, e.g. `EPA`, `FDA`, `FTC`. |
| `title` | string | null | Comment title (often `Comment from <name>`). |
| `postedDate` | string | null | ISO date the comment was posted. |
| `receivedDate` | string | null | ISO date the agency received it. |
| `commentText` | string | null | **The actual comment body**, HTML-decoded to plain text. |
| `submitterName` | string | null | `First Last` when the submitter provided it. |
| `organization` | string | null | Submitter's organization, when provided. |
| `govAgencyType` | string | null | Government agency type, when the submitter is a gov body. |
| `attachmentUrls` | string\[] | URLs to PDF/doc attachments. **URLs only — contents are not downloaded.** |
| `withdrawn` | boolean | null | Whether the comment was withdrawn. |
| `commentUrl` | string | Public Regulations.gov page for the comment. |
| `scrapedAt` | string | ISO-8601 UTC timestamp of extraction. |

Missing values are `null` — never fabricated.

### What this actor is NOT

- It does **not** download or parse PDF/Word **attachment contents**. When a comment is just *"See attached file(s),"* the text is in a PDF — this actor gives you the `attachmentUrls` so you can fetch them yourself, but it does not OCR or extract them.
- It is **not** a private database. Everything it returns is **public record** published by the U.S. federal government on Regulations.gov. It performs no scraping, login, or circumvention — only authenticated calls to the official API.
- It does **not** post, submit, or modify comments. Read-only.

### Source

Official U.S. government data via the **[Regulations.gov API v4](https://open.gsa.gov/api/regulationsgov/)** (`https://api.regulations.gov/v4/`). Public rulemaking comments are federal public records.

### Pairs well with

- **Federal Register Monitor** — surfaces new proposed rules and their `docketId`s; pipe those docketIds into this actor to read what the public is saying about each one.

# Actor input Schema

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

Full-text search across comments. Example: <b>net neutrality</b> or <b>menthol cigarettes</b>. Leave blank to get the most recent comments across all dockets.

## `docketId` (type: `string`):

Restrict to one rulemaking docket. Example: <b>FDA-2025-P-7321</b> or <b>EPA-HQ-OAR-2021-0317</b>. Cross-sells with the Federal Register Monitor actor, which outputs docketIds. Leave blank to search all dockets.

## `postedAfter` (type: `string`):

Only return comments posted on or after this date. Format <b>YYYY-MM-DD</b>. Defaults to 30 days ago when left blank.

## `fetchBody` (type: `boolean`):

The differentiator. When ON (default), an extra detail request is made per comment to pull the actual comment text. Turn OFF to return metadata only (faster, no per-comment calls, but no body text).

## `apiKey` (type: `string`):

Defaults to <b>DEMO\_KEY</b> (works with no signup, but ~30 requests/hour). Get a free instant key at <a href='https://api.data.gov/signup/' target='_blank'>api.data.gov/signup</a> for 1,000 requests/hour — paste it here to extract more comments per run.

## `maxComments` (type: `integer`):

Maximum number of comments to output. Kept low by default because DEMO\_KEY is rate-limited and each comment body needs its own request. Raise it after adding a free api.data.gov key.

## Actor input object example

```json
{
  "fetchBody": true,
  "apiKey": "DEMO_KEY",
  "maxComments": 50
}
```

# 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": "",
    "docketId": "",
    "postedAfter": "",
    "apiKey": "DEMO_KEY",
    "maxComments": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("bikram07/regulations-gov-comments").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": "",
    "docketId": "",
    "postedAfter": "",
    "apiKey": "DEMO_KEY",
    "maxComments": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("bikram07/regulations-gov-comments").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": "",
  "docketId": "",
  "postedAfter": "",
  "apiKey": "DEMO_KEY",
  "maxComments": 50
}' |
apify call bikram07/regulations-gov-comments --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=bikram07/regulations-gov-comments",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Regulations.gov Comments — Full-Text Extractor",
        "description": "Extract the FULL TEXT of public comments on US federal rulemaking dockets from Regulations.gov — not just metadata. Get who is arguing for or against a rule, in their own words. Filter by docket, search term, or date. Zero-config returns recent comments with body text. Official US gov API.",
        "version": "0.1",
        "x-build-id": "FjcxxPlUOQwrxpKye"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/bikram07~regulations-gov-comments/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-bikram07-regulations-gov-comments",
                "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/bikram07~regulations-gov-comments/runs": {
            "post": {
                "operationId": "runs-sync-bikram07-regulations-gov-comments",
                "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/bikram07~regulations-gov-comments/run-sync": {
            "post": {
                "operationId": "run-sync-bikram07-regulations-gov-comments",
                "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": {
                    "searchTerm": {
                        "title": "Search term (optional)",
                        "type": "string",
                        "description": "Full-text search across comments. Example: <b>net neutrality</b> or <b>menthol cigarettes</b>. Leave blank to get the most recent comments across all dockets."
                    },
                    "docketId": {
                        "title": "Docket ID (optional)",
                        "type": "string",
                        "description": "Restrict to one rulemaking docket. Example: <b>FDA-2025-P-7321</b> or <b>EPA-HQ-OAR-2021-0317</b>. Cross-sells with the Federal Register Monitor actor, which outputs docketIds. Leave blank to search all dockets."
                    },
                    "postedAfter": {
                        "title": "Posted after (YYYY-MM-DD, optional)",
                        "type": "string",
                        "description": "Only return comments posted on or after this date. Format <b>YYYY-MM-DD</b>. Defaults to 30 days ago when left blank."
                    },
                    "fetchBody": {
                        "title": "Fetch full comment body",
                        "type": "boolean",
                        "description": "The differentiator. When ON (default), an extra detail request is made per comment to pull the actual comment text. Turn OFF to return metadata only (faster, no per-comment calls, but no body text).",
                        "default": true
                    },
                    "apiKey": {
                        "title": "Regulations.gov API key (optional)",
                        "type": "string",
                        "description": "Defaults to <b>DEMO_KEY</b> (works with no signup, but ~30 requests/hour). Get a free instant key at <a href='https://api.data.gov/signup/' target='_blank'>api.data.gov/signup</a> for 1,000 requests/hour — paste it here to extract more comments per run.",
                        "default": "DEMO_KEY"
                    },
                    "maxComments": {
                        "title": "Max comments",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of comments to output. Kept low by default because DEMO_KEY is rate-limited and each comment body needs its own request. Raise it after adding a free api.data.gov key.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
