{
  "openapi": "3.0.1",
  "info": {
    "title": "Regulations.gov Dockets, Rules & Public Comments",
    "description": "Search federal rules, proposed rules and notices on Regulations.gov, find comment deadlines that are still open, and export public comments for any docket. Official API, flat rows, watch mode for new items only.",
    "version": "0.0",
    "x-build-id": "5QaI0w8cwJ5ydUT6S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opendocketdata~regulations-gov-dockets-comments/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opendocketdata-regulations-gov-dockets-comments",
        "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/opendocketdata~regulations-gov-dockets-comments/runs": {
      "post": {
        "operationId": "runs-sync-opendocketdata-regulations-gov-dockets-comments",
        "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/opendocketdata~regulations-gov-dockets-comments/run-sync": {
      "post": {
        "operationId": "run-sync-opendocketdata-regulations-gov-dockets-comments",
        "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": "What to collect",
            "enum": [
              "documents",
              "comments",
              "dockets"
            ],
            "type": "string",
            "description": "Documents: rules, proposed rules, notices and other documents. Comments: public comments on one docket or document. Dockets: the dockets themselves.",
            "default": "documents"
          },
          "searchTerm": {
            "title": "Search term",
            "type": "string",
            "description": "Words to search for, for example \"PFAS\" or \"overtime\"."
          },
          "agencyIds": {
            "title": "Agencies",
            "type": "array",
            "description": "Agency acronyms as Regulations.gov uses them, for example EPA, FDA, DOL, FAA. Leave empty for all agencies.",
            "items": {
              "type": "string"
            }
          },
          "documentTypes": {
            "title": "Document types (documents mode)",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "Proposed Rule",
                "Rule",
                "Notice",
                "Supporting & Related Material",
                "Other"
              ]
            }
          },
          "openForCommentOnly": {
            "title": "Only documents still open for comment",
            "type": "boolean",
            "description": "Keeps documents whose comment period ends today or later.",
            "default": false
          },
          "commentDeadlineBefore": {
            "title": "Comment deadline on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Use with the option above to find deadlines coming up soon."
          },
          "docketId": {
            "title": "Docket ID",
            "type": "string",
            "description": "Required for comments mode unless you give a document ID. Example: EPA-HQ-OAR-2021-0317."
          },
          "documentId": {
            "title": "Document ID (comments mode)",
            "type": "string",
            "description": "Collect comments on one document only. Example: EPA-HQ-OAR-2021-0317-0001."
          },
          "includeCommentText": {
            "title": "Include full comment text and submitter organization",
            "type": "boolean",
            "description": "Makes one extra request per comment, so runs are slower.",
            "default": false
          },
          "docketType": {
            "title": "Docket type (dockets mode)",
            "enum": [
              "Rulemaking",
              "Nonrulemaking"
            ],
            "type": "string",
            "description": "Leave empty for both."
          },
          "postedFrom": {
            "title": "Posted on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only items posted on or after this date."
          },
          "postedTo": {
            "title": "Posted on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only items posted on or before this date."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "-postedDate",
              "postedDate",
              "commentEndDate",
              "-lastModifiedDate",
              "lastModifiedDate"
            ],
            "type": "string",
            "description": "Order of the results.",
            "default": "-postedDate"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The API returns at most 5,000 results per search. Narrow the dates to collect more.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new results since my last run (watch mode)",
            "type": "boolean",
            "description": "Remembers what earlier runs returned and saves only new items. Pair with an Apify schedule for daily alerts.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Give each saved search its own name so their memories stay separate.",
            "default": "default"
          },
          "apiKey": {
            "title": "Your api.data.gov key (free)",
            "type": "string",
            "description": "Get a free key in a minute at https://api.data.gov/signup/. Without one, the run uses the shared DEMO_KEY, which allows only a few requests an hour."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}