{
  "openapi": "3.0.1",
  "info": {
    "title": "EPA TSCA CDR Chemical Site Screener - Manufacture & Import",
    "description": "Which TSCA chemicals are manufactured or imported at a site, in what production volume, by whom, and with what worker-exposure context. Screens EPA's 2024 Chemical Data Reporting bulk file by radius, CASRN or state, and keeps a CBI-withheld volume distinct from a real zero.",
    "version": "1.0",
    "x-build-id": "CSEJGqp8HiiFlMjLb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~epa-tsca-cdr-chemical-site-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-epa-tsca-cdr-chemical-site-screener",
        "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/malonestar~epa-tsca-cdr-chemical-site-screener/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-epa-tsca-cdr-chemical-site-screener",
        "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/malonestar~epa-tsca-cdr-chemical-site-screener/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-epa-tsca-cdr-chemical-site-screener",
        "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": "Query mode",
            "enum": [
              "radius",
              "chemical",
              "state"
            ],
            "type": "string",
            "description": "How to query the 2024 TSCA Chemical Data Reporting file. 'radius' screens coordinates and returns every CDR site within the radius; 'chemical' maps every US site that manufactures or imports a given CASRN; 'state' lists a state's CDR filers. Required, so a bare {} call is rejected before the run starts and nothing is billed."
          },
          "assets": {
            "title": "Assets (mode = radius)",
            "maxItems": 100,
            "type": "array",
            "description": "Coordinates to screen. Each entry: {\"lat\": number, \"lon\": number, \"radiusMiles\": number, \"label\": string}. radiusMiles defaults to 5 in code (never a schema default, which Apify injects server-side) and is capped at 100. Maximum 100 assets per run: each asset emits one query_summary row inside the maxResults budget, so maxResults must be at least the number of assets. Used only when mode = radius."
          },
          "chemicalIds": {
            "title": "Chemical IDs (mode = chemical)",
            "maxItems": 100,
            "type": "array",
            "description": "CASRNs to reverse-map, with or without dashes, e.g. [\"7704-34-9\"] for Sulfur. Every US site reporting manufacture or import of the substance is returned, including sites whose identity EPA withholds as CBI. Maximum 100 per run: each chemical emits one query_summary row inside the maxResults budget. Used only when mode = chemical.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States (mode = state)",
            "maxItems": 60,
            "type": "array",
            "description": "Two-letter postal codes, e.g. [\"CO\"]. Rows whose site state is claimed confidential cannot be assigned to any state and are therefore absent from every state total. Maximum 60 per run: each state emits one query_summary row inside the maxResults budget. Used only when mode = state.",
            "items": {
              "type": "string"
            }
          },
          "chemicalFilter": {
            "title": "Restrict to these chemicals",
            "type": "array",
            "description": "Optional CASRN list applied on top of any mode, so a radius or state query can be narrowed to specific substances. Leave empty to return every chemical reported at the matched sites.",
            "items": {
              "type": "string"
            }
          },
          "siteQuery": {
            "title": "Site name contains",
            "type": "string",
            "description": "Optional case-insensitive substring match on the published site name. Rows whose site name is claimed confidential can never match a name filter and are excluded when this is set."
          },
          "includeSitesWithoutCoordinates": {
            "title": "Include sites EPA did not place",
            "type": "boolean",
            "description": "In radius mode, also emit records whose coordinates are blank or published as the 0/0 null-island sentinel, flagged with site_coordinate_status and a null distance. They cannot be confirmed to be inside the radius, so this is off unless requested."
          },
          "maxResults": {
            "title": "Max result rows per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The hard cap on total rows this run emits, which is also the hard cap on the bill. It counts EVERY emitted row, including the one query_summary row each asset, chemical or state produces: those are reserved off the top and the remainder is spent on site-chemical records. It is a whole-run cap, never per scope. Applied in code (200 when omitted) rather than as a schema default, so an API or MCP caller who omits it cannot be billed for a national dump. Must be at least the number of scopes in the request. Maximum 5000."
          },
          "simulateOutage": {
            "title": "Simulate a drift-gate failure (diagnostics)",
            "enum": [
              "none",
              "primary",
              "corroborating",
              "header_contract",
              "cbi_sentinel",
              "row_floor",
              "zip_entries"
            ],
            "type": "string",
            "description": "Diagnostic seam that forces one drift-gate failure path so the fail-closed behaviour can be re-proved on demand instead of only during a real outage. Leave as 'none' for normal use; any other value makes the run fail and bill nothing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}