Blitz API Reference
Blitz API is the primary data source for attorney contact enrichment. It provides LinkedIn-based employee discovery, email lookup, and phone number retrieval across law firms.
API Configuration
| Setting | Value |
|---|---|
| Base URL | https://api.blitz-api.ai |
| Version | v2 |
| Auth Header | x-api-key: {BLITZ_API_KEY} |
| Env Variable | BLITZ_API_KEY (in .env) |
Endpoints
| Endpoint | Method | Cost | Purpose |
|---|---|---|---|
/v2/search/employee-finder | POST | 1 credit/result | Find employees by firm LinkedIn URL |
/v2/enrichment/email | POST | 1 credit if found | Get work email from personal LinkedIn URL |
/v2/enrichment/phone | POST | 5 credits if found | Get mobile phone from personal LinkedIn URL |
/api/blitz/key-info | GET | Free | Check remaining credits and plan details |
Credit Costs Per Attorney
| Step | Cost | Condition |
|---|---|---|
| Employee finder | 1 credit/result | Always charged |
| Email enrichment | 1 credit | Only if email is found |
| Phone enrichment | 5 credits | Only if phone is found |
| Typical total | 2--7 credits | Per attorney |
Email and phone enrichment endpoints use person_linkedin_url (NOT linkedin_profile_url). Using the wrong field name causes 422 Unprocessable Entity errors with no helpful error message. This has been a recurring source of bugs.
Employee Finder
Discovers employees at a company using the firm's LinkedIn company URL.
Request
POST /v2/search/employee-finder
{
"company_linkedin_url": "https://linkedin.com/company/kirkland-ellis",
"job_function": ["Legal"],
"limit": 100
}
Response Shape
interface EmployeeFinderResponse {
results: EmployeeResult[];
total_results: number;
}
interface EmployeeResult {
first_name: string;
last_name: string;
full_name: string;
headline: string | null;
about_me: string | null;
location: {
city: string;
state_code: string;
country_code: string;
continent: string;
};
linkedin_url: string;
connections_count: number | null;
experiences: Experience[];
education: Education[];
skills: string[];
certifications: string[];
}
interface Experience {
job_title: string;
company_linkedin_url: string;
job_start_date: string | null;
job_end_date: string | null;
job_is_current: boolean;
job_location: {
city: string;
state_code: string;
country_code: string;
} | null;
}
interface Education {
degree: string | null;
organization: string;
end_date: string | null;
}
Key Notes
job_function: ["Legal"]filters to legal staff, but results still include non-attorney roles (legal assistants, paralegals). Title filtering is required post-response.limitmaxes at 100. For large firms, multiple paginated calls may be needed.- The response includes full work history (
experiences) and education, which the enrichment pipeline extracts into structured fields.
Email Enrichment
Finds work email addresses from a LinkedIn profile URL.
Request
POST /v2/enrichment/email
{
"person_linkedin_url": "https://linkedin.com/in/john-doe"
}
Response
{
"success": true,
"email": "[email protected]",
"email_status": "valid",
"source": "pattern_match"
}
Email Status Values
The email_status field only accepts these values in the attorneys table:
| Status | Meaning |
|---|---|
valid | Confirmed deliverable |
invalid | Bounced or known bad |
catch_all | Domain accepts all addresses (unverifiable) |
unknown | Status could not be determined |
The email_status enum does not include "unverified". Attempting to insert this value causes a database constraint violation. Map any non-standard status values to unknown.
Phone Enrichment
Finds mobile phone numbers from a LinkedIn profile URL.
Request
POST /v2/enrichment/phone
{
"person_linkedin_url": "https://linkedin.com/in/john-doe"
}
Response
{
"success": true,
"phone": "+15551234567",
"phone_type": "mobile"
}
Phone enrichment costs 5 credits per found number, making it the most expensive API call. The --skip-phone flag on the enrichment script omits this step.
Credit Check
Request
GET /api/blitz/key-info
Response
{
"remaining_credits": 4523,
"plan": "pro",
"rate_limit": "100/minute"
}
Always check credits before large enrichment runs. A full AmLaw 100 firm can consume 200--700 credits.
Error Handling
| HTTP Status | Meaning | Action |
|---|---|---|
| 200 | Success | Process response |
| 400 | Bad request | Check request body format |
| 401 | Unauthorized | Check BLITZ_API_KEY |
| 422 | Unprocessable Entity | Likely wrong field name (see warning above) |
| 429 | Rate limited | Back off and retry |
| 500 | Server error | Retry with exponential backoff |
Usage in Client Portal
Local Scripts
The enrichment pipeline script (scripts/enrich-attorneys.ts) calls Blitz API directly using the BLITZ_API_KEY from .env. See Enrichment Pipeline for full details.
Edge Functions
The blitz-enrich-attorney-contacts edge function provides on-demand enrichment of individual attorneys via the UI. It reads the API key from Supabase secrets.
Related Documentation
- Enrichment Pipeline -- Full enrichment workflow with scripts
- Apollo.io -- Alternative enrichment source for company data