# Represent (Open North)

> Find Canada's elected officials and electoral districts with Open North's Represent: who represents a postal code or an address at every level of government, with contact details, and search MPs, provincial members, mayors and councillors. No account or API key required.

App · 5 actions. Web page: https://docs.lodol.com/docs/integrations/represent

## Actions

### Find electoral districts

Find the electoral districts a place in Canada is in (federal ridings, provincial districts, city wards), given its latitude and longitude. No API key required.

**Inputs**

- Latitude (`latitude`, number, required): The place's latitude, e.g. 45.4215 for Ottawa. From -90 to 90.
- Longitude (`longitude`, number, required): The place's longitude, e.g. -75.6972 for Ottawa. From -180 to 180.
- Boundary set (`boundary_set`, text): Only districts in this set, e.g. federal-electoral-districts. Leave empty for all.

**Outputs**

- `count` (number): How many districts came back.
- `districts` (list): The electoral districts: federal, provincial and municipal.

**Example output**

```json
{
  "count": 1,
  "districts": [
    {
      "boundary_set": "Federal electoral district",
      "boundary_set_slug": "federal-electoral-districts",
      "external_id": "35075",
      "name": "Ottawa Centre",
      "url": "https://represent.opennorth.ca/boundaries/federal-electoral-districts/35075/"
    }
  ]
}
```

### Find representatives by location

Find the elected officials whose districts contain a place in Canada, given its latitude and longitude: the surest way to match an address to its MP, provincial member, mayor and councillor. No API key required.

**Inputs**

- Latitude (`latitude`, number, required): The place's latitude, e.g. 45.4215 for Ottawa. From -90 to 90.
- Longitude (`longitude`, number, required): The place's longitude, e.g. -75.6972 for Ottawa. From -180 to 180.
- Max results (`limit`, number): The most officials to return, from 1 to 100. From 1 to 100. Default: `20`.

**Outputs**

- `count` (number): How many officials came back.
- `representatives` (list): The elected officials.
- `total` (number): How many officials matched in all; use Skip to page.

**Example output**

```json
{
  "count": 1,
  "representatives": [
    {
      "district_name": "Ottawa Centre",
      "elected_office": "MP",
      "email": "yasir.naqvi@parl.gc.ca",
      "first_name": "Yasir",
      "gender": "M",
      "last_name": "Naqvi",
      "name": "Yasir Naqvi",
      "offices": [
        {
          "address": "House of Commons\nOttawa ON  K1A 0A6",
          "fax": "1 613 996-5322",
          "phone": "1 613 996-5322",
          "type": "legislature"
        }
      ],
      "party": "Liberal",
      "personal_url": null,
      "photo_url": "https://www.ourcommons.ca/Content/Parliamentarians/Images/OfficialMPPhotos/45/NaqviYasir_Lib.jpg",
      "representative_set": "House of Commons",
      "representative_set_slug": "house-of-commons",
      "source_url": "https://www.ourcommons.ca/Members/en/search?caucusId=all&province=all",
      "url": "https://www.ourcommons.ca/Members/en/yasir-naqvi(110572)"
    }
  ],
  "total": 1
}
```

### Find representatives by postal code

Find the elected officials (MP, provincial member, mayor, councillor) and electoral districts for a Canadian postal code, with their contact details. A postal code can straddle districts; for an exact answer, use a latitude and longitude. No API key required.

**Inputs**

- Postal code (`postal_code`, text, required): A Canadian postal code, e.g. K1A 0A6.

**Outputs**

- `city` (text): Its city, as Canada Post writes it, e.g. 'OTTAWA'.
- `count` (number): How many officials came back.
- `districts` (list): The electoral districts: federal, provincial and municipal.
- `latitude` (number): The middle of the postal code area.
- `longitude` (number): The middle of the postal code area.
- `postal_code` (text): The postal code looked up, e.g. 'K1A0A6'.
- `province` (text): Its province's two-letter code, e.g. 'ON'.
- `representatives` (list): The elected officials.

**Example output**

