{
  "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. Get employer, named contact, email, phone, FEIN, NAICS, wage & lead score. Filter by state, status & date. Monitor mode returns only new filings. No login, no browser.",
    "version": "1.0",
    "x-build-id": "gfOJdW2iOMoxe0Prb"
  },
  "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).",
            "items": {
              "type": "string",
              "enum": [
                "PERM",
                "H-2A",
                "H-2B"
              ],
              "enumTitles": [
                "PERM — Green Card sponsors",
                "H-2A — Agricultural employers",
                "H-2B — Seasonal non-ag employers"
              ]
            },
            "default": [
              "PERM",
              "H-2A",
              "H-2B"
            ]
          },
          "fiscalYear": {
            "title": "Fiscal year",
            "enum": [
              "latest",
              "2026",
              "2025",
              "2024",
              "2023"
            ],
            "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 (e.g. 2025, 2024).",
            "default": "latest"
          },
          "states": {
            "title": "Filter by employer state",
            "type": "array",
            "description": "Keep only employers located in these US states/territories (2-letter codes, e.g. CA, TX, FL, NC). 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). Leave empty for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "Certified",
                "Partial Certification",
                "Denied",
                "Withdrawn",
                "Pending"
              ],
              "enumTitles": [
                "Certified",
                "Partial Certification",
                "Denied",
                "Withdrawn",
                "Pending / In process"
              ]
            }
          },
          "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 a direct employer / point-of-contact / application email.",
            "default": false
          },
          "withPhoneOnly": {
            "title": "Only filings with a phone",
            "type": "boolean",
            "description": "Keep only records that have an employer or point-of-contact 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."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "decisionDate",
              "receivedDate"
            ],
            "type": "string",
            "description": "Which date to sort by (newest first) and use for the \"Max results\" cut and the decided-after filter.",
            "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 use exactly those files instead of auto-resolving. Program is auto-detected from the file name.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "monitorMode": {
            "title": "Monitor mode (only new filings)",
            "type": "boolean",
            "description": "Remember cases seen in previous runs and output only NEW ones — a fresh feed of newly filed/decided visa-sponsor employers. 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": "Apify Proxy. RESIDENTIAL US is required — the dol.gov file host blocks datacenter IPs. This is the default; leave it as-is.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many Start URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}