API Documentation

Generate LinkedIn Sales Navigator links directly from job descriptions

Getting Started

The SearchGen API allows you to programmatically generate Sales Navigator search links directly from job descriptions. All API requests require authentication using an API key.

Base URL

https://searchnav.vercel.app/api/v1

Authentication

Include your API key in the Authorization header of every request using the Bearer token format.

Authorization: Bearer YOUR_API_KEY

Rate Limits by Plan

PlanPer MinutePer HourPer DayConcurrent
Free5301002
Pro202002,0005
Growth505005,00010

Generate Links from Job Description

POST/api/v1/generate/links

Generate three types of Sales Navigator search links directly from a job description text. The API automatically extracts relevant filters and creates targeted LinkedIn search URLs.

Credit Cost

3 credits

(Includes AI filter generation + link creation)

Rate Limited

Based on your plan

curl -X POST https://searchnav.vercel.app/api/v1/generate/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jobDescription": "Looking for a Senior Software Engineer..."
  }'

Request Parameters:

  • jobDescription(string, required)

    Job description text (max 10,000 characters). The AI will extract relevant filters from this text.

Response (Success):

{
  "success": true,
  "data": {
    "id": "api-1234567890-abc123def",
    "taskTitle": "Job Search (Generated via API)",
    "links": [
      {
        "type": "specific",
        "title": "Specific Search",
        "description": "Narrow and highly targeted results",
        "url": "https://www.linkedin.com/sales/search/people?..."
      },
      {
        "type": "balanced",
        "title": "Balanced Search",
        "description": "Mix of precision and broader reach",
        "url": "https://www.linkedin.com/sales/search/people?..."
      },
      {
        "type": "broad",
        "title": "Broad Search",
        "description": "Wide net for maximum results",
        "url": "https://www.linkedin.com/sales/search/people?..."
      }
    ],
    "linkCount": 3,
    "createdAt": "2024-01-01T12:00:00.000Z",
    "creditsUsed": 6
  }
}

Response (Error):

{
  "success": false,
  "error": "Error message",
  "code": "ERROR_CODE",
  "balance": 100
}

Three Link Types:

  • Specific

    Most targeted results

    Uses exact job titles, best-fit industries, precise keywords, and all location filters

  • Balanced

    Optimal precision and reach

    Includes related titles and industries with general keywords

  • Broad

    Maximum candidate reach

    All titles and industries, location filters only for widest results

Error Codes

CodeStatusDescription
UNAUTHORIZED401Invalid or missing API key
INSUFFICIENT_CREDITS402Not enough credits (balance shown in response)
INVALID_REQUEST400Invalid request parameters or missing jobDescription
PAYLOAD_TOO_LARGE413Job description exceeds 10,000 characters
RATE_LIMIT_EXCEEDED429Too many requests
FILTER_GENERATION_FAILED500Failed to extract filters from job description
LINK_GENERATION_FAILED500Failed to generate LinkedIn search links
INTERNAL_ERROR500Server error

Integration Examples

JavaScript / TypeScript:

async function generateSalesNavLinks(jobDescription) {
  const response = await fetch('https://searchnav.vercel.app/api/v1/generate/links', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ jobDescription })
  });

  const result = await response.json();
  
  if (result.success) {
    const { links, taskTitle, linkCount } = result.data;
    console.log(`Generated ${linkCount} links for: ${taskTitle}`);
    
    // Use the links
    links.forEach(link => {
      console.log(`${link.type}: ${link.title} - ${link.url}`);
    });
    
    return links;
  } else {
    throw new Error(`API Error: ${result.error} (Code: ${result.code})`);
  }
}

Python:

import requests
import json

def generate_sales_nav_links(job_description):
    url = "https://searchnav.vercel.app/api/v1/generate/links"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    data = {
        "jobDescription": job_description
    }
    
    response = requests.post(url, headers=headers, json=data)
    result = response.json()
    
    if result.get("success"):
        data = result["data"]
        print(f"Generated {data['linkCount']} links for: {data['taskTitle']}")
        
        for link in data["links"]:
            print(f"{link['type']}: {link['title']} - {link['url']}")
        
        return data["links"]
    else:
        raise Exception(f"API Error: {result.get('error')} (Code: {result.get('code')})")