{
  "openapi": "3.0.1",
  "info": {
    "title": "USDA FSIS Establishment Scraper - Meat, Poultry & Egg Leads",
    "description": "Scrape every USDA FSIS-inspected meat, poultry & egg establishment: company, phone, full address, activities (slaughter/processing/import/export), species, size & grant date. Filter by state, type, species & size. B2B food-industry leads + monitoring. Official FSIS data, no browser.",
    "version": "0.1",
    "x-build-id": "HfGlITxKnINRHNA5P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~fsis-establishment-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-fsis-establishment-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~fsis-establishment-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-fsis-establishment-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~fsis-establishment-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-fsis-establishment-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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Filter to one or more US states by 2-letter code (e.g. `TX`, `IA`, `CA`). Leave empty to scrape the whole national directory.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by city name (case-insensitive, substring match).",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Filter by ZIP code. A 5-digit value matches exactly; a shorter prefix (e.g. `90`) matches a region.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Filter by county name (case-insensitive, substring match). Only applied when the source provides a county column.",
            "items": {
              "type": "string"
            }
          },
          "establishmentTypes": {
            "title": "Establishment types",
            "type": "array",
            "description": "Keep only establishments performing the selected activity. An establishment matches if it does ANY of the chosen activities.",
            "items": {
              "type": "string",
              "enum": [
                "slaughter",
                "processing",
                "import",
                "export",
                "eggProducts"
              ],
              "enumTitles": [
                "Slaughter",
                "Processing",
                "Import",
                "Export",
                "Egg products"
              ]
            }
          },
          "species": {
            "title": "Species",
            "type": "array",
            "description": "Filter by species handled (case-insensitive substring), e.g. `beef`, `chicken`, `turkey`, `swine`, `lamb`, `catfish`.",
            "items": {
              "type": "string"
            }
          },
          "sizes": {
            "title": "Establishment size",
            "type": "array",
            "description": "Filter by FSIS size category (from the demographic supplement). Large = 500+ employees, Small = 10–499, Very Small = under 10 / under $2.5M sales.",
            "items": {
              "type": "string",
              "enum": [
                "Large",
                "Small",
                "Very Small"
              ],
              "enumTitles": [
                "Large",
                "Small",
                "Very Small"
              ]
            }
          },
          "activitiesContains": {
            "title": "Activity contains",
            "type": "string",
            "description": "Free-text filter on the raw activities string (e.g. `ready-to-eat`, `voluntary`, `siluriformes`)."
          },
          "companyNameQuery": {
            "title": "Company name contains",
            "type": "string",
            "description": "Filter to establishments whose company name or DBA contains this text (case-insensitive)."
          },
          "establishmentNumbers": {
            "title": "Establishment numbers",
            "type": "array",
            "description": "Look up specific establishments by their FSIS establishment number (e.g. `M46758`, `P12345`).",
            "items": {
              "type": "string"
            }
          },
          "grantedAfter": {
            "title": "Granted after",
            "type": "string",
            "description": "Keep only establishments whose inspection grant date is on or after this date (YYYY-MM-DD). Great for finding newly inspected plants."
          },
          "grantedBefore": {
            "title": "Granted before",
            "type": "string",
            "description": "Keep only establishments whose grant date is on or before this date (YYYY-MM-DD)."
          },
          "withPhoneOnly": {
            "title": "Only with phone number",
            "type": "boolean",
            "description": "Keep only establishments that publish a phone number.",
            "default": false
          },
          "readyToEatOnly": {
            "title": "Only ready-to-eat (RTE) processors",
            "type": "boolean",
            "description": "Keep only establishments that produce ready-to-eat (RTE) products.",
            "default": false
          },
          "kosherOnly": {
            "title": "Only kosher",
            "type": "boolean",
            "description": "Keep only establishments with a kosher religious-exemption activity.",
            "default": false
          },
          "halalOnly": {
            "title": "Only halal",
            "type": "boolean",
            "description": "Keep only establishments with a halal / Islamic religious-exemption activity.",
            "default": false
          },
          "cellCulturedOnly": {
            "title": "Only cell-cultured",
            "type": "boolean",
            "description": "Keep only establishments handling cell-cultured (lab-grown) meat or poultry.",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only establishments with a lead score (0–100) at or above this value."
          },
          "includeDemographics": {
            "title": "Include demographic supplement",
            "type": "boolean",
            "description": "Join the FSIS Establishment Demographic Data file to add size category, species and aggregate production info. Recommended (enables size/species filters & richer lead scoring).",
            "default": true
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "grantDate",
              "leadScore",
              "size",
              "name",
              "none"
            ],
            "type": "string",
            "description": "Order of the returned records (the cap is applied after sorting).",
            "default": "grantDate"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of establishment records to return. The full national directory is roughly 7,000 establishments.",
            "default": 1000
          },
          "deduplicateResults": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Drop duplicate establishments (by establishment number) within a run.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new establishments)",
            "type": "boolean",
            "description": "Remember establishments seen in previous runs (per Monitor key) and only output NEW or changed ones (new plant, new activity, status/size change). Ideal with Apify Schedules for a fresh-leads feed. Works independently of the platform scheduler.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the saved monitor state, so different filter sets keep separate memories. Use a distinct key per saved search.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The FSIS open-data files are public and download fine without a proxy (the default). If a run is blocked, enable Apify Proxy — the actor automatically escalates to US residential when needed.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}