{
  "openapi": "3.0.1",
  "info": {
    "title": "USDA Organic INTEGRITY Change Monitor",
    "description": "Monthly change feed for the USDA Organic INTEGRITY Database: operations newly certified, suspended, surrendered, revoked or changed, with previous status, certifier, scopes and dates. Business-level data only. Unofficial, not affiliated with or endorsed by the USDA or the National Organic Program.",
    "version": "0.2",
    "x-build-id": "X274CMdJ0Nk8392me"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalloom~usda-organic-integrity-changes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalloom-usda-organic-integrity-changes",
        "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/signalloom~usda-organic-integrity-changes/runs": {
      "post": {
        "operationId": "runs-sync-signalloom-usda-organic-integrity-changes",
        "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/signalloom~usda-organic-integrity-changes/run-sync": {
      "post": {
        "operationId": "run-sync-signalloom-usda-organic-integrity-changes",
        "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": {
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of this monitor. Each monitor ID keeps its own saved state, so use a different ID for each set of filters you want to track separately. Letters, digits, - _ . only.",
            "default": "default"
          },
          "states": {
            "title": "US states",
            "type": "array",
            "description": "Only operations whose physical address is in these US states or territories (2-letter codes or full names, for example NY or New York). Empty = every US state.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeForeign": {
            "title": "Include operations outside the US",
            "type": "boolean",
            "description": "When no state is chosen, also output operations located in other countries (about half of the database). Ignored when states are set.",
            "default": false
          },
          "scopes": {
            "title": "Scopes",
            "type": "array",
            "description": "Keep operations that hold at least one of these scopes (crops, livestock, wild crops, handling).",
            "items": {
              "type": "string",
              "enum": [
                "crops",
                "livestock",
                "wildCrops",
                "handling"
              ],
              "enumTitles": [
                "Crops",
                "Livestock",
                "Wild crops",
                "Handling"
              ]
            },
            "default": [
              "crops",
              "livestock",
              "wildCrops",
              "handling"
            ]
          },
          "certifier": {
            "title": "Certifier contains",
            "type": "string",
            "description": "Keep only operations whose certifier name contains this text (case-insensitive), for example 'CCOF' or 'Oregon Tilth'. Empty = any certifier.",
            "default": ""
          },
          "changeTypes": {
            "title": "Change types to output",
            "type": "array",
            "description": "Which kinds of change to output.",
            "items": {
              "type": "string",
              "enum": [
                "newly_certified",
                "newly_listed",
                "reinstated",
                "suspended",
                "surrendered",
                "revoked",
                "status_changed",
                "certifier_changed",
                "scope_changed",
                "renamed",
                "removed_from_listing"
              ],
              "enumTitles": [
                "Newly certified (new operation, status Certified)",
                "Newly listed (new operation, other status)",
                "Reinstated (back to Certified)",
                "Suspended",
                "Surrendered",
                "Revoked",
                "Other status change",
                "Certifier changed",
                "Scope status changed",
                "Renamed",
                "Removed from the listing"
              ]
            },
            "default": [
              "newly_certified",
              "newly_listed",
              "reinstated",
              "suspended",
              "surrendered",
              "revoked",
              "status_changed",
              "certifier_changed",
              "scope_changed",
              "renamed",
              "removed_from_listing"
            ]
          },
          "release": {
            "title": "Release to read",
            "type": "string",
            "description": "'latest' reads the newest monthly file that exists. Or give the first day of a month, for example 2026-11-01.",
            "default": "latest"
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "changes",
              "snapshot"
            ],
            "type": "string",
            "description": "'changes' compares with the saved state. 'snapshot' lists the current operations that match the filters and does not touch the state.",
            "default": "changes"
          },
          "emitBaselineRows": {
            "title": "Emit baseline rows",
            "type": "boolean",
            "description": "On the first run, also output every matching operation as a 'baseline' row. Off by default: a baseline run outputs nothing.",
            "default": false
          },
          "firstRunCompareRelease": {
            "title": "First-run comparison month",
            "type": "string",
            "description": "Optional, first run only: instead of a silent baseline, compare the newest file with this older monthly file (for example 2026-10-01) and output the real changes right away.",
            "default": ""
          },
          "commitState": {
            "title": "Save state",
            "type": "boolean",
            "description": "Save the state for the next run. Turn off for a trial run that must not move the baseline.",
            "default": true
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store that keeps the change-tracking state (key STATE_<monitorId>).",
            "default": "usda-organic-integrity-state"
          },
          "redactNames": {
            "title": "(Deprecated) Withhold personal operation names",
            "type": "boolean",
            "description": "Deprecated and ignored: output is always business-only. An operation name that looks like a private person's name (sole proprietors) is withheld (nameWithheld: true) and the operation ID is still output.",
            "default": true
          },
          "maxItems": {
            "title": "Max rows (0 = all)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many output rows. 0 = no limit.",
            "default": 0
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 1000,
            "type": "integer",
            "description": "At least 1000 ms between requests to the USDA site. The Actor makes only a handful of requests per run.",
            "default": 1000
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}