canonical: https://jentic.com/apis/theyworkforyou.com/theyworkforyou

# TheyWorkForYou API

TheyWorkForYou API provides access to UK Parliament data including MPs, Lords, MSPs, MLAs, constituencies, debates, written answers, and more. The API exposes 25 endpoints secured with apiKey authentication.

## For AI agents

Programmatically get API quota usage, search constituency. Covers 25 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Get API quota usage
- Search constituency
- List constituencies
- Query and filter TheyWorkForYou API records by parameters
- Monitor TheyWorkForYou API operational status and events

## Use cases

### Developer Tools Operations

Use the TheyWorkForYou API to perform developer tools operations programmatically. The API provides 25 endpoints covering core functionality including get API quota usage, search constituency, list constituencies.

Example prompt: Call GET /getQuota to get API quota usage

### Automated Quota Management

Automate quota operations by combining multiple TheyWorkForYou API endpoints. Agents can search constituency and then list constituencies in a single workflow.

Example prompt: Call GET /getConstituency to search constituency, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call TheyWorkForYou API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'get API quota usage', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/getQuota` | Get API quota usage |
| GET | `/getConstituency` | Search constituency |
| GET | `/getConstituencies` | List constituencies |
| GET | `/getPerson` | Get person details |
| GET | `/getMP` | Get MP details |
| GET | `/getMPInfo` | Get MP extra info |
| GET | `/getMPs` | List MPs |
| GET | `/getLords` | List Lords |

## Key resources

- **Quota** — API usage quota
- **Constituencies** — Constituency information
- **Members** — Parliament member information
- **Parliamentary** — Parliamentary records
- **Utility** — Utility endpoints

## Why Jentic

- **Setup:** Wiring the TheyWorkForYou API by hand means passing its key as a query parameter on every call, watching your quota through getQuota, and handling your own retries. Through Jentic you install once, import the TheyWorkForYou API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The TheyWorkForYou API is read-only parliamentary data, so scope it by operations: limit the agent to the calls it needs, such as getting an MP or listing constituencies, and leave out any route you do not want it reaching. Every operation you credit it with stays inside that allowed set.
- **Credential handling:** Your TheyWorkForYou key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get details for an MP' or 'find a constituency', and Jentic returns the matching TheyWorkForYou operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the TheyWorkForYou API use?

The TheyWorkForYou API uses an API key passed in the `key` query. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I get API quota usage with the TheyWorkForYou API?

Yes. Use the GET /getQuota endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the TheyWorkForYou API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I get API quota usage through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'get API quota usage'. Jentic returns the matching TheyWorkForYou API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the TheyWorkForYou API have?

The TheyWorkForYou API exposes 25 endpoints covering quota, constituencies, members operations.

### Can I limit what my agent is allowed to do with the TheyWorkForYou API?

Yes. Because the TheyWorkForYou API is read-only UK Parliament data, you scope it by operation in your self-hosted Jentic One instance, where your own rules decide which calls and credentials the agent may use. Credit the agent only with the operations it needs, such as getMP, getConstituency, or getConstituencies, and leave out any route you do not want it reaching. Every operation you allow stays inside that permitted set, so the agent cannot call getPerson, getLords, or getQuota unless you grant them.
