> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Environmental Compliance

> Give the federal environmental compliance record of the facilities regulated under a company or facility name.

Give the federal environmental compliance record of the facilities regulated under a company or facility name, optionally within one US state: for each facility its address and registry id, its overall compliance status, whether it is currently a significant violator, how many of the last twelve quarters it was in violation, its inspections, formal enforcement actions and penalties over the last five years, and when it was last inspected and last penalised. The result also gives how many facilities matched in all and their penalties summed. Use it to check a supplier, a site or a counterparty against federal air, water, hazardous waste and drinking water programs. Covers US facilities regulated under federal environmental programs. The source matches every whole word of the name, in any order, against the current and alternate names a facility carries across its programs: a part of a word matches nothing, a search for Tesla also returns a facility on Tesla Road, and a facility matched under an alternate name may show a name without one of the words. The totals count every facility the search matched, not facilities verified to belong to the named company: tell facilities apart by address and registry id, and give `state` to narrow the search. `total_facilities` is 0 and `facilities` is empty when no facility name carries every word. A count or date is null when the source does not record it.

## Authentication

Requires x402 payment in the `payment-signature` header.

## Request Body

<ParamField body="name" type="string" required>
  Whole words of one facility name, in any order and without commas, for example TESLA MOTORS; a part of a word matches nothing. 3 to 100 characters. A name carries no comma: the source reads a comma as a separator between alternative names.
</ParamField>

<ParamField body="state" type="string">
  US state or territory postal code that limits the search to facilities in that state. A state is its two-letter postal code, for example CA.
</ParamField>

<ParamField body="limit" type="integer">
  How many facilities to return. From 1 to 25. Defaults to `10`.
</ParamField>

<Snippet file="audit-context-params.mdx" />

## Response (200 OK)

Top-level envelope: `success` (boolean) and `data` (object). All fields below are nested under `data`.

<ResponseField name="data.request_id" type="string">
  Durable job ID for audit and lookup
</ResponseField>

<ResponseField name="data.status" type="string">
  Job status: `completed`
</ResponseField>

<ResponseField name="data.tool" type="string">
  Always `company_environmental_compliance`
</ResponseField>

<ResponseField name="data.result" type="object">
  The answer, described under Result below
</ResponseField>

<ResponseField name="data.evidence" type="object">
  Where the answer came from and when
</ResponseField>

<ResponseField name="data.evidence.source" type="string">
  The public body the data comes from. Always `US Environmental Protection Agency`.
</ResponseField>

<ResponseField name="data.evidence.source_kind" type="string">
  `public` when the data comes from a public body, `commercial` otherwise
</ResponseField>

<ResponseField name="data.evidence.retrieved_at" type="string">
  When the lookup was made, as an ISO 8601 UTC time
</ResponseField>

<ResponseField name="data.evidence.as_of" type="string">
  When the source says the fact was last updated, or `null` when the source gives no date
</ResponseField>

## Result

Nested under `data.result`.

<ResponseField name="data.result.total_facilities" type="number">
  How many facilities the search matched to the name, including any beyond `limit`; a count of matches, not of facilities verified to belong to the named company.
</ResponseField>

<ResponseField name="data.result.total_penalties_usd" type="number">
  Penalties from formal enforcement actions in the last five years, in US dollars, summed over every facility the search matched, whether or not it belongs to the named company. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities" type="object[]">
  The matching facilities, in the order the source lists them, at most `limit`.
</ResponseField>

<ResponseField name="data.result.facilities[].name" type="string">
  The facility name as the source records it. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].street" type="string">
  Street address. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].city" type="string">
  City. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].state" type="string">
  Two-letter state code. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].zip" type="string">
  ZIP code. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].registry_id" type="string">
  The identifier the source gives the facility across every program. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].naics_codes" type="string[]">
  The NAICS industry codes recorded for the facility.
</ResponseField>

