Frequently Asked Questions
General
What is LeadsDB?
LeadsDB is a lead management API that helps you store, search, and manage business leads. It provides a REST API for CRUD operations, advanced filtering, batch imports, and integrates with AI assistants via MCP (Model Context Protocol).
What can I use LeadsDB for?
- Lead collection: Store leads from web scrapers, forms, or manual entry
- Lead enrichment: Add custom attributes, tags, and notes
- Lead search: Filter and search leads with 20+ operators
- Lead scoring: Define custom scoring rules to prioritize leads
- AI integration: Connect Claude, Cursor, or other MCP clients to manage leads conversationally
Is there a free plan?
Yes! The free plan includes:
- Up to 500 leads
- 100 API requests per 10 minutes
- All core features (filtering, notes, attributes)
- MCP integration
Authentication
Where do I find my API key?
Your API key is available on the Settings page after signing in. API keys have the format sk_live_....
How do I authenticate API requests?
Include your API key in the X-API-Key header:
Code
Can I regenerate my API key?
Currently, API keys are generated when your account is created. Contact support if you need to regenerate your key for security reasons.
Is my API key secure?
Yes. API keys are stored securely and transmitted over HTTPS. Never share your API key publicly or commit it to version control. Use environment variables to store it in your applications.
Leads
What fields are required when creating a lead?
Only two fields are required:
name- The business or contact namesource- Where the lead came from (e.g., "website", "import", "referral")
What are dynamic attributes?
Dynamic attributes let you store custom key-value pairs on leads. Each attribute has a name, type, and value:
Code
Supported types: text, number, bool, list, object
How do I search leads by custom attributes?
Use the attr: prefix in filters:
Code
What's the maximum number of leads I can store?
- Free plan: 500 leads
- Pro plan: Higher limits based on subscription
Can I import leads in bulk?
Yes! Use the batch endpoint to create up to 100 leads per request:
Code
The response includes success/failure status for each lead.
How does full-text search work?
The name field supports fast prefix search using FTS (Full-Text Search). Use the contains operator:
Code
This finds leads with names containing "acme" (case-insensitive).
Filtering
What filter operators are available?
Text fields: eq, neq, contains, not_contains, is_empty, is_not_empty
Number fields: eq, neq, gt, gte, lt, lte
Arrays/Tags: array_contains, array_not_contains, array_empty, array_not_empty
Location: within_radius, is_set, is_not_set
Custom attributes: exists, not_exists
How do I combine multiple filters?
Use AND or OR logic by adding multiple filter parameters:
Code
How do I filter by location radius?
Use the within_radius operator with format lat,lng,radius_km:
Code
What's the maximum number of filters?
You can use up to 20 filters per query.
Pagination
How does pagination work?
LeadsDB uses cursor-based pagination for efficient traversal:
Code
What's the maximum page size?
You can request up to 1,000 leads per page using the limit parameter. Default is 50.
Scoring
How do scoring rules work?
Scoring rules are expressions that calculate a score (0-100) for each lead based on its fields. Scores are calculated when leads are created.
Example expression:
Code
What variables can I use in scoring expressions?
rating- Lead rating (number)review_count- Number of reviews (number)email- Email address (string, nil if not set)phone- Phone number (string, nil if not set)website- Website URL (string, nil if not set)city- City name (string)country- Country name (string)tags- Array of tags (string[])
Can I recalculate scores for existing leads?
Yes! Use the "Apply to all leads" button on the Scoring Rules page to recalculate scores for all your leads.
Rate Limits
What are the rate limits?
| Plan | Limit | Window |
|---|---|---|
| Free | 100 requests | 10 minutes |
| Pro | 1,000 requests | 10 minutes |
How do I know my current rate limit status?
Every API response includes rate limit headers:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Remaining requestsRetry-After: Seconds to wait (when rate limited)
What happens when I exceed the rate limit?
You'll receive a 429 Too Many Requests response. Wait for the time indicated in the Retry-After header before retrying.
MCP Integration
What is MCP?
MCP (Model Context Protocol) is an open protocol that allows AI assistants to securely connect to external data sources. LeadsDB supports MCP, letting you manage leads through natural language conversations.
Which AI clients support MCP?
- Claude Desktop
- Cursor IDE
- Any MCP-compatible client
How do I set up MCP?
See the MCP Setup Guide for detailed instructions for each client.
What can I do with MCP?
- Search and filter leads: "Find restaurants in Paris with rating above 4"
- Create leads: "Add a new lead for Acme Corp, a software company"
- Update leads: "Add the 'vip' tag to all leads in the Technology category"
- Export data: "Export all leads with email addresses to CSV"
Technical
What format are timestamps in?
All timestamps are Unix timestamps (seconds since epoch). For example: 1703520000
What format are lead IDs in?
Lead IDs use UUIDv7 format with a lead_ prefix: lead_01922a5b-1234-7def-89ab-cdef01234567
UUIDv7 IDs are lexicographically sortable by creation time.
Is there a webhook system?
Not currently. Webhooks are on the roadmap for future releases.
Do you support OpenAPI/Swagger?
Yes! The OpenAPI specification is available at /api/openapi.yaml and you can explore the API interactively in the API Reference.
Troubleshooting
I'm getting a 401 Unauthorized error
This means your API key is missing or invalid. Check that:
- You're including the API key in the
X-API-Keyheader (not as a query parameter) - The API key is correct and hasn't been regenerated
- There are no extra spaces or characters in the key
Code
I'm getting a 400 Bad Request error
This usually means there's an issue with your request body or parameters. Common causes:
- Missing required fields (
nameandsourceare required for creating leads) - Invalid JSON syntax
- Wrong data types (e.g., sending a string where a number is expected)
- Invalid filter format
Check the error message in the response body for specific details.
I'm getting a 403 Forbidden error
This means you've hit your plan's lead limit. Options:
- Delete some existing leads to make room
- Upgrade to a higher plan
- Check your current lead count on the dashboard
I'm getting a 429 Too Many Requests error
You've exceeded your rate limit. The response includes a Retry-After header indicating how many seconds to wait.
Code
My filters aren't working
Check the filter format: logic.operator.field.value
Common mistakes:
- Wrong order: Use
and.eq.city.Athensnotcity.eq.Athens - Case sensitivity: Field names are case-sensitive (
citynotCity) - URL encoding: Spaces and special characters need encoding (
San%20Francisco) - Wrong operator: Use
array_containsfor tags, noteq
Code
Batch create is failing for some leads
The batch endpoint returns a 207 Multi-Status response when some leads succeed and others fail. Check the errors array in the response:
Code
Each error includes the index of the failed lead in your original array and the error message.
My leads aren't being found by search
If full-text search isn't returning expected results:
- Use
containsoperator for name search, noteq - Search is case-insensitive but matches from the start of words
- Wait a moment after creating leads for indexing
Code
Location-based search returns no results
Check that:
- Your leads have
latitudeandlongitudeset - The radius is in kilometers (not miles)
- Coordinates are in the correct format:
lat,lng,radius_km
Code
MCP tools aren't appearing in Claude/Cursor
- Verify the configuration JSON syntax is correct
- Restart the application after configuration changes
- Check that the MCP endpoint is accessible:
https://getleadsdb.com/mcp/sse - Look for error messages in the application logs
Support
How do I report a bug or request a feature?
Visit our Contact page to report issues or request features.
How do I contact support?
For any questions or account-related issues, visit our Contact page.