Skip to main content

acuris-geo

Python SDK for the Acuris Address Validation, Autocomplete, Geocoding, and UK PAF Postcode Lookup API (api.acuris-geo.com).

pip install acuris-geo

Requires Python ≥ 3.9. One runtime dep: requests.

Quick start

from acuris_geo import AcurisClient

# api_key falls back to env ACURIS_API_KEY if omitted.
cli = AcurisClient(api_key="...")

# Address validation (fielded)
r = cli.validate({
    "country": "deu",
    "street": "Friedrichstraße",
    "house_number": "43",
    "city": "Berlin",
    "postcode": "10117",
})
print(r["match_type"], r["lat"], r["lng"])

# Address validation (single-line string)
cli.validate("100 Pennsylvania Ave NW, Washington DC 20500", country="usa")

# Forward geocoding
cli.geocode("usa", street="Pennsylvania Ave NW", hno="1600",
            city="Washington", state="DC")

# Reverse geocoding
cli.reverse(51.5014, -0.1419, country="gbr")

# Address autocomplete (type-ahead)
cli.autocomplete("Friedrichstr", country="deu", limit=5)   # alias: cli.suggest(...)

# Autocomplete (UK is routed to the Royal Mail PAF service automatically;
# the query may be, or start with, a postcode)
cli.autocomplete("SW1A 2", country="gbr")

# UK Royal Mail PAF postcode lookup
cli.postcode_lookup("SW1A 2AA")
# → {"count": 1, "addresses": [{"street": "DOWNING STREET", ...}]}

# Validate up to 200 addresses per request
cli.validate_batch(["Eckenbertstraße 31, 67549 Worms"], country="deu")

# Free evaluation key (no key needed). Set accept_terms=True ONLY after the
# person has agreed to the Terms of Service and the UK PAF Evaluation Terms:
#   https://api.acuris-geo.com/legal/terms
#   https://api.acuris-geo.com/legal/uk-evaluation-terms
from acuris_geo import request_dev_key
request_dev_key("you@example.com", accept_terms=True)

Errors

Every error subclasses AcurisError:

from acuris_geo import (
    AcurisAuthError,        # 401 — invalid / missing API key
    AcurisQuotaError,       # 402 / 403 — pack expired or quota reached
    AcurisValidationError,  # 400 / 422 — bad request shape or input
    AcurisNotFoundError,    # 404 — postcode / address not in reference data
    AcurisRateLimitError,   # 429 — anonymous tier or per-key cap
    AcurisServerError,      # 5xx — transient; SDK retries automatically
    AcurisTimeoutError,     # local timeout
    AcurisNetworkError,     # connection / DNS / TLS failure
)

Each exception carries .status, .endpoint, and .body (the parsed JSON response body) so you can surface server-side detail without re-parsing.

try:
    cli.validate_batch(rows)
except AcurisQuotaError as e:
    print("quota reached:", e.body)

Pricing and quota

Plans, quota and what each call costs are on acuris-geo.com/acuris-pricing. /check-key?key=... and /account/balances report your current balance.

Retries + timeouts

AcurisClient(max_retries=3, timeout_s=5.0) (the defaults) retries on 5xx and 429 with exponential backoff (0.2s → 0.4s → 0.8s → 1.6s capped at 2s). Pass max_retries=0 to disable, or timeout_s=30.0 for batch calls.

Connection pooling

The client uses a single requests.Session so HTTPS connections are reused across calls. Pass session= if you need to share a session with other HTTP traffic (e.g. behind a proxy or with custom adapters).

License

MIT

Metadata

Release files for acuris-geo 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acuris-geo 0.2.0
File Size Uploaded Provenance Actions
acuris_geo-0.2.0.tar.gz 11.5 kB Without provenance Details for acuris_geo-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acuris-geo 0.2.0
File Interpreter ABI Platform Actions
acuris_geo-0.2.0-py3-none-any.whl Python 3 none any Details for acuris_geo-0.2.0-py3-none-any.whl

Total release size: 21.6 kB

Release files / acuris_geo-0.2.0.tar.gz

Download URL acuris_geo-0.2.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
71991e6dd5abc8f23f3dad3e2e5d2aac492ab59c62ef29a81ba55d10ed16eace
BLAKE2b-256 checksum
How to use checksums
365697f37e666865a43f4e316e8b971e26f86d7de2036c79e10ebeb7a92e5610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / acuris_geo-0.2.0-py3-none-any.whl

Download URL acuris_geo-0.2.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66137988fd6c3e30e9dfa03f0120ca97cbec9b9d96c2242eadeeeb3f5bc9280c
BLAKE2b-256 checksum
How to use checksums
b7f7c8dbc55f82a484dd034d7c81c57bf76a7570ad6e32e916f78cd43e3a0b58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for acuris-geo 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page