<ResponseField name="data.result.facilities[].compliance_status" type="string">
  The overall compliance status the source records, for example Significant Violation, Violation Identified or No Violation Identified. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].significant_violator" type="boolean">
  True when the source currently designates the facility a high priority violator under the Clean Air Act, in significant noncompliance under the Clean Water Act or the hazardous waste program, or a serious violator under the Safe Drinking Water Act. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].quarters_in_violation" type="integer">
  How many of the last twelve quarters the facility had a violation identified, was in noncompliance, or was a significant or high priority violator. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].inspections" type="integer">
  Compliance monitoring activities at the facility in the last five years. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].last_inspected_on" type="string">
  When the most recent compliance monitoring activity took place, YYYY-MM-DD. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].formal_actions" type="integer">
  Formal enforcement actions taken against the facility in the last five years. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].penalties_usd" type="number">
  Penalties assessed against the facility in the last five years, in US dollars. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.facilities[].last_penalty_on" type="string">
  When the most recent penalty was assessed, YYYY-MM-DD. `null` when the source gives no value.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://win.oneshotagent.com/v1/tools/lookup/company-environmental-compliance \
    -H "Content-Type: application/json" \
    -H "payment-signature: <base64 x402 payment>" \
    -d '{
      "name": "TESLA MOTORS INC",
      "state": "CA",
      "limit": 3
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://win.oneshotagent.com/v1/tools/lookup/company-environmental-compliance", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "payment-signature": paymentProof,
    },
    body: JSON.stringify({
      "name": "TESLA MOTORS INC",
      "state": "CA",
      "limit": 3
    }),
  });
  ```

  ```typescript SDK theme={null}
  const result = await agent.tool('lookup/company-environmental-compliance', {
    name: 'TESLA MOTORS INC',
    state: 'CA',
    limit: 3
  });
  console.log(result.data.result);
  console.log(result.data.evidence);
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200) theme={null}
  {
    "success": true,
    "data": {
      "request_id": "uuid",
      "receipt_id": "rcpt_...",
      "status": "completed",
      "tool": "company_environmental_compliance",
      "result": {
        "total_facilities": 28,
        "total_penalties_usd": 275000,
        "facilities": [
          {
            "name": "TESLA MOTORS INC DBA TESLA MOTORS SERVICE CENTER",
            "street": "9250 TRADE PL",
            "city": "SAN DIEGO",
            "state": "CA",
            "zip": "92126",
            "registry_id": "110070414218",
            "naics_codes": [
              "811111"
            ],
            "compliance_status": "No Violation Identified",
            "significant_violator": false,
            "quarters_in_violation": 0,
            "inspections": 0,
            "last_inspected_on": null,
            "formal_actions": 0,
            "penalties_usd": 0,
            "last_penalty_on": null
          },
          {
            "name": "TESLA COLLISION - CA - W VALLEY BLVD",
            "street": "3880 W VALLEY BLVD",
            "city": "WALNUT",
            "state": "CA",
            "zip": "91789",
            "registry_id": "110070483024",
            "naics_codes": [
              "811121"
            ],
            "compliance_status": "No Violation Identified",
            "significant_violator": false,
            "quarters_in_violation": 2,
            "inspections": 3,
            "last_inspected_on": "2025-08-22",
            "formal_actions": 0,
            "penalties_usd": 0,
            "last_penalty_on": null
          },
          {
            "name": "TESLA FREEMONT SPINNAKER (R&D)",
            "street": "3777 SPINNAKER CT",
            "city": "FREMONT",
            "state": "CA",
            "zip": "94538",
            "registry_id": "110066953871",
            "naics_codes": [
              "336110",
              "811111"
            ],
            "compliance_status": "No Violation Identified",
            "significant_violator": false,
            "quarters_in_violation": 0,
            "inspections": 0,
            "last_inspected_on": null,
            "formal_actions": 0,
            "penalties_usd": 0,
            "last_penalty_on": null
          }
        ]
      },
      "evidence": {
        "source": "US Environmental Protection Agency",
        "source_kind": "public",
        "retrieved_at": "2026-10-16T12:00:00.000Z",
        "calls": [
          {
            "retrieved_at": "2026-10-16T12:00:00.000Z"
          },
          {
            "retrieved_at": "2026-10-16T12:00:00.000Z"
          }
        ],
        "as_of": null
      }
    }
  }
  ```
</ResponseExample>

<Info>See [Pricing](/pricing) for this tool's price. A wallet (x402) call receives it in the 402 quote before anything is charged; a call paid from prepaid credits is charged when the API accepts the request and answers `200`.</Info>

## Notes

* Results return inline. The finished job stays available at `/v1/requests/{request_id}`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.