{
  "openapi": "3.0.1",
  "info": {
    "title": "Visa Sponsor Leads Scraper - PERM, H-2A & H-2B Employers",
    "description": "Scrape US visa-sponsor employer leads from official DOL OFLC data: PERM (green card), H-2A & H-2B. Employer, named contact, email, phone, FEIN, NAICS, wage & lead score; state, status & date filters; monitor mode. Independent tool, not affiliated with any government agency.",
    "version": "1.0",
    "x-build-id": "pwU5tzHe1CjQEVXyu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~visa-sponsor-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-visa-sponsor-leads-scraper",
        "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/scrapesage~visa-sponsor-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-visa-sponsor-leads-scraper",
        "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/scrapesage~visa-sponsor-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-visa-sponsor-leads-scraper",
        "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": {
          "programs": {
            "title": "Visa programs",
            "type": "array",
            "description": "Which DOL OFLC foreign-labor-certification programs to pull employer leads from. PERM = permanent (green-card) sponsors, H-2A = seasonal agricultural employers (farms), H-2B = seasonal non-agricultural employers (landscaping, hospitality, seafood, construction). Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "PERM",
                "H-2A",
                "H-2B"
              ],
              "enumTitles": [
                "PERM - Green Card sponsors",
                "H-2A - Agricultural employers",
                "H-2B - Seasonal non-ag employers"
              ]
            }
          },
          "fiscalYear": {
            "title": "Fiscal year",
            "enum": [
              "latest",
              "2027",
              "2026",
              "2025",
              "2024",
              "2023",
              "2022",
              "2021",
              "2020"
            ],
            "type": "string",
            "description": "Which fiscal-year disclosure file to use. \"latest\" uses the most recent quarter DOL has published (cumulative for the current fiscal year). Or pick a specific year for that year's full data (FY2020 to FY2025). For FY2024 PERM, both the old-form and the new-form files are read. DOL publishes employer FEINs only from FY2024 on.",
            "default": "latest"
          },
          "states": {
            "title": "Filter by state",
            "type": "array",
            "description": "Keep only filings whose employer OR worksite is in these US states/territories. Two-letter codes or full names both work (e.g. CA, TX, Florida, New York). Leave empty for all states.",
            "items": {
              "type": "string"
            }
          },
          "caseStatuses": {
            "title": "Filter by case status",
            "type": "array",
            "description": "Keep only filings with these decision statuses. \"Certified\" = approved sponsors (the warmest leads), including certifications that have since expired. \"Denied\" includes rejected H-2B applications. Leave empty for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "Certified",
                "Partial Certification",
                "Denied",
                "Withdrawn"
              ],
              "enumTitles": [
                "Certified",
                "Partial Certification",
                "Denied / Rejected",
                "Withdrawn"
              ]
            }
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Keep only filings whose employer name, trade name, job title or occupation (SOC title) contains this text (case-insensitive). E.g. \"dairy\", \"hotel\", \"software engineer\"."
          },
          "naicsCodes": {
            "title": "Filter by NAICS code / prefix",
            "type": "array",
            "description": "Keep only employers whose NAICS industry code starts with one of these prefixes (e.g. \"11\" = Agriculture, \"72\" = Accommodation & Food Services, \"56\" = Admin/Landscaping, \"23\" = Construction).",
            "items": {
              "type": "string"
            }
          },
          "decidedAfter": {
            "title": "Decided after (date)",
            "type": "string",
            "description": "Keep only filings with a decision date on or after this date (YYYY-MM-DD). Great for a fresh-leads feed."
          },
          "withEmailOnly": {
            "title": "Only filings with an email",
            "type": "boolean",
            "description": "Keep only records that have the employer's own point-of-contact or application email (an attorney's or preparer's email alone does not count).",
            "default": false
          },
          "withPhoneOnly": {
            "title": "Only filings with a phone",
            "type": "boolean",
            "description": "Keep only records that have an employer, point-of-contact or application phone number.",
            "default": false
          },
          "deduplicateEmployers": {
            "title": "Deduplicate employers",
            "type": "boolean",
            "description": "Output each employer only once (keeping their most recent filing), deduplicated by FEIN / employer name. Off = one record per case/filing.",
            "default": false
          },
          "includeRawFields": {
            "title": "Include all raw fields (richest output)",
            "type": "boolean",
            "description": "Attach an additionalData object with every other populated column from the source file (wage schedule, housing, recruitment, job requirements, etc.) so nothing is lost. Turn off for a slimmer record with the core lead fields only.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to output across the whole run (newest first). Leave empty for all matching filings - a full program-year can be 15,000-115,000 filings; they are then delivered program by program, each newest first."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "decisionDate",
              "receivedDate"
            ],
            "type": "string",
            "description": "Which date to sort by (newest first) and use for the \"Max results\" cut.",
            "default": "decisionDate"
          },
          "startUrls": {
            "title": "Start URLs (advanced)",
            "type": "array",
            "description": "Advanced: paste direct DOL OFLC disclosure .xlsx file URLs (from dol.gov/agencies/eta/foreign-labor/performance) to read exactly those files instead of auto-resolving. The program is detected from the file name.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of disclosure-file URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Google Sheet/Drive share links are handled automatically."
          },
          "monitorMode": {
            "title": "Monitor mode (only new filings)",
            "type": "boolean",
            "description": "Output only NEW filings - a fresh feed of newly decided visa-sponsor employers. The first run with a monitor key is the baseline (the newest matches; everything read is remembered); every later run delivers only filings DOL adds after it, and if \"Max results\" cuts them short the next run delivers the rest. Works alongside Apify Schedules; it does not replace them.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Namespace for monitor-mode memory. Use a distinct key per saved search (e.g. \"h2a-ca\") so different monitors don't share state.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: the files are downloaded straight from dol.gov, with an Apify proxy used automatically only if dol.gov refuses a download. Add your own proxy URLs here only if you want those used as the fallback instead.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}