# /charitycommission/charities/search

`POST /api/charitycommission/charities/search`

Price: 10 credits

Search the register of charities for England and Wales by keyword, registration status, income and expenditure bands, registration and removal dates, what the charity does, who it helps, how it helps, employee benefit bands and the areas it operates in. Returns a card per charity with its registered number and latest income.

## How to use it

Take `charity_number` from a card and pass it to charitycommission/charities and to the trustee, financial, annual-return, governance and linked-charity endpoints — they all key on that number. Left empty, `search_in` matches the keyword against every searchable field at once, so a bare charity number can pull in unrelated charities that merely mention it; pass `charityNumber` to pin it. Linked sub-charities carry a suffixed number such as 1089464-1 and are withheld unless `include_linked_charities` is set.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `query` (string, nullable) — Words matched against the register; omit it to browse by the filters alone (examples: "cancer", "1089464"; minLength: 1)
- `search_in` (array) — Restrict what `query` is matched against; matched against everything when empty (default: []; one of: "charityName", "charityNumber", "charityObjectsAndActivities", "charityClassifications", "charityWhereTheCharityOperates"; examples: ["charityName"], ["charityNumber"])
- `status` (string, nullable) — Whether the charity is still on the register or has been removed from it (one of: "registered", "removed")
- `include_linked_charities` (boolean) — Also return the linked sub-charities of a charity group, which carry a suffixed number (default: false)
- `income_from` (number, nullable) — Lowest latest annual income in GBP (examples: 1000000; min: 0)
- `income_to` (number, nullable) — Highest latest annual income in GBP (examples: 10000; min: 0)
- `expenditure_from` (number, nullable) — Lowest latest annual expenditure in GBP (min: 0)
- `expenditure_to` (number, nullable) — Highest latest annual expenditure in GBP (min: 0)
- `registration_date_from` (string, nullable) — Earliest registration date, as dd/mm/yyyy (examples: "01/01/2015"; minLength: 1)
- `registration_date_to` (string, nullable) — Latest registration date, as dd/mm/yyyy (examples: "01/01/2005"; minLength: 1)
- `removed_date_from` (string, nullable) — Earliest date of removal from the register, as dd/mm/yyyy (minLength: 1)
- `removed_date_to` (string, nullable) — Latest date of removal from the register, as dd/mm/yyyy (minLength: 1)
- `documents_overdue` (boolean, nullable) — Set true to keep only charities whose annual documents are overdue; the register offers no way to exclude them, so false returns the unfiltered set
- `grant_giving` (boolean, nullable) — Set true to keep only charities whose main way of working is making grants; the register offers no way to exclude them, so false returns the unfiltered set
- `purposes` (array) — What the charity does, as classified on the register (default: []; one of: "101:General Charitable Purposes", "102:Education/training", "103:The Advancement Of Health Or Saving Of Lives", "104:Disability", "105:The Prevention Or Relief Of Poverty", "106:Overseas Aid/famine Relief", "107:Accommodation/housing", "108:Religious Activities", "109:Arts/culture/heritage/science", "110:Amateur Sport", "111:Animals", "112:Environment/conservation/heritage", "113:Economic/community Development/employment", "114:Armed Forces/emergency Service Efficiency", "115:Human Rights/religious Or Racial Harmony/equality Or Diversity", "116:Recreation", "117:Other Charitable Purposes")
- `beneficiaries` (array) — Who the charity helps, as classified on the register (default: []; one of: "201:Children/young People", "202:Elderly/old People", "203:People With Disabilities", "204:People Of A Particular Ethnic Or Racial Origin", "205:Other Charities Or Voluntary Bodies", "206:Other Defined Groups", "207:The General Public/mankind")
- `activities` (array) — How the charity helps, as classified on the register (default: []; one of: "301:Makes Grants To Individuals", "302:Makes Grants To Organisations", "303:Provides Other Finance", "304:Provides Human Resources", "305:Provides Buildings/facilities/open Space", "306:Provides Services", "307:Provides Advocacy/advice/information", "308:Sponsors Or Undertakes Research", "309:Acts As An Umbrella Or Resource Body", "310:Other Charitable Activities")
- `employee_benefit_bands` (array) — Keep only charities reporting employees in these total benefit bands (default: []; one of: "band_60001_70000", "band_70001_80000", "band_80001_90000", "band_90001_100000", "band_100001_110000", "band_110001_120000", "band_120001_130000", "band_130001_140000", "band_140001_150000", "band_150001_200000", "band_200001_250000", "band_250001_300000", "band_300001_350000", "band_350001_400000", "band_400001_450000", "band_450001_500000", "band_over_500000")
- `working_nationally` (string, nullable) — National area the charity states it operates throughout (one of: "Throughout England And Wales", "Throughout England", "Throughout London", "Throughout Wales")
- `england_authorities` (array) — English local authority areas the charity operates in, as the register names them (default: []; examples: ["Birmingham City"])
- `london_authorities` (array) — London borough areas the charity operates in, as the register names them (default: []; examples: ["Camden"])
- `wales_authorities` (array) — Welsh local authority areas the charity operates in, as the register names them (default: []; examples: ["Cardiff"])
- `countries` (array) — Countries outside the UK the charity operates in, as the register names them (default: []; examples: ["Kenya"])
- `sort` (string) — Column the results are ordered by (default: "charity-number"; one of: "charity-name", "charity-number", "charity-income", "charity-status", "charity-reporting")
- `sort_direction` (string) — Direction the chosen sort column is ordered in (default: "asc"; one of: "asc", "desc")
- `count` (integer, required) — Max number of charities to return (min: 1; max: 10000)

## Response

### 200 — Successful Response

- `@type` (string) (default: "CharitycommissionCharityCard")
- `charity_number` (string, required)
- `organisation_number` (string, required)
- `name` (string, required)
- `url` (string, required)
- `status` (string, nullable)
- `latest_income` (number, nullable)
- `reporting_status` (string, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

