Python SDK
Installation
Section titled “Installation”pip install bizverifyRequires Python 3.9+.
Quick start
Section titled “Quick start”from bizverify import BizVerify
client = BizVerify(api_key="bv_live_...")
result = client.verification.verify("Acme Corporation", "us-fl")print(result.status, result.data)Async support
Section titled “Async support”from bizverify import AsyncBizVerifyimport asyncio
async def main(): async with AsyncBizVerify(api_key="bv_live_...") as client: result = await client.verification.verify("Acme Corporation", "us-fl") print(result.data)
asyncio.run(main())Passwordless auth
Section titled “Passwordless auth”client = BizVerify()
# Step 1: Request a codeclient.auth.request_access("you@company.com", accept_terms=True)
# Step 2: Verify code — client auto-configuresresp = client.auth.verify_access("you@company.com", "123456", label="my-app")print(resp.api_key)Verify and wait
Section titled “Verify and wait”job = client.verification.verify_and_wait( "Acme Inc", "us-fl", timeout=60.0, on_status_change=lambda s: print(s.status),)print(job.data)Search
Section titled “Search”# Single pageresponse = client.search.find("Acme", jurisdiction="us-fl", limit=10)for result in response.results: print(result.entity_name, result.confidence)
# Auto-paginatefor result in client.search.find_all("Acme"): print(result.entity_name)
# Async auto-paginateasync for result in client.search.find_all("Acme"): print(result.entity_name)Fetch a cached entity
Section titled “Fetch a cached entity”Retrieve a previously verified business by its entity_id (returned from a verify or search call) — free, no credits charged.
entity = client.entities.get("550e8400-e29b-41d4-a716-446655440000")
print(entity.entity_name, entity.status)print(entity.registered_agent.name if entity.registered_agent else None)print(entity.officers)print(entity.last_verified_at)Configuration
Section titled “Configuration”client = BizVerify( api_key="bv_live_...", base_url="https://api.bizverify.co", # default max_retries=2, # retries on 5xx timeout=30.0, # seconds)
# Context manager for automatic cleanupwith BizVerify(api_key="bv_live_...") as client: result = client.verification.verify("Acme Inc", "us-fl")Error handling
Section titled “Error handling”from bizverify import ( BizVerify, AuthenticationError, InsufficientCreditsError, RateLimitError, NotFoundError, ValidationError, BizVerifyError,)
try: result = client.verification.verify("Acme", "us-fl")except InsufficientCreditsError: print("Need more credits")except RateLimitError as e: print(f"Retry after {e.retry_after}s")except AuthenticationError: print("Invalid API key")except NotFoundError: print("Not found")except ValidationError as e: print(f"Invalid request: {e.message}")except BizVerifyError as e: print(f"Error {e.code}: {e.message}")Full reference
Section titled “Full reference”See the SDK README on GitHub for the complete API.