{
  "openapi": "3.0.1",
  "info": {
    "title": "USDA Organic Integrity Scraper",
    "description": "Scrape the official USDA Organic INTEGRITY Database of certified organic operations worldwide. Search by operation name, certifier, product scope, certification status, state/province, or country, or look up an operation by NOP Operation ID. No login required.",
    "version": "1.0",
    "x-build-id": "lKzoNDgRC1IWaEizd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~usda-organic-integrity-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-usda-organic-integrity-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-organic-integrity-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-usda-organic-integrity-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-organic-integrity-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-usda-organic-integrity-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byOperationId"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "operationName": {
            "title": "Operation name",
            "type": "string",
            "description": "Free-text search on the operation's business name, including other/former names (mode=search).",
            "default": "Organic Valley"
          },
          "structuredNameSearch": {
            "title": "Structured name search",
            "type": "boolean",
            "description": "Use USDA's structured (word-aware) name matching instead of a raw substring match.",
            "default": true
          },
          "operationIds": {
            "title": "NOP Operation IDs (mode=byOperationId)",
            "type": "array",
            "description": "Exact 10-digit NOP Operation IDs to look up. Example: `5561000796`. Capped at 20 IDs per run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "certifierName": {
            "title": "Certifier",
            "type": "string",
            "description": "Filter to a specific certifying agent by name, e.g. `CCOF`, `Control Union`, `Ecocert`."
          },
          "certifierClientId": {
            "title": "Certifier client ID",
            "type": "string",
            "description": "Filter by the operation's exact Client ID as assigned by its certifier (shown on the certifier's own records, e.g. `OT-007554`)."
          },
          "contactLastName": {
            "title": "Contact last name",
            "type": "string",
            "description": "Filter by the operation's primary contact's last name."
          },
          "program": {
            "title": "Accreditation program",
            "enum": [
              "USDA-NOP",
              "USDA-MPI",
              "USDA-PPIS",
              "CFIA-COR",
              "JAS",
              "SWISS Organic",
              "South Korea",
              "Taiwan",
              "UK",
              "EU Austria",
              "EU Belgium",
              "EU Bulgaria",
              "EU Croatia",
              "EU Cyprus",
              "EU Czechia",
              "EU Denmark",
              "EU Estonia",
              "EU Finland",
              "EU France",
              "EU Germany",
              "EU Greece",
              "EU Hungary",
              "EU Ireland",
              "EU Italy",
              "EU Latvia",
              "EU Lithuania",
              "EU Luxembourg",
              "EU Netherlands",
              "EU Poland",
              "EU Portugal",
              "EU Romania",
              "EU Slovakia",
              "EU Slovenia",
              "EU Spain",
              "EU Sweden"
            ],
            "type": "string",
            "description": "Which national/regional organic program accredited the certifier.",
            "default": "USDA-NOP"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Filter by the operation's physical-address city."
          },
          "state": {
            "title": "State / Province",
            "type": "string",
            "description": "Filter by the operation's physical-address state or province, e.g. `California`, `Ontario`."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Filter by the operation's physical-address country, e.g. `United States of America (the)`, `Mexico`, `China`."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Filter by the operation's physical-address county, e.g. `Tulare County`. Mostly populated for US operations."
          },
          "zipcode": {
            "title": "ZIP / postal code",
            "type": "string",
            "description": "Filter by the operation's physical-address ZIP/postal code."
          },
          "certificateNumber": {
            "title": "Certificate number",
            "type": "string",
            "description": "Filter by an exact certificate number issued by the certifier."
          },
          "certifiedProductsKeyword": {
            "title": "Certified products keyword",
            "type": "string",
            "description": "Free-text keyword search across all certified product listings, e.g. `coffee`, `apples`, `dairy`."
          },
          "exactProductName": {
            "title": "Exact product name",
            "type": "string",
            "description": "Restrict to operations certified for this exact product name (not a substring match, unlike `certifiedProductsKeyword`), e.g. `Coffee`."
          },
          "scope": {
            "title": "Product category (scope)",
            "type": "array",
            "description": "Restrict to operations certified in one or more of these product scopes. Leave empty for all scopes.",
            "items": {
              "type": "string",
              "enum": [
                "Crops",
                "Handling",
                "Livestock",
                "Wild Crops"
              ],
              "enumTitles": [
                "Crops",
                "Handling",
                "Livestock",
                "Wild Crops"
              ]
            },
            "default": []
          },
          "operationStatus": {
            "title": "Certification status",
            "type": "array",
            "description": "Restrict to operations with one or more of these OVERALL operation certification statuses. Leave empty to default to Certified only.",
            "items": {
              "type": "string",
              "enum": [
                "Certified",
                "Surrendered",
                "Suspended",
                "Revoked"
              ],
              "enumTitles": [
                "Certified",
                "Surrendered",
                "Suspended",
                "Revoked"
              ]
            },
            "default": [
              "Certified"
            ]
          },
          "scopeStatus": {
            "title": "Scope status",
            "type": "array",
            "description": "Restrict to operations having at least one certified scope (Crops/Handling/Livestock/Wild Crops) with one of these PER-SCOPE statuses -- a different, finer-grained dimension than `operationStatus`. Leave empty for all. Note: `Not Certified/Specified` can never be verified from the export (an uncertified scope has no row at all) and will always return zero matches.",
            "items": {
              "type": "string",
              "enum": [
                "Certified",
                "Surrendered",
                "Suspended",
                "Not Certified/Specified"
              ],
              "enumTitles": [
                "Certified",
                "Surrendered",
                "Suspended",
                "Not Certified/Specified"
              ]
            },
            "default": []
          },
          "businessType": {
            "title": "Business type",
            "type": "array",
            "description": "Restrict to operations offering one or more of these services/business types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Broker",
                "Community Supported Agriculture (CSA)",
                "Co-Packer",
                "Dairy",
                "Distributor",
                "Farm",
                "Grower Group",
                "Livestock",
                "Marketer/Trader",
                "Poultry",
                "Private Labeler",
                "Restaurant",
                "Retail Food Establishment",
                "Slaughterhouse",
                "Storage"
              ],
              "enumTitles": [
                "Broker",
                "Community Supported Agriculture (CSA)",
                "Co-Packer",
                "Dairy",
                "Distributor",
                "Farm",
                "Grower Group",
                "Livestock",
                "Marketer/Trader",
                "Poultry",
                "Private Labeler",
                "Restaurant",
                "Retail Food Establishment",
                "Slaughterhouse",
                "Storage"
              ]
            },
            "default": []
          },
          "statusEffectiveDateFrom": {
            "title": "Status effective date from (MM/DD/YYYY)",
            "type": "string",
            "description": "Drop operations whose certification status became effective before this date."
          },
          "statusEffectiveDateTo": {
            "title": "Status effective date to (MM/DD/YYYY)",
            "type": "string",
            "description": "Drop operations whose certification status became effective after this date."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on emitted records (mode=search). USDA caps a single export at 20000 rows.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}