{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Register Scraper - US Rules & Regulations",
    "description": "Search the US Federal Register - final rules, proposed rules, notices and presidential documents: title, abstract, agencies, publication and effective dates, comment deadlines, CFR references, docket IDs and PDF links. Filter by type, agency and date. No API key, no browser.",
    "version": "0.1",
    "x-build-id": "8TUwnnymk7jhHQWOx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~federal-register-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-federal-register-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/scrapesage~federal-register-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-federal-register-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/scrapesage~federal-register-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-federal-register-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",
        "properties": {
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Terms to search the Federal Register full text, one per line - e.g. <code>artificial intelligence</code>, <code>clean water</code>. <b>Leave empty and the run returns a small free sample.</b>",
            "items": {
              "type": "string"
            }
          },
          "documentNumbers": {
            "title": "Document numbers (exact lookup)",
            "type": "array",
            "description": "Specific Federal Register document numbers to fetch exactly, one per line - e.g. <code>2024-00001</code>.",
            "items": {
              "type": "string"
            }
          },
          "documentTypes": {
            "title": "Only these document types",
            "type": "array",
            "description": "Keep only the selected document types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "RULE",
                "PRORULE",
                "NOTICE",
                "PRESDOCU"
              ],
              "enumTitles": [
                "Final Rule (RULE)",
                "Proposed Rule (PRORULE)",
                "Notice (NOTICE)",
                "Presidential Document (PRESDOCU)"
              ]
            }
          },
          "agencies": {
            "title": "Only these agencies (slugs)",
            "type": "array",
            "description": "Keep only documents from these agency slugs - e.g. <code>environmental-protection-agency</code>, <code>securities-and-exchange-commission</code>, <code>food-and-drug-administration</code>. Leave empty for all agencies.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Published on or after",
            "type": "string",
            "description": "Only documents published on or after this date (YYYY-MM-DD). Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "Published on or before",
            "type": "string",
            "description": "Only documents published on or before this date (YYYY-MM-DD). Leave empty for no upper bound."
          },
          "maxItemsPerQuery": {
            "title": "Max documents per search term",
            "minimum": 1,
            "type": "integer",
            "description": "How many documents to collect for each search term.",
            "default": 100
          },
          "maxItems": {
            "title": "Max documents (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Overall cap across all searches. You are only charged for documents actually saved.",
            "default": 2000
          },
          "searchQueriesFromFile": {
            "title": "Import search terms from a file",
            "type": "string",
            "description": "Bulk-load search terms. Either <b>paste the whole list</b> (one per line), or give <b>a single link</b> to a public <code>.txt</code>/<code>.csv</code>, a Google Sheet/Drive link, or an Apify key-value-store record. A file that cannot be read says so and charges nothing."
          },
          "outputFields": {
            "title": "Output fields (leave empty for all)",
            "type": "array",
            "description": "Pick the fields you want and every record is trimmed to exactly those - handy for lean CSV/Sheets exports.",
            "items": {
              "type": "string",
              "enum": [
                "type",
                "documentNumber",
                "title",
                "documentType",
                "documentTypeLabel",
                "abstract",
                "action",
                "agencies",
                "agencyCount",
                "publicationDate",
                "effectiveOn",
                "commentsCloseOn",
                "citation",
                "docketIds",
                "regulationIdNumbers",
                "cfrReferences",
                "significant",
                "president",
                "signingDate",
                "pageLength",
                "htmlUrl",
                "pdfUrl",
                "scrapedAt"
              ],
              "enumTitles": [
                "Record type (type)",
                "Document number (documentNumber)",
                "Title (title)",
                "Document type code (documentType)",
                "Document type label (documentTypeLabel)",
                "Abstract (abstract)",
                "Action (action)",
                "Agencies (agencies)",
                "Agency count (agencyCount)",
                "Publication date (publicationDate)",
                "Effective on (effectiveOn)",
                "Comments close on (commentsCloseOn)",
                "Citation (citation)",
                "Docket IDs (docketIds)",
                "Regulation ID numbers (regulationIdNumbers)",
                "CFR references (cfrReferences)",
                "Significant (significant)",
                "President (president)",
                "Signing date (signingDate)",
                "Page length (pageLength)",
                "HTML URL (htmlUrl)",
                "PDF URL (pdfUrl)",
                "Scraped at (scrapedAt)"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}