Call the hosted Federal Register Scraper from Python using the official apify-client.
pip install apify-clientfrom apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("logiover/federal-register-scraper").call(run_input={
"query": "clean air",
"agencies": ["environmental-protection-agency"],
"types": ["RULE", "PRORULE"],
"dateFrom": "2024-01-01",
"dateTo": "2024-12-31",
"maxResults": 500,
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(f"Got {len(items)} documents")
for x in items[:10]:
print(x["publicationDate"], x["type"], x["title"])import pandas as pd
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("logiover/federal-register-scraper").call(run_input={
"types": ["RULE"],
"dateFrom": "2024-01-01",
"maxResults": 5000,
})
df = pd.DataFrame(client.dataset(run["defaultDatasetId"]).list_items().items)
print(df["agencies"].value_counts().head(10))citations = [f'{x["title"]} — {x["citation"]}' for x in items if x.get("citation")]
print("\n".join(citations))- Get your token from the Apify Console.
- Every field is optional; empty input returns the most recent documents.
- Full field reference: see the main README.