Your unique identifier for this record
Lantern API docs (1.4.1)
The Lantern API provides two major processing modes to enhance your contact and business data:
🔄 Sync API - Real-time Processing (/v1/enrich/) Process individual records and get immediate responses. Perfect for:
- Real-time user interfaces
- Single record processing
- Immediate validation workflows
Available Services:
- Phone Enrichment: Find phone numbers for contacts
- Email Enrichment: Discover professional email addresses
- Company Enrichment: Get comprehensive firmographics and website-verified data
- Person Enrichment: Enrich person records with contact and professional data
- AI Enrichment: Generate insights, analysis, and structured data using advanced language models
- Deep Research: Comprehensive research using advanced language models with real-time search capabilities
🎯 Match API - Object Matching (/v1/match/) Match Account/Contact/Lead objects with sophisticated matching logic. Perfect for:
- CRM data deduplication
- Lead-to-account matching
- Contact matching and merging
Available Services:
- Account Matching: Match company records with exact, fuzzy, and AI-assisted logic
- Contact Matching: Match contact records with grouped boolean logic
- Lead Matching: Match lead records with confidence scoring and explanations
🔗 Salesforce API - Lead Conversion (/v1/salesforce/) Convert Salesforce Leads to Contacts and Accounts with intelligent matching. Perfect for:
- Automated lead conversion workflows
- CRM data management
- Lead-to-contact merging
Available Services:
- Lead Conversion: Convert leads to contacts and accounts with duplicate prevention
- Auto-Merge: Intelligent merging with configurable policies
- Round-Robin Assignment: Automatic owner assignment from pools
🎯 Routing API - Round Robin Assignment (/v1/routing/) Assign Salesforce objects to users using intelligent round-robin logic. Perfect for:
- Fair distribution of leads and opportunities
- Automated user assignment
- Pool-based routing management
Available Services:
- Round Robin Assignment: Assign objects to users with sequence tracking
- Pool Management: Organize users into assignment pools
- Reset Rules: Support for resetting rotation with specific reasons
⚡ Triggers API - Instant Enrichment (/v1/triggers/) Trigger instant enrichment on Salesforce record creation/updates. Perfect for:
- Real-time data enrichment
- Automated workflow triggers
- Near real-time processing
Available Services:
- Salesforce Webhooks: Real-time trigger processing via Platform Events
- Polling Fallback: SOQL-based polling every 2 minutes for comprehensive coverage
- Instant Enrichment: Automatic enrichment workflows on record changes
📊 Logs API - Audit & Reporting (/v1/logs/) Comprehensive audit trails and reporting for all routing actions. Perfect for:
- Compliance and audit requirements
- Performance analysis and monitoring
- User activity tracking
Available Services:
- Route Log Export: Export logs with filtering and multiple formats (JSON/CSV)
- Log Statistics: Statistical analysis of log data for reporting
- Retention Management: Configurable retention policies and cleanup schedules
🚀 Async API - Batch Processing (/v1/agents/) Process multiple records (1-1000) asynchronously with results stored in S3. Perfect for:
- Large-scale bulk processing
- Background processing workflows
- Cost breakdown results on s3 too
Available Services:
- Phone Enrichment Batch: Bulk phone number enrichment
- Email Enrichment Batch: Bulk email address enrichment
- Deep Research Batch: Bulk AI-powered research with specialized agents
💳 Credits API - Credit Management (/v1/credits/) Monitor and manage your credit usage and availability. Perfect for:
- Tracking credit consumption across time periods
- Checking remaining credit balance
Available Services:
- Credit Usage: Get detailed usage statistics for specific date ranges
- Remaining Credits: Check current credit balance
🔄 Workflow Trigger API - External System Integration (/v1/workflows/) Trigger enrichment and routing workflows from external systems. Perfect for:
- Eloqua, CDP, and Data Lake integrations
- Marketing automation platform triggers
- High-volume bursty event processing
Available Services:
- Workflow Trigger: Generic interface for initiating workflows from any external system
- Audit Logging: Complete request/response logging for compliance
- Retry Logic: Automatic retries with exponential backoff
📝 Form Submit API - Direct Form Processing (/v1/forms/) Accept form submissions and immediately enrich and disposition data. Perfect for:
- Marketing automation platform integrations
- Website form processing
- Real-time lead enrichment
Available Services:
- Form Submission: Accept form data with validation
- Immediate Enrichment: Sub-5 second processing with GDPR compliance
- Flexible Output: Return enriched data or push to external systems
| Feature | Sync API | Match API | Salesforce API | Routing API | Triggers API | Logs API | Async API | Credits API | Workflow API | Form API |
|---|---|---|---|---|---|---|---|---|---|---|
| Records per request | 1 | 1-100 | 1 | 1 | 1-100 | 1-10000 | 1-1000 | N/A | 1 | 1 |
| Response time | Immediate | Immediate | Immediate | Immediate | Immediate | Immediate | Asynchronous | Immediate | Immediate | Immediate |
| Result delivery | Direct response | Direct response | Direct response | Direct response | Direct response | Direct response | S3 storage | Direct response | Direct response | Direct response |
| Use case | Real-time processing | Object matching | Lead conversion | User assignment | Instant enrichment | Audit reporting | Bulk operations | Credit monitoring | External system triggers | Form processing |
| Rate limits | Per-minute limits | Per-minute limits | Per-minute limits | Per-minute limits | Per-minute limits | Per-minute limits | Lower frequency limits | Per-minute limits | High burst support | High burst support |
All requests must include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY- Sync API Rate Limit: 50 requests per minute per API key. Can be lifted on request.
- Async API Rate Limit: 1 batch request per minute per API key. Can be lifted on request.
- Credits API Rate Limit: 10 requests per minute per API key. Can be lifted on request.
- Headers: Rate limit and credit information is returned in response headers:
X-RateLimit-Limit: The rate limit ceiling for your API keyX-Credits-Remaining: Credits remaining in your account
Error Codes:
429 Too Many Requests: Rate limit exceeded402 Payment Required: Credit limit exceeded
- API Key Security: Keep your API key secure and never expose it in client-side code
- Rate Limit Handling: Implement exponential backoff when receiving 429 responses
- Error Handling: Always check the
successfield before processing results - Credit Management: Monitor your credit usage and remaining balance through response headers
- Use Unique Record IDs: Always provide unique record IDs to enable caching and prevent duplicate processing
- Set Credit Limits: Use
max_creditsparameter to control spending per request - Cache Awareness: Check the
cachedfield to understand if fresh data was retrieved - Monitor Confidence Levels: Use confidence scores to determine data quality for your use case
- Batch Sizing: Submit 100-1000 records per batch for optimal performance
- Result Monitoring: Get submission details from API call when batch is accepted, then poll results from S3 until completion
- Credit Planning: Set appropriate
max_creditslimits for large batches - Error Handling: Handle batch-level errors and individual record failures within results
- Proactive Monitoring: Check remaining credits before large operations
- Usage Tracking: Use date range filtering to analyze spending patterns
- Budget Planning: Monitor usage trends to forecast credit needs
https://api-gateway.agenthq.withlantern.com/
http://localhost:8000/
Request
Enriches contact records with phone number data using multiple data sources.
The Phone Enrichment API enriches contact records with phone number data using multiple data sources. The service intelligently cascades through different lookup methods to maximize success rates.
record_id: Your unique identifier for this record (required) - used for caching and duplicate detectionfirst_name: Contact's first name (optional) - required for name-based enrichmentlast_name: Contact's last name (optional) - required for name-based enrichmentcompany: Company name or website URL (optional) - required for name-based enrichmentemail: Contact's email address (optional) - can be used standalone for enrichmentlinkedin_id: Contact's linkedin profile identifier/slug (optional) - can be used standalone for enrichmentdomain: Company domain (optional) - enhances name/company enrichment method
- Single record per request
- Must include
record_id record_idmust be unique per contact record in your system- Must provide at least one of the following data combinations:
- Name + Company/Domain:
first_name,last_name,company(optionally enhanced withdomain) - LinkedIn Profile Only:
linkedin_id - Email Only:
email
- Name + Company/Domain:
- Enrichment prioritizes data in this order:
- Name + Company/Domain: Primary method when available
- LinkedIn Profile: Fallback when name/company data is incomplete
- Email Only: Final fallback when other data is insufficient
success: Boolean indicating request successrecord_id: Echo of the input record IDfirst_name: Echo of input first name (or null if not provided)last_name: Echo of input last name (or null if not provided)company: Echo of input company (or null if not provided)email: Echo of input email or email found during enrichment (or null if not found)linkedin_id: Echo of input LinkedIn ID or LinkedIn profile found during enrichment (or null if not found)phone: International format phone number (E.164) or null if not foundprocessing_time_ms: Time taken to process the request in milliseconds
Contact's first name (required for name-based enrichment)
Contact's last name (required for name-based enrichment)
Company name or website URL (required for name-based enrichment)
LinkedIn profile identifier/slug (e.g., 'john-doe-123456')
- Lantern API server
https://api-gateway.agenthq.withlantern.com/v1/enrich/phone
- Local API server
http://localhost:8000/v1/enrich/phone
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-gateway.agenthq.withlantern.com/v1/enrich/phone \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": "string",
"first_name": "string",
"last_name": "string",
"company": "string",
"email": "string",
"linkedin_id": "john-doe-123456",
"domain": "string"
}'Success Response
Echo of input first name
Echo of input last name
Echo of input email or email found during enrichment
Echo of input LinkedIn ID or LinkedIn profile found during enrichment
International format phone number (E.164) or null if not found
{ "success": true, "record_id": "contact_001", "first_name": "John", "last_name": "Smith", "company": "Acme Corp", "email": "john.smith@acme.com", "linkedin_id": "john-smith-123456", "phone": "+1-555-123-4567", "processing_time_ms": 1250 }
Request
Enriches contact records with email address data using multiple data sources.
The Email Enrichment API enriches contact records with email address data using multiple data sources. The service uses various lookup methods to find professional email addresses for contacts based on their name and company information.
record_id: Your unique identifier for this record (required) - used for caching and duplicate detectionfirst_name: Contact's first name (required)last_name: Contact's last name (required)company: Company name or website URL where the contact works (required)domain: Company domain (optional) - if not provided, will be extracted from company fieldlinkedin: Contact's linkedin url (optional) - improves lookup accuracy when availablemax_credits: Maximum credits to spend on this request (optional, defaults to your account limit)
- Single record per request
- Must include
record_id,first_name,last_name, andcompany record_idmust be unique per contact record in your systemdomainis optional but improves accuracy when providedlinkedinis optional but improves accuracy when providedmax_creditsmust be a positive integer if provided
success: Boolean indicating request successrecord_id: Echo of the input record IDfirst_name: Echo of input first namelast_name: Echo of input last namecompany: Echo of input companyemail: Professional email address or null if not foundconfidence: Confidence level (high,medium,low) or nullcredits_consumed: Number of credits used for this requestcredits_remaining: Credits remaining in your account after this requestprocessing_time_ms: Time taken to process the request in millisecondscached: Boolean indicating if this result was returned from cache (no credits consumed if true)
Email enrichment consumes credits based on the data sources queried:
- Cached Result: 0 credits (if same record_id queried recently)
- Email Search: 5 credits
Company domain (optional)
LinkedIn profile identifier/slug (e.g., 'john-doe-123456')
- Lantern API server
https://api-gateway.agenthq.withlantern.com/v1/enrich/email
- Local API server
http://localhost:8000/v1/enrich/email
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-gateway.agenthq.withlantern.com/v1/enrich/email \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": "string",
"first_name": "string",
"last_name": "string",
"company": "string",
"company_domain": "string",
"linkedin_id": "john-doe-123456",
"max_credits": 0
}'Success Response
Professional email address or null if not found
Confidence score (0.0-1.0) or null if disabled/not found
Credits remaining in your account after this request
Time taken to process the request in milliseconds
{ "success": true, "record_id": "contact_001", "first_name": "John", "last_name": "Smith", "company": "Acme Corp", "email": "john.smith@acme.com", "confidence": "high", "credits_consumed": 3, "credits_remaining": 47, "processing_time_ms": 750, "cached": false }
Request
Enriches company records with firmographics and website-verified data.
The Company Enrichment API enriches company records with comprehensive firmographics data including company details, location information, industry classification, size range, and geographic coordinates.
record_id: Unique identifier for this enrichment request (required)company_name: Company name (optional) - improves accuracy when provideddomain: Company domain (optional) - improves accuracy when providedcountry: Country code or name (optional) - helps with geographic targetingexternal_ids: External system IDs (optional) - for integration with CRM systemseffort: Enrichment effort level (optional, default: low)max_credits: Maximum credits to spend on this request (optional, defaults to your account limit)
record_idis requiredcompany_name,domainare optional but improves accuracy when providedexternal_idsshould be a dictionary of key-value pairs (e.g., {"sf_account_id": "001xx000..."})max_creditsmust be a positive integer if provided
success: Boolean indicating request successrecord_id: Echo of the input record IDcompany: Enriched company data object containing:name: Company namedomain: Company domainlinkedin_url: LinkedIn company page URLhq: Headquarters location (city, state, country, postal_code)size_range: Employee size range (e.g., "500+")industry: Industry classificationgeo: Geographic coordinates and location details (lat, lon, county)last_verified_at: ISO timestamp of last verification
confidence: Confidence score (0.0-1.0) or null if disabled/not foundcredits_consumed: Number of credits used for this requestcredits_remaining: Credits remaining in your account after this requestprocessing_time_ms: Time taken to process the request in millisecondscached: Boolean indicating if this result was returned from cache
Company enrichment consumes credits based on the data sources queried:
- Cached Result: 0 credits (if same company queried recently)
- Company Lookup: 5 credits
Company name
External system IDs (e.g., Salesforce account ID)
- Lantern API server
https://api-gateway.agenthq.withlantern.com/v1/enrich/company
- Local API server
http://localhost:8000/v1/enrich/company
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-gateway.agenthq.withlantern.com/v1/enrich/company \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": "string",
"company_name": "string",
"domain": "string",
"country": "string",
"external_ids": {
"property1": "string",
"property2": "string"
},
"effort": "low",
"max_credits": 1
}'{ "success": true, "record_id": "company_001", "company": { "name": "Databricks", "domain": "databricks.com", "linkedin_url": "https://www.linkedin.com/company/databricks", "hq": { … }, "size_range": "500+", "industry": "Technology", "geo": { … }, "last_verified_at": "2025-09-12T18:22:01Z" }, "confidence": 0.9, "credits_consumed": 1, "credits_remaining": 10, "processing_time_ms": 1200, "cached": true }
Request
Enriches person records with comprehensive contact and professional data.
The Person Enrichment API enriches person records with comprehensive contact information, professional details, and verification status. This service provides detailed person data including contact information, job titles, seniority levels, and email/phone verification status.
record_id: Unique identifier for this enrichment request (required)first_name: Person's first name (required)last_name: Person's last name (required)company_domain: Company domain where the person works (required)email: Person's email address (optional)linkedin_id: LinkedIn ID or profile URL (optional)effort: Enrichment effort level (optional, default: low)max_credits: Maximum credits to spend on this request (optional, defaults to your account limit)
record_id,first_name,last_name, andcompany_domainare requiredcompany_domainshould be a valid domain formatemailshould be a valid email format when providedmax_creditsmust be a positive integer if provided
success: Boolean indicating request successrecord_id: Echo of the input record IDperson: Enriched person data object containing:full_name: Person's full nameemail: Person's email addressemail_confidence: Email confidence score (0.0-1.0)email_status: Email verification status (valid, accept_all, risky, invalid, unknown)phone: Phone numbertitle: Job titlelinkedin_url: LinkedIn profile URLjob_last_seen_at: ISO timestamp when job information was last verified
confidence: Confidence score (0.0-1.0) or null if disabled/not foundcredits_consumed: Number of credits used for this requestcredits_remaining: Credits remaining in your account after this requestprocessing_time_ms: Time taken to process the request in millisecondscached: Boolean indicating if this result was returned from cache
valid: Email address is valid and deliverableaccept_all: Email server accepts all emails (catch-all)risky: Email address may be risky or temporaryinvalid: Email address is invalid or undeliverableunknown: Email status could not be determined
Person enrichment consumes credits based on the data sources queried:
- Cached Result: 0 credits (if same person queried recently)
- Person Lookup: 4 credits
LinkedIn ID or profile URL
- Lantern API server
https://api-gateway.agenthq.withlantern.com/v1/enrich/person
- Local API server
http://localhost:8000/v1/enrich/person
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-gateway.agenthq.withlantern.com/v1/enrich/person \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": "string",
"first_name": "string",
"last_name": "string",
"company_domain": "string",
"email": "string",
"linkedin_id": "string",
"effort": "low",
"max_credits": 1
}'{ "success": true, "record_id": "person_001", "person": { "full_name": "Jane Doe", "email": "jane.doe@trinet.com", "email_confidence": 0.93, "email_status": "valid", "phone": "+1-415-555-0199", "title": "Director, RevOps", "linkedin_url": "https://linkedin.com/in/janedoe", "job_last_seen_at": "2025-08-30T15:12:00Z" }, "confidence": 0.9, "credits_consumed": 1, "credits_remaining": 10, "processing_time_ms": 1200, "cached": true }
Request
The AI Enrichment API allows you to enrich data or generate insights using advanced language models. Send a query or prompt and receive AI-generated responses that can include analysis, summaries, recommendations, or structured data extraction.
{
"query": "string (required)",
"options": {
"format_json": "boolean (optional)"
},
"effort": "string (optional, default: low)"
"max_credits": "integer (optional)"
}query: The main prompt or question to send to the AI model (required)options(optional): Additional configuration optionsformat_json: Whether to return response in structured JSON format (defaults to false)
effort(optional): Specifies the level of enrichment effort to apply, by default is lowmax_creditsmust be a positive integer if provided
queryis required and must be non-emptyoptions.format_jsonwhen provided must be a boolean valueeffortwhen provided accepted values are: low, medium, high- Query length should not exceed 8000 characters
success: Boolean indicating request successquery: Echo of the input queryresponse: AI-generated response (string or structured object based on format_json setting)confidence: AI confidence score in the response (0.0-1.0)credits_consumed: Number of credits used for this requestcredits_remaining: Credits remaining in your account after this requesttoken_usage: Token consumption detailsprompt_tokens: Tokens used in the inputcompletion_tokens: Tokens used in the responsetotal_tokens: Total tokens consumed
processing_time_ms: Time taken to process the request in milliseconds
0.9-1.0: Very high confidence - factual, well-supported responses0.7-0.9: High confidence - good quality responses with minor uncertainty0.5-0.7: Medium confidence - reasonable responses but may need verification0.0-0.5: Low confidence - speculative or uncertain responses
- Data Analysis & Insights: Analyze trends, patterns, and generate business insights
- Content Generation: Create marketing copy, emails, summaries, and reports
- Data Extraction: Parse unstructured text and extract structured information
- Research & Summarization: Synthesize information and provide comprehensive overviews
- Decision Support: Generate recommendations and evaluate options
- Text Enhancement: Improve, rewrite, or optimize existing content
AI enrichment consumes credits based on the complexity and length of the response:
- Simple Queries: 1-3 credits (short responses, basic analysis)
- Standard Queries: 3-6 credits (medium-length responses, data extraction)
- Complex Analysis: 6-12 credits (detailed analysis, research, long-form content)
- JSON Structured Output: +1-2 credits additional (for formatting and validation)
- Lantern API server
https://api-gateway.agenthq.withlantern.com/v1/enrich/ai
- Local API server
http://localhost:8000/v1/enrich/ai
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-gateway.agenthq.withlantern.com/v1/enrich/ai \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"query": "string",
"options": {
"format_json": false
},
"effort": "low",
"agent_type": "funding"
}'{ "success": true, "query": "Analyze the market trends for electric vehicles in 2024", "response": "Based on current market data, electric vehicle adoption is accelerating rapidly in 2024. Key trends include: 1) Increased affordability with new models under $30k, 2) Improved charging infrastructure with 40% more stations, 3) Enhanced battery technology offering 300+ mile ranges...", "confidence": 0.85, "credits_consumed": 5, "credits_remaining": 45, "token_usage": { "prompt_tokens": 45, "completion_tokens": 234, "total_tokens": 279 }, "processing_time_ms": 1200 }
- Lantern API server
https://api-gateway.agenthq.withlantern.com/v1/enrich/research
- Local API server
http://localhost:8000/v1/enrich/research
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-gateway.agenthq.withlantern.com/v1/enrich/research \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"query": "Research the latest developments in renewable energy storage technology",
"options": {
"format_json": false
},
"agent_type": "funding"
}'Successful Response
Deep research response with comprehensive analysis
AI confidence score (0.0-1.0) or null if disabled
Credits remaining in your account after this request
Time taken to process the request in milliseconds
{ "success": true, "query": "string", "response": "string", "confidence": 1, "credits_consumed": 0, "credits_remaining": 0, "token_usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0 }, "processing_time_ms": 0, "agent_used": "string" }