Last updated

Quickstart

Get started with Lusha’s API in a few steps:

  1. API Key Setup

    • Generate and manage your key in the Lusha dashboard.
    • Store securely (e.g., environment variables).
  2. Authenticate Requests

    • Add Authorization header: Bearer YOUR_API_KEY.
    • Example (cURL & Node.js snippets included).
  3. First Call: GET /v2/person

    • Send firstName, lastName, company.
    • Parse JSON and locate fields like email, phone.
  4. Error Handling Tips

    • Check for 4xx/5xx codes.
    • Handle rate limits (HTTP 429) with retry logic.

Core Concepts

Key concepts for consistent, reliable usage:

  • Endpoints at a Glance

    ResourceEndpointPurpose
    PersonGET /v2/personLookup contact details
    CompanyGET /v2/companyLookup company info
    BulkPOST /v2/bulkBatch enrichment
    ProspectGET /prospectingProspect new info
  • Data Models

    • Important fields: email, phone, location, linkedin.
    • Nested JSON objects: validate with provided schemas.
  • Rate Limits & Pagination

    • Rate limit: 50 requests/minute.
    • Pagination: define page: X token in request.
  • Error Codes & Debugging

    • Check table of common HTTP statuses + Lusha error codes.
    • Logging best practices to capture request/response.

Integration Guides

Step-by-step tutorials for common platforms:

  • Salesforce

    • Apex trigger on Lead creation → call Lusha API → update fields.
    • Flows for easy webhook API implementation.
  • HubSpot

    • Workflow → custom webhook
    • Map response to HubSpot properties (YAML/JSON examples).
  • Webhooks

    • Subscribe to events (e.g., data updates).
    • Verify signatures; Node.js/Express listener example.
  • Bulk Enrichment

    • Python script: read CSV, POST /v1/bulk, poll for results, write CSV/database.
  • SDK Examples (Node.js, Python, Java)

    • Community wrappers: install, initialize, fetch data.
    • Equivalent raw HTTP examples.

Advanced Topics

Deep dives for power users:

  • Performance & Cost

    • Batch requests, caching (Redis/in-memory), cost optimization.
  • Complex Queries

    • Combine parameters for higher accuracy, client-side fuzzy matching.
  • Security Best Practices

    • Encrypt API keys, rotate keys, enforce least privilege, audit logging.
  • Orchestration Workflows

    • Slack /enrich slash command → serverless → Lusha → Slack.
    • Terraform/CloudFormation snippets for AWS Lambda and API Gateway.
  • Data Quality & Fallbacks

    • Handle missing fields: fallback to alternative data sources, merge multiple enrichers.
  • Schema & Data Modeling

    • DB table structures (Postgres, MongoDB), indexing (email hash, domain), migration strategies.
  • Compliance & Privacy

    • GDPR/CCPA guidelines: retention policies, anonymization, privacy disclaimers.
  • Custom Connectors

    • Build for Workato, Zapier, Make: HTTP module config, auth, mapping, error patterns.

Resources

  • Full API Doc: Complete endpoint docs with examples (cURL, Node.js, Python, Java).
  • Changelog & Release Notes: Track new endpoints, parameter changes, deprecations.
  • Help Center: Links to community-driven wrappers; installation and usage.
  • Explore the Postman Public Environment: Test out the API endpoints and see how the data is structured. You can access our public Postman workspace to experiment with live examples and understand the response formats - Access Lusha's Postman Workspace!