> ## 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.

# List Contributions

> Retrieve a list of political contributions made to federal parties and candidates.

Get a standardized list of individual and corporate contributions, filterable by political party, riding, and dates.

### Query Parameters

<ParamField query="q" type="string">
  Full-text search across contributor name, party, and recipient name simultaneously. Example: `John Doe`.
</ParamField>

<ParamField query="contributor" type="string">
  Partial match on contributor name. Example: `John Doe`.
</ParamField>

<ParamField query="recipient" type="string">
  Partial match on recipient name. Example: `Liberal Party`.
</ParamField>

<ParamField query="party" type="string">
  Partial match on political party. Example: `Liberal`.
</ParamField>

<ParamField query="entity_type" type="string">
  Exact match on political entity type. Example: `political_party`.
</ParamField>

<ParamField query="contributor_type" type="string">
  Exact match on contributor type. Example: `individual`.
</ParamField>

<ParamField query="contributor_province" type="string">
  Exact match on contributor province. Example: `ON`.
</ParamField>

<ParamField query="electoral_event" type="string">
  Exact match on electoral event. Example: `2021 General Election`.
</ParamField>

<ParamField query="year" type="integer">
  Exact match on contribution year. Example: `2023`.
</ParamField>

<ParamField query="min_amount" type="number">
  Minimum monetary amount. Example: `500`.
</ParamField>

<ParamField query="max_amount" type="number">
  Maximum monetary amount. Example: `1500`.
</ParamField>

<ParamField query="limit" type="integer">
  Results per page. Default: `50`. Max: `500`. 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/contributions?party=Liberal&limit=10&offset=0" \
    -H "X-API-Key: <your-api-key>"
  ```

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

  url = "https://api.northaxiumdata.ca/api/v1/contributions"
  headers = {"X-API-Key": "<your-api-key>"}
  params = {
      "party": "Liberal",
      "limit": 10,
      "offset": 0
  }

  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/contributions');
  url.search = new URLSearchParams({
    party: 'Liberal',
    limit: '10',
    offset: '0'
  });

  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": [
      {
        "record_id": "CON-93821",
        "contributor_name": "John Doe",
        "contributor_city": "Toronto",
        "contributor_province": "ON",
        "recipient_name": "Liberal Party of Canada",
        "political_party": "Liberal Party of Canada",
        "monetary_amount": 1500.00,
        "contribution_date": "2023-08-12"
      }
    ],
    "meta": {
      "total": 6460000,
      "limit": 10,
      "offset": 0
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": "BAD_REQUEST",
      "message": "Invalid parameter value."
    }
  }
  ```

  ```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>
