{
  "openapi": "3.0.1",
  "info": {
    "title": "Congress.gov Intelligence - Bills, Members, Votes API",
    "description": "Extract US Congressional data from official Congress.gov API. Get bills, amendments, members, committees, hearings, nominations, treaties & CRS reports. Filter by congress, chamber, state, date. Includes AI relevance scoring. Perfect for political research, lobbying & legal compliance.",
    "version": "1.0",
    "x-build-id": "TRubspyqkRLUCSeVI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/benthepythondev~congress-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-benthepythondev-congress-intelligence",
        "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/benthepythondev~congress-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-benthepythondev-congress-intelligence",
        "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/benthepythondev~congress-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-benthepythondev-congress-intelligence",
        "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": [
          "api_key",
          "data_type"
        ],
        "properties": {
          "api_key": {
            "title": "Congress.gov API Key",
            "type": "string",
            "description": "Your Congress.gov API key. Get one free at https://api.congress.gov/sign-up/"
          },
          "data_type": {
            "title": "Data Type",
            "enum": [
              "bills",
              "amendments",
              "members",
              "committees",
              "hearings",
              "nominations",
              "treaties",
              "crs_reports",
              "house_votes",
              "congressional_record"
            ],
            "type": "string",
            "description": "Type of Congressional data to extract",
            "default": "bills"
          },
          "congress": {
            "title": "Congress Number",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Filter by specific Congress (e.g., 118 for 118th Congress, 2023-2025). Leave empty for all."
          },
          "bill_type": {
            "title": "Bill Type",
            "enum": [
              "",
              "hr",
              "s",
              "hjres",
              "sjres",
              "hconres",
              "sconres",
              "hres",
              "sres"
            ],
            "type": "string",
            "description": "Filter bills by type (only for bills data type)",
            "default": ""
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "",
              "house",
              "senate"
            ],
            "type": "string",
            "description": "Filter by chamber (House or Senate)",
            "default": ""
          },
          "state_code": {
            "title": "State Code",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Filter members by state (2-letter code, e.g., CA, TX, NY). Only for members data type."
          },
          "search_query": {
            "title": "Search Keywords",
            "type": "string",
            "description": "Keywords to search in titles and descriptions (e.g., 'climate change', 'healthcare')"
          },
          "from_date": {
            "title": "From Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Filter items updated after this date (format: YYYY-MM-DD)"
          },
          "to_date": {
            "title": "To Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Filter items updated before this date (format: YYYY-MM-DD)"
          },
          "include_details": {
            "title": "Include Full Details",
            "type": "boolean",
            "description": "Fetch detailed information for each item (sponsors, cosponsors, actions, summaries). Slower but more comprehensive.",
            "default": false
          },
          "include_text": {
            "title": "Include Bill/Amendment Text",
            "type": "boolean",
            "description": "Include links to full text versions (PDF, XML, HTML). Only for bills and amendments.",
            "default": false
          },
          "max_results": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of results to return (API limit: 250 per request, will paginate for more)",
            "default": 100
          },
          "enable_scoring": {
            "title": "Enable AI Relevance Scoring",
            "type": "boolean",
            "description": "Calculate relevance scores (0-100) based on recency, activity, and importance",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}