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

# Bills & Legislation

> Retrieve a list of parliamentary bills and their current legislative status.

Get a standardized list of bills introduced in the House of Commons and the Senate, including their sponsors, stages, and summaries.

### Query Parameters

<ParamField query="session" type="string">
  Filter by parliamentary session (e.g., `44-1`). Example: `44-1`.
</ParamField>

<ParamField query="status" type="string">
  Filter by current bill status code. Example: `issued`.
</ParamField>

<ParamField query="sponsor" type="string">
  Partial match on sponsor name. Example: `Smith`.
</ParamField>

<ParamField query="sector" type="string">
  Exact match on sector tag. Example: `Technology`.
</ParamField>

<ParamField query="q" type="string">
  Partial match on bill title. Example: `carbon tax`.
</ParamField>

<ParamField query="law" type="boolean">
  Filter enacted laws. Example: `Criminal Code`.
</ParamField>

<ParamField query="private_member" type="boolean">
  Filter private members' bills. Example: `true`.
</ParamField>

<ParamField query="limit" type="integer">
  Results per page. Default: `50`. Max: `200`. Example: `25`.
</ParamField>

<ParamField query="offset" type="integer">
  Result offset for pagination. Default: `0`. Example: `50`.
</ParamField>

<Note>
  `page` and `per_page` are accepted as input aliases. `per_page` maps to `limit`, and `page` is converted internally into the corresponding `offset`.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.northaxiumdata.ca/api/v1/bills?status=ROYAL_ASSENT&limit=10&offset=10" \
    -H "X-API-Key: <your-api-key>"
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.northaxiumdata.ca/api/v1/bills"
  headers = {"X-API-Key": "<your-api-key>"}
  params = {
      "status": "ROYAL_ASSENT",
      "limit": 10,
      "offset": 10
  }

  response = requests.get(url, headers=headers, params=params)
  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const fetch = require('node-fetch');

  const url = new URL('https://api.northaxiumdata.ca/api/v1/bills');
  url.search = new URLSearchParams({
    status: 'ROYAL_ASSENT',
    limit: '10',
    offset: '10'
  });

  fetch(url, {
    headers: {
      'X-API-Key': '<your-api-key>'
    }
  })
    .then(res => res.json())
    .then(json => console.log(json));
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "session_id": "44-1",
        "number": "C-11",
        "name_en": "Online Streaming Act",
        "sponsor_name": "Minister of Canadian Heritage",
        "status_code": "ROYAL_ASSENT",
        "introduced": "2022-02-02"
      }
    ],
    "meta": {
      "total": 1,
      "limit": 10,
      "offset": 10
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": "BAD_REQUEST",
      "message": "law must be a valid boolean."
    }
  }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "code": "UNAUTHORIZED",
      "message": "Missing API key. Pass your key in the X-API-Key header."
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "NOT_FOUND",
      "message": "The requested resource was not found."
    }
  }
  ```

  ```json 429 theme={null}
  {
    "error": {
      "code": "RATE_LIMITED",
      "message": "Monthly request limit exceeded."
    }
  }
  ```
</ResponseExample>
