如何通过 Python API 验证美国商业实体
2026-04-11 由 OpenSOSData 发布
企业实体验证是 KYB 合规、供应商入职和尽职调查的关键步骤。无需手动搜索各州的州务卿网站,您可以使用 OpenSOSData API 以编程方式验证任何美国商业实体。
先决条件
- Python 3.7+
- An OpenSOSData API key (sign up here)
- The requests library:
pip install requests
基本查询
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')}")
处理错误
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.
多州搜索
通过州代码循环搜索多个州。每次呼叫 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.