# USCIS H-1B Employer Data Hub Scraper (`jungle_synthesizer/uscis-h1b-employer-data-hub-scraper`) Actor

Bulk USCIS H-1B petition approvals and denials by employer and fiscal year, straight from the official Employer Data Hub.

- **URL**: https://apify.com/jungle\_synthesizer/uscis-h1b-employer-data-hub-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Lead generation, Jobs, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 record scrapeds

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

## USCIS H-1B Employer Data Hub Scraper

Collect H-1B petition approval and denial counts from the official [USCIS H-1B Employer Data Hub](https://www.uscis.gov/tools/reports-and-studies/h-1b-employer-data-hub). Returns initial and continuing approvals/denials per employer, per fiscal year, along with NAICS code, masked tax ID, and location — covering fiscal years 2009 through 2023 (roughly 832,000 records).

This is USCIS's own adjudication data — who actually got approved or denied — not the Department of Labor's LCA wage-attestation filings that most other H-1B datasets are built from. If you want approval rates by employer, this is the source that has them.

### USCIS H-1B Employer Data Hub Scraper Features

- Pulls every published fiscal year in one run, or a specific set you choose
- Returns initial and continuing approval/denial counts separately — enough to compute an employer's approval rate for any given year
- Includes NAICS industry code, masked tax ID, and employer city/state/ZIP for every record
- Auto-detects new fiscal years as USCIS publishes them — no waiting on an update to get the latest data
- Handles USCIS's own header-naming inconsistencies across years so every record comes out in the same shape, whether it's from FY2009 or FY2023
- Employer name is `null` on records where USCIS itself suppresses it for privacy (very low petition counts) — the counts are still returned

### What Can You Do With USCIS H-1B Employer Data Hub Data?

- **Immigration attorneys** — set realistic client expectations by pulling an employer's historical approval rate before filing
- **Foreign workers evaluating offers** — compare a prospective employer's approval/denial history against competitors before accepting
- **Recruiters and staffing agencies** — screen client companies for H-1B sponsorship reliability, not just whether they've filed before
- **Researchers and journalists** — analyze approval trends by industry (NAICS), state, or year across a 15-year window
- **Compliance and HR teams** — benchmark your own company's approval rate against peers in the same NAICS code

### How USCIS H-1B Employer Data Hub Scraper Works

1. Pick which fiscal years you want, or leave it blank for everything USCIS has published.
2. The actor fetches each fiscal year's dataset from USCIS and normalizes the records into one consistent schema — USCIS has renamed its own column headers more than once since 2009, and that gets ironed out here.
3. Records save to your dataset as they're processed, so a capped run (via `maxItems`) still returns clean, complete rows rather than a partial file.

### Input

```json
{
  "maxItems": 15,
  "fiscalYears": ["2022", "2023"]
}
```

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `maxItems` | Integer | 15 | Maximum number of records to collect across all selected fiscal years |
| `fiscalYears` | Array of strings | (all years) | Fiscal years to include, e.g. `["2022", "2023"]`. Leave empty to collect every fiscal year USCIS has published |

### USCIS H-1B Employer Data Hub Scraper Output Fields

```json
{
  "fiscalYear": "2023",
  "employerName": "1 800 CONTACTS INC",
  "taxIdMasked": "1643",
  "naicsCode": "42",
  "petitionerCity": "DRAPER",
  "petitionerState": "UT",
  "petitionerZip": "84020",
  "initialApprovals": 0,
  "initialDenials": 0,
  "continuingApprovals": 1,
  "continuingDenials": 0,
  "sourceFile": "h1b_datahubexport-2023.csv"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `fiscalYear` | String | USCIS fiscal year the record covers |
| `employerName` | String | Petitioning employer name (`null` when USCIS suppresses it for low counts) |
| `taxIdMasked` | String | Employer tax ID, masked/truncated as published by USCIS |
| `naicsCode` | String | Employer industry NAICS code |
| `petitionerCity` | String | Employer city |
| `petitionerState` | String | Employer state |
| `petitionerZip` | String | Employer ZIP code |
| `initialApprovals` | Integer | Initial H-1B petitions approved for this employer/year |
| `initialDenials` | Integer | Initial H-1B petitions denied for this employer/year |
| `continuingApprovals` | Integer | Continuing (extension/amendment) petitions approved |
| `continuingDenials` | Integer | Continuing (extension/amendment) petitions denied |
| `sourceFile` | String | USCIS source file this record was extracted from |

### FAQ

#### How do I scrape the USCIS H-1B Employer Data Hub?

Run this actor with no input for every fiscal year on record, or set `fiscalYears` to the specific years you need. Each run returns structured JSON — no manual CSV downloads.

#### What data can I get from the USCIS H-1B Employer Data Hub?

Approval and denial counts for initial and continuing H-1B petitions, broken out by employer and fiscal year, plus NAICS code and location. It's the adjudication outcome — not the wage or job-title data found in DOL LCA filings.

#### Can I filter by fiscal year?

Yes. Pass an array of years to `fiscalYears`, e.g. `["2020", "2021", "2022"]`. Leave it empty and you get every year USCIS has published, from FY2009 forward.

#### How much does USCIS H-1B Employer Data Hub Scraper cost to run?

Pay-per-result pricing — a small run fee plus a per-record charge. A full historical pull (~832,000 records) costs more than a filtered single-year run; use `maxItems` and `fiscalYears` to control spend.

#### Does this include the most recent fiscal year?

It includes every year USCIS has published as a downloadable dataset. USCIS publishes new fiscal years periodically, and this actor picks them up automatically on the next run — no waiting for an update.

### Need More Features?

Need custom fields, a different filter, or a related USCIS dataset? [File an issue](https://console.apify.com/actors/issues) or get in touch.

### Why Use USCIS H-1B Employer Data Hub Scraper?

- **The outcome, not the intent** — most H-1B actors scrape DOL LCA filings, which only show who *applied* to sponsor. This is USCIS's own record of who got approved.
- **Fifteen years in one schema** — USCIS has changed its own CSV column names more than once since 2009. Every record here comes out the same shape regardless of which fiscal year it's from.
- **Self-updating coverage** — new fiscal years get picked up automatically as USCIS publishes them, with no actor update required.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

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

Maximum number of records to collect across all selected fiscal years

## `fiscalYears` (type: `array`):

USCIS fiscal years to include. Leave empty for all available years.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 15,
  "fiscalYears": []
}
```

# 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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/uscis-h1b-employer-data-hub-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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/uscis-h1b-employer-data-hub-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 '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 15
}' |
apify call jungle_synthesizer/uscis-h1b-employer-data-hub-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=jungle_synthesizer/uscis-h1b-employer-data-hub-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/58IwSXWemRDFaenOs/builds/6Ssz0SqWtc8XMbe1J/openapi.json
