{
  "openapi": "3.0.1",
  "info": {
    "title": "US SNAP Retailer Leads Scraper - Grocery & C-Stores",
    "description": "Scrape every US SNAP/EBT-authorized retailer from official USDA FNS data: store name, full address, county, geo & store type (convenience, grocery, supermarket, super store, specialty, farmers market) + lead score. Filter by state, store type & size. Food-retail B2B leads + monitoring.",
    "version": "0.1",
    "x-build-id": "nGpSr0KLjOr7zdWer"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~snap-retailer-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-snap-retailer-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~snap-retailer-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-snap-retailer-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~snap-retailer-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-snap-retailer-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": {
          "states": {
            "title": "States",
            "uniqueItems": true,
            "type": "array",
            "description": "Two-letter state codes to scrape (e.g. [\"CA\",\"TX\"]). Leave empty to scrape all 50 states + DC + Guam + U.S. Virgin Islands (the full SNAP coverage area).",
            "items": {
              "type": "string"
            }
          },
          "storeTypes": {
            "title": "Store types",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only retailers of these store types. Allowed values: convenienceStore, groceryStore, supermarket, superStore, specialtyStore, farmersMarket, restaurantMealsProgram, other. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "convenienceStore",
                "groceryStore",
                "supermarket",
                "superStore",
                "specialtyStore",
                "farmersMarket",
                "restaurantMealsProgram",
                "other"
              ],
              "enumTitles": [
                "Convenience Store (convenienceStore)",
                "Grocery Store (groceryStore)",
                "Supermarket (supermarket)",
                "Super Store / Supercenter (superStore)",
                "Specialty Food Store (specialtyStore)",
                "Farmers Market (farmersMarket)",
                "Restaurant Meals Program (restaurantMealsProgram)",
                "Other Retailer (other)"
              ]
            }
          },
          "storeSizeTiers": {
            "title": "Store size tiers",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only retailers in these size tiers. Allowed values: large (super stores & supermarkets), medium (grocery stores), small (convenience, specialty & farmers markets), restaurant (Restaurant Meals Program). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "large",
                "medium",
                "small",
                "restaurant"
              ],
              "enumTitles": [
                "Large (super stores & supermarkets) (large)",
                "Medium (grocery stores) (medium)",
                "Small (convenience / specialty / farmers markets) (small)",
                "Restaurant Meals Program (restaurant)"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only retailers in these cities (case-insensitive, exact match on the store's city). Optional.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only retailers in these counties (case-insensitive, e.g. \"Los Angeles\"). Optional.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only retailers whose ZIP starts with any of these values (full ZIP or prefix, e.g. \"900\" or \"90210\"). Optional.",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Store name contains",
            "type": "string",
            "description": "Keep only retailers whose name contains this text (case-insensitive), e.g. \"dollar general\" or \"7-eleven\". Optional."
          },
          "recordIds": {
            "title": "Record IDs (lookup)",
            "uniqueItems": true,
            "type": "array",
            "description": "Look up specific retailers by USDA Record ID. When set, the state filter is ignored and only these retailers are returned.",
            "items": {
              "type": "string"
            }
          },
          "incentiveProgramsOnly": {
            "title": "Nutrition-incentive retailers only",
            "type": "boolean",
            "description": "Keep only retailers enrolled in a SNAP nutrition-incentive program (e.g. GusNIP / Double Up Food Bucks) — engaged, grant-funded stores and direct-marketing farmers.",
            "default": false
          },
          "withGeoOnly": {
            "title": "With coordinates only",
            "type": "boolean",
            "description": "Keep only retailers that have latitude/longitude coordinates (useful for mapping and territory routing).",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only retailers with a lead score at or above this value (0-100)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "leadScore",
              "name",
              "state",
              "source"
            ],
            "type": "string",
            "description": "Order of the output.",
            "default": "leadScore"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of retailer records to return across all states.",
            "default": 1000
          },
          "maxResultsPerState": {
            "title": "Max results per state",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on the number of retailers returned from each state (useful for balanced multi-state pulls). Leave empty for no per-state cap."
          },
          "deduplicateResults": {
            "title": "Deduplicate by Record ID",
            "type": "boolean",
            "description": "Drop duplicate retailers that share the same USDA Record ID.",
            "default": true
          },
          "includeRawFields": {
            "title": "Include raw source fields",
            "type": "boolean",
            "description": "Attach the raw USDA FNS source attributes under sourceFields on each record.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode (only new / changed)",
            "type": "boolean",
            "description": "Only return retailers that are new or whose name, address, store type or incentive program changed since the last run with the same monitor key. Ideal on a Schedule to capture newly SNAP-authorized stores.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Namespace for monitoring mode so independent monitors don't collide. Use a distinct key per saved configuration.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The USDA FNS ArcGIS service needs no proxy, so leave this off for the fastest queries.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}