API Documentation

Complete guide to integrate SearchLabs Intelligence Platform into your applications

Getting Started

Welcome to the SearchLabs API! Our RESTful API allows you to access our intelligence platform programmatically. This documentation will guide you through authentication, available endpoints, and best practices.

Base URL

All API requests should be made to: https://api.searchlabs.io/v1

Quick Start

To get started with the SearchLabs API, you'll need:

  1. A SearchLabs account (sign up at register)
  2. An API key from your dashboard
  3. A client library or HTTP client of your choice

Authentication

SearchLabs uses API keys to authenticate requests. You can generate and manage your API keys from the dashboard.

Using Your API Key

Include your API key in the Authorization header of your requests:

BASH
curl -X GET "https://api.searchlabs.io/v1/email/search?q=example@email.com" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Security Warning

Never expose your API key in client-side code. Always make API requests from your backend server.

API Endpoints

SearchLabs API provides the following endpoints:

Endpoint Method Description
/email/search GET Search for email intelligence
/breach/check GET Check if email was in data breaches
/social/lookup GET Find social media profiles
/phone/lookup GET Lookup phone number information

Rate Limits

To ensure fair usage and service stability, API requests are rate limited based on your subscription plan:

Plan Requests/Minute Requests/Day
Free 10 1,000
Pro 100 50,000
Enterprise Unlimited Unlimited
Rate Limit Headers

Each API response includes headers showing your current rate limit status:

  • X-RateLimit-Limit: Maximum requests allowed
  • X-RateLimit-Remaining: Requests remaining
  • X-RateLimit-Reset: Time when limit resets (Unix timestamp)

Error Handling

The SearchLabs API uses conventional HTTP response codes to indicate success or failure:

Code Status Description
200 OK Request succeeded
400 Bad Request Invalid parameters or malformed request
401 Unauthorized Invalid or missing API key
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Something went wrong on our end

Error Response Format

JSON
{
  "success": false,
  "error": {
    "code": "invalid_parameter",
    "message": "The 'q' parameter is required",
    "details": {
      "parameter": "q",
      "expected": "string (email address)"
    }
  }
}

Code Examples

Python

PYTHON
import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://api.searchlabs.io/v1"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.get(
    f"{BASE_URL}/email/search",
    headers=headers,
    params={"q": "target@example.com"}
)

data = response.json()
print(data)

JavaScript (Node.js)

JAVASCRIPT
const axios = require('axios');

const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.searchlabs.io/v1';

const searchEmail = async (email) => {
    try {
        const response = await axios.get(`${BASE_URL}/email/search`, {
            headers: {
                'Authorization': `Bearer ${API_KEY}`,
                'Content-Type': 'application/json'
            },
            params: { q: email }
        });
        console.log(response.data);
    } catch (error) {
        console.error('Error:', error.response.data);
    }
};

searchEmail('target@example.com');

PHP

PHP