Lyre Leads API

Integrate AI-powered Google Maps lead generation directly into your applications, AI agents, LangChain pipelines, and automation workflows. Search businesses, retrieve 40+ company-level data points per lead — including verified emails, AI-discovered contacts with personal LinkedIn profiles, and 280+ tech stack detections — and score them with AI. All via a simple REST API.

✓ REST API ✓ OpenAPI 3.0 ✓ LangChain / AI Agent Ready
ℹ️ API access is available on Growth plans and higher. Generate your API key in Account → API Keys.

Quick Start

Get your first API call working in under 2 minutes.

1

Get an API Key

Log in → Account → API Keys → Generate Key. Save it immediately — shown once.

2

Check Your Balance

Call GET /api/v1/balance with your Bearer key to confirm it works.

3

Search for Leads

Call POST /api/v1/search with query, city, and country.

4

Score with AI

Pass result IDs to POST /api/v1/evaluate with your AI model ID.

First API call

cURL
curl https://lyreleads.com/api/v1/balance \
  -H "Authorization: Bearer lyre_your_api_key_here"
Python
import requests

API_KEY = "lyre_your_api_key_here"
BASE_URL = "https://lyreleads.com"
headers = {"Authorization": f"Bearer {API_KEY}"}

resp = requests.get(f"{BASE_URL}/api/v1/balance", headers=headers)
print(resp.json())
# {'tier': 'Growth', 'tokens_balance': 4500, 'tokens_monthly_allocation': 5000, ...}
Node.js
const res = await fetch('https://lyreleads.com/api/v1/balance', {
  headers: { 'Authorization': 'Bearer lyre_your_api_key_here' }
});
const data = await res.json();
console.log(data.tokens_balance); // 4500

Authentication

All API v1 requests require an API key sent as a Bearer token in the Authorization header:

HTTP Header
Authorization: Bearer lyre_<your-64-hex-key>

API keys are scoped to your account. They inherit your token balance and tier permissions. You can create up to 10 active keys per account and revoke them at any time from the Account page.

⚠️ Your API key is shown only once at creation. Store it securely in environment variables or a secrets manager — never hard-code it in your application source.
ℹ️ API access requires a Growth plan or higher. Free accounts cannot create API keys.

Error Handling

The API uses standard HTTP status codes. All error responses are JSON with an error field:

StatusMeaningCommon cause
200OKRequest succeeded
400Bad RequestMissing required field or invalid parameter
401UnauthorizedMissing, invalid, or revoked API key
402Payment RequiredInsufficient tokens — buy more or wait for monthly reset
403ForbiddenPlan upgrade required, or account suspended
404Not FoundResource not found (model, result)
429Too Many RequestsRate limit exceeded (120 req/min per key)
500Server ErrorSomething went wrong on our end
Error response example
{
  "error": "Insufficient tokens.",
  "tokens_needed": 20,
  "tokens_balance": 5,
  "upgrade_url": "/pricing"
}

Rate Limits

The API allows 120 requests per minute per API key. Exceeding this returns a 429 response. The limit resets every 60 seconds.

Each search result or AI evaluation costs 1 token. Check your balance at any time via GET /api/v1/balance.

Endpoints

Token Balance

GET /api/v1/balance Returns your current token balance and plan info

No request body required.

Response

JSON
{
  "tier": "Growth",
  "tokens_balance": 4500,
  "tokens_monthly_allocation": 5000,
  "tokens_reset_date": "2026-02-01T00:00:00.000Z",
  "tokens_next_reset": "2026-03-01T00:00:00.000Z"
}

Retrieve Past Results

GET /api/v1/results Paginated access to your stored search results
Query paramTypeDescription
limitoptionalintegerResults per page (default 20, max 100)
offsetoptionalintegerPagination offset (default 0)
queryoptionalstringFilter by search query (partial match)
search_idoptionalintegerFilter by search history ID
cURL
curl "https://lyreleads.com/api/v1/results?limit=50&query=plumbers" \
  -H "Authorization: Bearer lyre_..."
Response
{
  "results": [ /* array of result objects */ ],
  "total": 2540,
  "limit": 50,
  "offset": 0,
  "has_more": true
}

Each result object contains enrichment data including email, facebook_url, instagram_url, linkedin_url, has_facebook_pixel, has_google_analytics, cms_platform, tech_stack (JSON array of all 200+ detected technologies), plus categorized tech columns: tech_frameworks, tech_analytics, tech_advertising, tech_marketing, tech_ecommerce, tech_customer_tools, tech_infrastructure. Boolean signals: has_ad_pixels, has_marketing_automation, has_ecommerce, has_cookie_consent, has_reviews_widget, has_heatmaps, has_scheduling. Also includes chat_widget, booking_system, crm_platform, is_mobile_friendly, has_ssl, contact_name, contact_title, contact_linkedin, contact_profile_url, ai_rating, and ai_notes.

AI Lead Scoring

POST /api/v1/evaluate Score leads with your AI model. Each result costs 1 token.
ParameterTypeDescription
model_idrequiredintegerID of your AI model (from GET /api/v1/models)
result_idsrequiredinteger[]Array of result IDs to score (max 200)
Request + response
// Request
{
  "model_id": 42,
  "result_ids": [1001, 1002, 1003]
}

// Response — evaluation starts async
{
  "success": true,
  "job_id": "a1b2c3d4",
  "status": "started",
  "total_results": 3,
  "model_name": "My Plumber Qualifier",
  "poll_url": "/api/jobs/a1b2c3d4/status"
}

Poll poll_url to get live progress. AI scores (0–10) and explanations are saved to each result and retrievable via GET /api/v1/results once complete.

List AI Models

GET /api/v1/models Returns your saved AI scoring models
Response
{
  "models": [
    {
      "id": 42,
      "name": "My Plumber Qualifier",
      "description": "Scores plumbers in Berlin for HVAC upsell potential",
      "created_at": "2026-02-01T12:00:00.000Z"
    }
  ]
}

OpenAPI Spec

GET /api/v1/openapi.json OpenAPI 3.0 specification — no auth required

Returns a complete OpenAPI 3.0 spec. Use this to auto-configure LLM tool-use, Postman, Swagger UI, or any OpenAPI-compatible tooling. No API key required to fetch the spec.

LangChain example
from langchain.tools import OpenAPISpec, APIOperation
from langchain.chains import OpenAPIEndpointChain

spec = OpenAPISpec.from_url("https://lyreleads.com/api/v1/openapi.json")
# Agent can now auto-discover and call Lyre Leads endpoints