{
  "openapi": "3.0.1",
  "info": {
    "title": "USDA Farmers Market Directory Scraper",
    "description": "Scrape the USDA National Farmers Market Directory - market names, full addresses, GPS coordinates, operating season, products sold, accepted payment methods (SNAP/WIC/credit/debit), and contact/social links. Search by U.S. state or by city/ZIP + radius.",
    "version": "1.0",
    "x-build-id": "d2AWnHmIIPXjusVIB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~usda-farmers-market-directory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-usda-farmers-market-directory-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/crawlerbros~usda-farmers-market-directory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-usda-farmers-market-directory-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/crawlerbros~usda-farmers-market-directory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-usda-farmers-market-directory-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": {
          "locationState": {
            "title": "U.S. state / territory",
            "enum": [
              "Alabama",
              "Alaska",
              "American Samoa",
              "Arizona",
              "Arkansas",
              "Baker Island",
              "California",
              "Colorado",
              "Connecticut",
              "Delaware",
              "District of Columbia",
              "Federated States of Micronesia",
              "Florida",
              "Georgia",
              "Guam",
              "Hawaii",
              "Howland Island",
              "Idaho",
              "Illinois",
              "Indiana",
              "Iowa",
              "Jarvis Island",
              "Johnston Atoll",
              "Kansas",
              "Kentucky",
              "Kingman Reef",
              "Louisiana",
              "Maine",
              "Marshall Islands",
              "Maryland",
              "Massachusetts",
              "Michigan",
              "Midway Islands",
              "Minnesota",
              "Mississippi",
              "Missouri",
              "Montana",
              "Navassa Island",
              "Nebraska",
              "Nevada",
              "New Hampshire",
              "New Jersey",
              "New Mexico",
              "New York",
              "North Carolina",
              "North Dakota",
              "Northern Mariana Islands",
              "Ohio",
              "Oklahoma",
              "Oregon",
              "Palau",
              "Palmyra Atoll",
              "Pennsylvania",
              "Puerto Rico",
              "Rhode Island",
              "South Carolina",
              "South Dakota",
              "Tennessee",
              "Texas",
              "U.S. Minor Outlying Islands",
              "U.S. Virgin Islands",
              "Utah",
              "Vermont",
              "Virginia",
              "Wake Island",
              "Washington",
              "West Virginia",
              "Wisconsin",
              "Wyoming"
            ],
            "type": "string",
            "description": "Return every farmers market in this state or territory. Takes priority over `location` when both are set. Leave blank to search by `location` + `radiusMiles` instead."
          },
          "location": {
            "title": "City, ZIP code, or address",
            "type": "string",
            "description": "Search around a city (\"Austin, TX\"), ZIP code (\"78701\"), or street address, combined with `radiusMiles`. Ignored when `locationState` is set."
          },
          "radiusMiles": {
            "title": "Search radius (miles)",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Radius around `location` to search, in miles. Only applies when `locationState` is blank.",
            "default": 30
          },
          "keyword": {
            "title": "Market name keyword",
            "type": "string",
            "description": "Only return markets whose name or description contains this text (case-insensitive substring match)."
          },
          "products": {
            "title": "Products sold",
            "type": "string",
            "description": "Only return markets that list this product among what they sell, e.g. \"Honey\", \"Fresh vegetables\", \"Eggs\"."
          },
          "acceptedPaymentMethods": {
            "title": "Accepted payment methods",
            "type": "array",
            "description": "Only return markets that accept ALL of the selected payment methods.",
            "items": {
              "type": "string",
              "enum": [
                "Cash",
                "Debit card",
                "Mobile payments",
                "Commercial Checks",
                "Personal Checks",
                "Barter",
                "Volunteer Work"
              ],
              "enumTitles": [
                "Cash",
                "Debit card / Credit card",
                "Online / Mobile payments",
                "Commercial Checks / Accounts",
                "Personal Checks",
                "Barter",
                "Volunteer Work"
              ]
            },
            "default": []
          },
          "fnapPrograms": {
            "title": "Food & nutrition assistance programs",
            "type": "array",
            "description": "Only return markets that participate in ALL of the selected food & nutrition assistance programs. True ALL-of matching is always enforced against each market's detail page, even with \"Include detailed enrichment\" off (that toggle only controls whether extra enrichment fields also appear in the output).",
            "items": {
              "type": "string",
              "enum": [
                "SNAP",
                "WIC",
                "WIC Farmers Market Program",
                "Senior Farmers Market Nutrition Program",
                "Match Program"
              ],
              "enumTitles": [
                "SNAP / EBT",
                "WIC",
                "WIC Farmers Market Program",
                "Senior Farmers Market Nutrition Program",
                "State/regional Match Program"
              ]
            },
            "default": []
          },
          "deliveryMethods": {
            "title": "Delivery / pickup options",
            "type": "array",
            "description": "Only return markets that offer ALL of the selected delivery/pickup options. True ALL-of matching is always enforced against each market's detail page, even with \"Include detailed enrichment\" off (that toggle only controls whether extra enrichment fields also appear in the output).",
            "items": {
              "type": "string",
              "enum": [
                "curbside",
                "local",
                "home"
              ],
              "enumTitles": [
                "On-site / curbside pickup",
                "Pick up at local community/business",
                "Delivery to customer's home"
              ]
            },
            "default": []
          },
          "productionMethods": {
            "title": "Production / practice methods",
            "type": "array",
            "description": "Only return markets whose vendors follow ALL of the selected production/practice methods (e.g. Organic, Non-GMO, Kosher). True ALL-of matching is always enforced against each market's detail page, even with \"Include detailed enrichment\" off (that toggle only controls whether extra enrichment fields also appear in the output).",
            "items": {
              "type": "string",
              "enum": [
                "USDA Certified",
                "Practicing Organic",
                "Naturally Grown",
                "Good Agricultural Practices",
                "No antibiotics",
                "Non-GMO",
                "No hormones",
                "No pesticides",
                "Grass Fed",
                "Pasture-raised",
                "Humane treatment of animals",
                "Fair labor practices",
                "Kosher",
                "Halal"
              ],
              "enumTitles": [
                "Organic (USDA Certified)",
                "Non-Certified, but Practicing Organic",
                "Certified \"Naturally Grown\"",
                "Good Agricultural Practices (GAP)-Certified",
                "No antibiotics",
                "Non-GMO",
                "No hormones",
                "No pesticides",
                "Grass Fed",
                "Pasture-raised/free-range animals",
                "Humane treatment of animals",
                "Fair labor practices, living wage, fair trade",
                "Kosher",
                "Halal"
              ]
            },
            "default": []
          },
          "operationDays": {
            "title": "Operating days",
            "type": "array",
            "description": "Only return markets that operate on ANY of the selected days of the week. True ANY-of matching is always enforced by checking each market's own detail-page schedule, even with \"Include detailed enrichment\" off (that toggle only controls whether extra enrichment fields also appear in the output).",
            "items": {
              "type": "string",
              "enum": [
                "Sunday",
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
                "Saturday"
              ],
              "enumTitles": [
                "Sunday",
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
                "Saturday"
              ]
            },
            "default": []
          },
          "operationMonths": {
            "title": "Operating months",
            "type": "array",
            "description": "Only return markets that operate during ANY of the selected months. True ANY-of matching is always enforced by checking each market's own detail-page season text, even with \"Include detailed enrichment\" off (that toggle only controls whether extra enrichment fields also appear in the output).",
            "items": {
              "type": "string",
              "enum": [
                "January",
                "February",
                "March",
                "April",
                "May",
                "June",
                "July",
                "August",
                "September",
                "October",
                "November",
                "December"
              ],
              "enumTitles": [
                "January",
                "February",
                "March",
                "April",
                "May",
                "June",
                "July",
                "August",
                "September",
                "October",
                "November",
                "December"
              ]
            },
            "default": []
          },
          "currentSeasonOnly": {
            "title": "Currently open for the season only",
            "type": "boolean",
            "description": "Only return markets that are currently open for their operating season.",
            "default": false
          },
          "includeDetails": {
            "title": "Include detailed enrichment",
            "type": "boolean",
            "description": "Include extra fields in the output: accepted payment methods, FNAP programs, production methods, online-order/delivery options, day-by-day schedule, and vendor count. Turning this off omits those fields from the output for a leaner/faster run, but does not affect the accuracy of any payment/FNAP/production/delivery/day/month filter you set -- those are always matched correctly regardless of this toggle.",
            "default": true
          },
          "maxItems": {
            "title": "Max markets to return",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of farmers market records to return.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}