v1 · OpenAPI 3.1 · REST · JSON · Stripe-style auth
API LeadsBase
Integra la base de 80.591 empresas A++ vendibles españolas en tu CRM, marketing automation o producto B2B. API REST documentada con OpenAPI 3.1, rate limit por tier, autenticación por API key.
1. Autenticación
Crea una API key en tu dashboard (tier Pro+). Envíala en cada request con el header Authorization: Bearer lb_live_xxx.
curl -X GET 'https://api.tresaaa.com/api/v1/empresas/nearby?lat=40.4168&lng=-3.7038&radius_km=5' \
-H 'Authorization: Bearer lb_live_xxxxxxxxxxxxxxxxx' \
-H 'Accept: application/json'2. Rate limits por tier
| Tier | Lookups/mes | API req/min | Bulk export |
|---|---|---|---|
| Free | 50 | 10 | ❌ |
| Starter (19 €/mes) | 500 | 30 | CSV mensual |
| Pro (99 €/mes) | 5.000 | 60 | CSV ilimitado |
| Business (299 €/mes) | 25.000 | 120 | CSV + Excel + JSON |
| Enterprise (999+) | Ilimitado | Custom | Custom format |
3. Endpoints principales
/empresas/nearbyBúsqueda geográfica por radio
Devuelve empresas dentro de un radio configurable desde unas coordenadas, ordenadas por distancia. Filtros opcionales por CNAE, sector, presencia de email.
curl -X GET 'https://api.tresaaa.com/api/v1/empresas/nearby?lat=40.4168&lng=-3.7038&radius_km=5§or=hosteleria&only_email=true&limit=20' \
-H 'Authorization: Bearer lb_live_xxx'[
{
"empresa_id": 12345,
"cif": "B12345678",
"nombre": "Restaurante Madrid SL",
"ciudad": "Madrid",
"provincia": "Madrid",
"lat": 40.4180,
"lon": -3.7042,
"cnae": "5610",
"sector": "hosteleria",
"telefono": "+34 91 123 45 67",
"email": "info@restaurantemadrid.es",
"web": "https://restaurantemadrid.es",
"tier": 4,
"distance_km": 0.15
}
]/leadbase/empresa/{cif}Lookup empresa por CIF
Devuelve la ficha completa de una empresa identificada por su CIF (validado contra Registro Mercantil).
curl -X GET 'https://api.tresaaa.com/api/v1/leadbase/empresa/B12345678' \
-H 'Authorization: Bearer lb_live_xxx'{
"empresa_id": 12345,
"cif": "B12345678",
"nombre": "...",
"facturacion_estimada": 850000,
"empleados_estimados": 12,
"vertical_optimo": "Restauración - Bar de tapas",
"hook_personalizado": "Cumplimiento Ley 1/2025 — ahorro €2.4k/año",
"roi_estimado_min": 5000,
"roi_estimado_max": 18000
}/leadbase/buscarBúsqueda full-text + filtros
Busca empresas por nombre, CNAE, provincia, sector. Soporta paginación. Cache 30 días.
curl -X GET 'https://api.tresaaa.com/api/v1/leadbase/buscar?q=consultoria&provincia=Madrid&cnae=70&page=1&per_page=50' \
-H 'Authorization: Bearer lb_live_xxx'{
"total": 1247,
"page": 1,
"per_page": 50,
"results": [ /* array empresas */ ]
}/empresas/savedGuardar empresa como prospect
Marca una empresa como prospect / contactado / cliente. Notas opcionales. Multi-tenant con RLS.
curl -X POST 'https://api.tresaaa.com/api/v1/empresas/saved' \
-H 'Authorization: Bearer lb_live_xxx' \
-H 'Content-Type: application/json' \
-d '{"empresa_id": 12345, "status": "prospect", "notes": "Llamar martes"}'{
"id": "abc-uuid",
"empresa_id": 12345,
"status": "prospect",
"saved_at": "2026-05-17T20:30:00Z"
}4. SDKs oficiales
API REST = compatible con cualquier lenguaje. Helpers oficiales:
- Python ·
pip install leadsbase(próximamente) - Node.js / TypeScript ·
npm i leadsbase(próximamente) - Go ·
go get github.com/leadsbase/go-sdk(próximamente)
5. Webhooks (tier Business+)
Recibe eventos en tiempo real: nueva empresa añadida en tu territorio guardado, empresa actualizada con email nuevo, fin de cuota mensual, etc. Firmados con HMAC-SHA256.
{
"id": "evt_2026_xyz",
"type": "territory.new_company",
"created": 1747234567,
"data": {
"territory_id": "trr_madrid_centro",
"empresa_id": 67890,
"matched_filters": ["sector=tecnologia"]
}
}¿Listo para empezar?
Crea tu cuenta gratis. Genera tu primera API key en 60 segundos.
Empezar con plan Pro (14 días gratis)