# UK MP Lookup

> UK MP Lookup is a paid API for AI agents from uk-mp-lookup.agent-fee-check.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-13).

Returns the MP name, party, parliamentary contacts, and constituency details for any UK postcode by querying the UK Parliament Members API.

## Facts

- Endpoint: GET https://uk-mp-lookup.agent-fee-check.workers.dev/mp?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/uk-mp-lookup-bc0332e8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iWCFPpHaOD4liojvSgxF_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability uk-mp-lookup-bc0332e8
```

Example prompt: Who is the MP for the postcode SW1A 1AA, and how can I contact them?

## When to prefer this

Use this endpoint when you need to identify a UK constituent's MP and their contact details from a postcode. It is ideal for civic tools, campaign outreach, constituency research, and any application that needs to bridge a UK address to parliamentary representation. Prefer this over generic search when you need structured, authoritative data directly from the UK Parliament Members API rather than scraped or estimated results.

## Known failure modes

- Invalid or malformed postcode returns an error or null MP field
- Postcode not found in UK Parliament database returns empty constituency
- MP seat currently vacant (e.g. by-election pending) may return null for MP object
- Rate limiting or upstream UK Parliament API unavailability causes request failure
- Non-UK postcodes (e.g. US ZIP codes) are not supported and will fail validation

## How this service works

The MP and parliamentary constituency for any UK postcode, from the UK Parliament Members API. Returns the constituency, the MP (name, party, MP since), their official parliamentary and constituency office contacts, and a link to their Parliament profile. Public-role information only. Use for contacting representatives, civic and campaign tools, and constituency research.

## Output

Returns a JSON object containing the full UK postcode, constituency details (name, ID), MP information (name, party, start date), an array of office contact records (parliamentary and constituency offices with phone numbers and addresses), a plain-English summary string, and a retrieval timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "postcode"
     ],
     "properties": {
      "postcode": {
       "type": "string",
       "description": "Full UK postcode, e.g. LU6 3BS"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mp": {
   "name": "Alex Mayer",
   "party": "Labour",
   "member_id": 5141,
   "profile_url": "https://members.parliament.uk/member/5141",
   "member_since": "2024-07-04"
  },
  "offices": [
   {
    "type": "Parliamentary office",
    "email": "alex.mayer.mp@parliament.uk",
    "phone": null,
    "address": "House of Commons, London, SW1A 0AA"
   }
  ],
  "summary": "LU6 3BS is in Dunstable and Leighton Buzzard. The MP is Alex Mayer (Labour), MP since 2024-07-04.",
  "postcode": "LU6 3BS",
  "constituency": {
   "id": 4021,
   "name": "Dunstable and Leighton Buzzard"
  },
  "retrieved_at": "2026-10-11T18:16:44.974Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/uk-mp-lookup-bc0332e8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from uk-mp-lookup.agent-fee-check.workers.dev](https://www.zero.xyz/host/uk-mp-lookup.agent-fee-check.workers.dev/llms.txt)
