Skip to main content
The Data Legion API provides programmatic access to our person and company data. Contact Sales for API access, enterprise agreements with premium fields, and higher rate limits.

Base URL

https://api.datalegion.ai

Authentication

All requests require an API key passed via the API-Key header.
curl -X POST https://api.datalegion.ai/person/enrich \
  -H "Content-Type: application/json" \
  -H "API-Key: YOUR_API_KEY" \
  -d '{"email": "jane.doe@example.com"}'
API keys are generated in your dashboard. Contact Sales for API access and custom agreements.

Input Normalization

The enrichment API automatically normalizes inputs before matching, so you don’t need to clean your data first. Emails, phone numbers, names, URLs, and location fields are all normalized to canonical formats for consistent matching. For search endpoints, you can also use the Field Cleaning utility to clean and normalize fields before sending them to search.

Response Headers

All responses include these headers:
HeaderDescription
Request-IDUnique request identifier for support and debugging
Process-TimeRequest processing time in milliseconds
RateLimit-PolicyActive rate limit policy (e.g. 100/min)
RateLimit-LimitRate limit ceiling for your API key
RateLimit-RemainingRequests remaining in current window
RateLimit-ResetUnix timestamp when limit resets

Errors

The API uses standard HTTP status codes and returns errors in a consistent JSON format:
{
  "error": "not_found",
  "message": "No person found matching the provided parameters."
}
Some errors include a details field with structured data for programmatic use:
{
  "error": "insufficient_credits",
  "message": "Insufficient credits. This request requires up to 5 credits but only 2 are available.",
  "details": {
    "credits_required": 5,
    "credits_available": 2,
    "contact": "support@datalegion.ai"
  }
}

Status Codes

CodeMeaning
200Success
400Bad request: missing or invalid parameters
401Unauthorized: invalid or missing API key
402Insufficient credits: contract balance exhausted or expired
403Forbidden: API key does not have access to this endpoint
404Not found: no matching record
422Validation error: invalid field format
429Rate limit exceeded
500Internal server error
503Service temporarily unavailable

Rate Limiting

Default rate limits vary by endpoint:
EndpointRate Limit
POST /person/enrich100 requests/min
POST /person/search50 requests/min
POST /person/discover50 requests/min
POST /company/enrich100 requests/min
POST /company/search50 requests/min
POST /company/discover50 requests/min
POST /utility/clean100 requests/min
POST /utility/hash/email100 requests/min
POST /utility/validate100 requests/min
Higher limits are available for enterprise customers. Contact sales to discuss your needs. When rate limited, the API returns HTTP 429 with a Retry-After header indicating how many seconds to wait.
{
  "error": "rate_limit_exceeded",
  "message": "Rate limit exceeded. Try again in 60 seconds."
}

Confidence Scores

Person match results and individual data points (emails, phones, locations, socials) include a confidence level:
LevelDescription
highStrong signals of accuracy
moderateGood signals with some uncertainty
lowLimited signals, may need verification
Confidence is assigned by our proprietary scoring process. See Quality Scoring for usage guidance.
Company data does not include per-field confidence scores. Company records have a record-level num_sources count instead. See Company Data Overview for details.

Next Steps

Person Endpoints

  • Person Enrichment: Match records by email, phone, name, or social URL and append 60+ data points
  • Person Search: Query profiles using SQL-like syntax with flexible filtering
  • Person Discovery: Find people using natural language queries

Company Endpoints

Utilities

  • Field Cleaning: Normalize emails, phones, names, and other fields before sending to search
  • Email Hashing: Hash emails for privacy-safe enrichment via the email_hash parameter
  • Data Validation: Validate data format and get suggestions before sending to enrich or search

Data Schemas