How to Verify a U.S. Business Entity via API in Python

Published 2026-04-11 by OpenSOSData

Business entity verification is a critical step in KYB compliance, vendor onboarding, and due diligence. Instead of manually searching each state Secretary of State website, you can verify any U.S. business entity programmatically using the OpenSOSData API.

Prerequisites

Basic Lookup

import requests

API_KEY = "osd_your_api_key_here"
BASE_URL = "https://api.opensosdata.com/v1/lookup"

def lookup_entity(name, state):
    response = requests.post(
        BASE_URL,
        headers={
            "x-api-key": API_KEY,
            "Content-Type": "application/json"
        },
        json={
            "entity_name": name,
            "state": state
        }
    )
    return response.json()

result = lookup_entity("Apple Inc", "DE")

if result.get("success"):
    data = result["data"]
    print(f"Entity: {data['entityName']}")
    print(f"Status: {data['status']}")
    print(f"Type: {data['entityType']}")
    print(f"Agent: {data.get('registeredAgentName', 'N/A')}")
else:
    print(f"Failed: {result.get('error')}")

Handling Errors

A 200 with "success": true means a match was found. A 200 with "success": false means no match. A 402 means your wallet is empty.

Multi-State Search

Loop through state codes to search multiple states. Each call is $0.0314.

states = ["DE", "NV", "FL", "TX", "CA"]
for state in states:
    result = lookup_entity("Global Financial Impact LLC", state)
    if result.get("success") and result.get("data"):
        print(f"Found in {state}: {result['data']['entityName']}")
        break

For more details, see the full API documentation. For state coverage, visit the state coverage page.

Start for $3.14

100 lookups, no subscription, pay as you go.

Create Free Account