fca-api
An async Python client for the UK Financial Conduct Authority's Financial Services Register RESTful API.
Covers firms, individuals, funds, permissions, disciplinary history, and regulated markets, with Pydantic-typed responses and cursor-based pagination.
Requirements
- Python 3.11+
httpx,pydantic
Installation
pip install fca-api
Quick Start
import asyncio
import fca_api
async def main():
async with fca_api.async_api.Client(
credentials=("your.email@example.com", "your_api_key")
) as client:
page = await client.search_frn("Barclays")
for firm in page.data:
print(f"{firm.name} (FRN: {firm.frn}) — {firm.status}")
if page.data:
details = await client.get_firm(page.data[0].frn)
print(details.name, details.status, details.effective_date)
if __name__ == "__main__":
asyncio.run(main())
Two clients
fca_api.async_api.Client— Pydantic-typed responses, cursor pagination, the default choice.fca_api.raw_api.RawClient— thin wrapper around the HTTP endpoints; raw JSON in, raw JSON out.
Usage Examples
Pagination
async with fca_api.async_api.Client(credentials=("email", "key")) as client:
page = await client.search_frn("revolution")
while True:
for firm in page.data:
print(f"{firm.name} — {firm.status}")
if not page.pagination.has_next:
break
page = await client.fetch_next_page(page.pagination.next_page)
# Or collect at least N items in one call:
page = await client.search_frn("revolution", result_count=100)
The next_page token is self-contained — it embeds the endpoint and arguments,
so a separate process can resume with only the token in hand. See
PageTokenSerializer if you want to sign or encrypt tokens crossing a trust boundary.
Firm information
firm = await client.get_firm("123456")
print(firm.name, firm.status)
addresses = await client.get_firm_addresses("123456")
for address in addresses.data:
print(", ".join(address.address_lines))
Individual and fund searches
people = await client.search_irn("John Smith")
for person in people.data:
print(f"{person.name} (IRN: {person.irn})")
funds = await client.search_prn("Vanguard")
for fund in funds.data:
print(f"{fund.name} (PRN: {fund.prn})")
Error handling
import fca_api.exc
try:
firm = await client.get_firm("invalid_frn")
except fca_api.exc.FcaRequestError as e:
print(f"API request failed: {e}")
Rate limiting
Pass any async context manager factory as api_limiter; the client enters it
around each request.
from asyncio_throttle import Throttler
async with fca_api.async_api.Client(
credentials=("email", "key"),
api_limiter=Throttler(rate_limit=10),
) as client:
page = await client.search_frn("test")
Raw client
async with fca_api.raw_api.RawClient(credentials=("email", "key")) as client:
response = await client.search_frn("Barclays")
for item in response.data or []:
print(item)
print(response.result_info)
Documentation
Full reference at docs.release.art/fca-api.
Every public class and method carries a docstring; use help() in the REPL or
your IDE.
Authentication
Get credentials from the FCA Developer Portal (free registration). Keep them out of version control.
License
Mozilla Public License 2.0 — see LICENSE.
Metadata
Release files for fca-api 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fca_api-2.0.0.tar.gz | 39.1 kB | Without provenance | Details for fca_api-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fca_api-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for fca_api-2.0.0-py3-none-any.whl |
Total release size: 83.2 kB
Release files / fca_api-2.0.0.tar.gz
| Download URL | fca_api-2.0.0.tar.gz |
|---|---|
| Size | 39.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
deee6d397021a9abfcd060538a85c96fdc062480c2570cfc0285004f2cb21bfb
|
|
BLAKE2b-256 checksum How to use checksums |
51f6bfbe28fa4b5fad88bfd46ad48ef166162a1b6e4614a904a968a0cc80ec46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.27.0 CPython/3.13.13 Linux/6.17.0-1018-azure
|
Release files / fca_api-2.0.0-py3-none-any.whl
| Download URL | fca_api-2.0.0-py3-none-any.whl |
|---|---|
| Size | 44.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9445d5d73fb114dcdc1ed8cd74bd45713ca419ee30f9e48b8353249a94d96df4
|
|
BLAKE2b-256 checksum How to use checksums |
f47eb3ca948f4b2b47f431d75384b0edd2349b0c266b90d77dbd3aa2317cfed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.27.0 CPython/3.13.13 Linux/6.17.0-1018-azure
|
Security for fca-api 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.