```json
{
  "city": "OTTAWA",
  "count": 1,
  "districts": [
    {
      "boundary_set": "Federal electoral district",
      "boundary_set_slug": "federal-electoral-districts",
      "external_id": "35075",
      "name": "Ottawa Centre",
      "url": "https://represent.opennorth.ca/boundaries/federal-electoral-districts/35075/"
    }
  ],
  "latitude": 45.423781,
  "longitude": -75.6974,
  "postal_code": "K1A0A6",
  "province": "ON",
  "representatives": [
    {
      "district_name": "Ottawa Centre",
      "elected_office": "MP",
      "email": "yasir.naqvi@parl.gc.ca",
      "first_name": "Yasir",
      "gender": "M",
      "last_name": "Naqvi",
      "name": "Yasir Naqvi",
      "offices": [
        {
          "address": "House of Commons\nOttawa ON  K1A 0A6",
          "fax": "1 613 996-5322",
          "phone": "1 613 996-5322",
          "type": "legislature"
        }
      ],
      "party": "Liberal",
      "personal_url": null,
      "photo_url": "https://www.ourcommons.ca/Content/Parliamentarians/Images/OfficialMPPhotos/45/NaqviYasir_Lib.jpg",
      "representative_set": "House of Commons",
      "representative_set_slug": "house-of-commons",
      "source_url": "https://www.ourcommons.ca/Members/en/search?caucusId=all&province=all",
      "url": "https://www.ourcommons.ca/Members/en/yasir-naqvi(110572)"
    }
  ]
}
```

### List representative sets

List the legislatures and councils Represent covers (the House of Commons, provincial legislatures, city councils), with the slug Search representatives takes. No API key required.

**Inputs**

- Name contains (`name_contains`, text): Only those whose name contains this, e.g. Council.

**Outputs**

- `count` (number): How many there are.
- `representative_sets` (list): The bodies, A to Z.

**Example output**

```json
{
  "count": 1,
  "representative_sets": [
    {
      "boundary_set_slug": "federal-electoral-districts-2023-representation-order",
      "data_url": "https://scrapers.herokuapp.com/represent/ca/",
      "name": "House of Commons",
      "slug": "house-of-commons",
      "url": "https://represent.opennorth.ca/representative-sets/house-of-commons/"
    }
  ]
}
```

### Search representatives

Search Canada's elected officials by part of their name, their office (MP, MLA, Mayor...), party, district or the body they sit in, such as the House of Commons or a city council. No API key required.

**Inputs**

- Name contains (`name`, text): Part of the official's name, e.g. Naqvi.
- Elected office (`elected_office`, text): The office exactly, e.g. MP, MLA, MPP, Mayor or Councillor.
- Party contains (`party`, text): Part of the party's name, e.g. Liberal or NDP.
- District contains (`district_name`, text): Part of the district's name, e.g. Ottawa.
- Representative set (`representative_set`, text): Only officials in this body: its slug or name from List representative sets, e.g. house-of-commons.
- Max results (`limit`, number): The most officials to return, from 1 to 100. From 1 to 100. Default: `20`.
- Skip (`offset`, number): How many matches to skip, to get the next page. From 0 to 100000. Default: `0`.

**Outputs**

- `count` (number): How many officials came back.
- `representatives` (list): The elected officials.
- `total` (number): How many officials matched in all; use Skip to page.

**Example output**

```json
{
  "count": 1,
  "representatives": [
    {
      "district_name": "Ottawa Centre",
      "elected_office": "MP",
      "email": "yasir.naqvi@parl.gc.ca",
      "first_name": "Yasir",
      "gender": "M",
      "last_name": "Naqvi",
      "name": "Yasir Naqvi",
      "offices": [
        {
          "address": "House of Commons\nOttawa ON  K1A 0A6",
          "fax": "1 613 996-5322",
          "phone": "1 613 996-5322",
          "type": "legislature"
        }
      ],
      "party": "Liberal",
      "personal_url": null,
      "photo_url": "https://www.ourcommons.ca/Content/Parliamentarians/Images/OfficialMPPhotos/45/NaqviYasir_Lib.jpg",
      "representative_set": "House of Commons",
      "representative_set_slug": "house-of-commons",
      "source_url": "https://www.ourcommons.ca/Members/en/search?caucusId=all&province=all",
      "url": "https://www.ourcommons.ca/Members/en/yasir-naqvi(110572)"
    }
  ],
  "total": 1
}
```
