Skip to main content

LinkedIn Scraping Rate Limits

Our LinkedIn scraping API is designed to respect LinkedIn’s terms of service while providing reliable data access for legitimate business use cases.

Current Rate Limits

Default Rate Limit: 10 calls per second This rate limit applies to all LinkedIn scraping endpoints and is calculated on a per-API-key basis.

Rate Limit Headers

Every API response includes rate limit information in the headers:
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 7
X-RateLimit-Reset: 1642680000
  • X-RateLimit-Limit - Your current rate limit (requests per second)
  • X-RateLimit-Remaining - Number of requests remaining in the current window
  • X-RateLimit-Reset - Unix timestamp when the rate limit resets

Handling Rate Limits

When you exceed the rate limit, you’ll receive a 429 Too Many Requests response:
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests, please slow down",
  "code": "RATE_001",
  "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FB1",
  "details": {
    "limit": 10,
    "window": "1 second",
    "retry_after": 1
  }
}

Best Practices

  • Implement exponential backoff when receiving 429 responses
  • Respect the retry_after value in the error response
  • Monitor rate limit headers to avoid hitting limits
  • Use caching wisely - Set cached: true for less time-sensitive data
  • Distribute requests evenly rather than sending bursts

Caching Strategy

Our LinkedIn scraping API offers intelligent caching to optimize performance and respect rate limits:
  • Cached requests (cached: true) - Return data up to 30 days old
  • Fresh requests (cached: false) - Return data no more than 1 minute old
  • Default behavior - Caching is enabled by default (cached: true)
Use cached requests for most use cases to improve performance and reduce rate limit consumption. Only use fresh requests when you need the most up-to-date information.

Need Higher Limits?

If your use case requires higher rate limits, we can accommodate your needs quickly. Contact our support team:
  • Email: hello@midbound.ai
  • Response time: We’re fast - typically respond within hours, not days
  • Custom limits: We can provide custom rate limits based on your specific requirements
Include the following information in your request:
  • Your current API key
  • Expected requests per second/minute
  • Use case description
  • Timeline for when you need the increased limits

Example Implementation

Here’s a simple Python example showing how to handle rate limits:
import requests
import time

def scrape_linkedin_profile_with_retry(profile_id, api_key, cached=True, max_retries=3):
    url = "https://api.mdb.tools/v1/linkedin/profile"
    headers = {
        "x-api-key": api_key,
        "Content-Type": "application/json"
    }
    payload = {
        "id": profile_id,
        "cached": cached
    }
    
    for attempt in range(max_retries):
        response = requests.post(url, headers=headers, json=payload)
        
        if response.status_code == 200:
            return response.json()
        elif response.status_code == 429:
            # Rate limited - wait and retry
            retry_after = response.json().get('details', {}).get('retry_after', 1)
            time.sleep(retry_after)
            continue
        else:
            # Other error
            response.raise_for_status()
    
    raise Exception(f"Failed after {max_retries} retries")