Back to RocketReach

How do I Handle RocketReach API Requests, Responses, and Errors?

The RocketReach API allows you to programmatically search and retrieve contact information for professionals and companies. This guide will help you understand API responses, error codes, rate limits, and troubleshooting steps.

Key Takeaways

  • RocketReach API responses contain status codes and structured data for processing.
  • Error handling is essential for managing unsuccessful API requests.
  • Rate limits apply—exceeding them triggers a 429 Too Many Requests error.
  • Webhooks help automate workflows and reduce unnecessary polling.
  • Troubleshooting tools like API logs and error messages can help diagnose issues.
  • Track API usage in the RocketReach API Settings dashboard.

Understanding RocketReach API Responses and Error Codes

Each API request returns a response with a status code and data. Understanding these responses helps you determine the success or failure of a request.

Common API Response Codes

Status Code Meaning Description
200 OK Success Request was successful, and data is returned.
400 Bad Request Client Error The request is malformed or missing required parameters.
401 Unauthorized Authentication Error API Key is missing or invalid.
403 Forbidden Access Denied API Key lacks permission to perform this action.
404 Not Found Not Found The requested resource (e.g., profile) does not exist.
429 Too Many Requests Rate Limit Exceeded API request limit reached—slow down requests.
500 Internal Server Error Server Issue Unexpected error on RocketReach’s servers. Try again later.

🚨 Tip: Always check the response body for additional details about errors.

Example API Response (Success)

{
  "id": 5244,
  "status": "complete",
  "name": "John Doe",
  "current_employer": "Google",
  "current_title": "Software Engineer",
  "emails": [
    {
      "email": "johndoe@google.com",
      "type": "professional",
      "valid": "true"
    }
  ]
}

 

Example API Response (Error)

{
  "status": 401,
  "message": "Invalid API Key"
}

 

How to Troubleshoot Common RocketReach API Issues

Errors can occur due to authentication failures, invalid parameters, or rate limit violations. Here’s how to handle common errors:

Handling Authentication Errors (401 Unauthorized)

If your API requests are failing, follow these troubleshooting steps:

Issue Possible Causes Solution
Invalid API Key (401 Unauthorized) API Key is missing or incorrect. Verify API Key and ensure it’s included in request headers.
Bad Request (400) Missing or invalid parameters. Check API documentation and ensure parameters are correctly formatted.
Rate Limit Exceeded (429 Too Many Requests) Exceeded request limit. Slow down requests or upgrade your plan. (more tips below)
Resource Not Found (404) Profile or company doesn’t exist. Verify the search parameters.
Server Error (500) Temporary issue with RocketReach servers. Retry the request after some time.

Checking API Error Logs

To review recent errors and API usage:

    1. Go to RocketReach API Usage & Settings from your Account Settings
    2. Check the API Recent Error section for request history and error messages.
    3. Use this information to adjust your API calls.

Handling Rate Limit Errors

If you receive a 429 Too Many Requests response:

  1. Check the Retry-After header in the API response to see how long to wait.
  2. Slow down your request rate by implementing a delay in your code.
  3. Use webhooks instead of polling to reduce API calls.
  4. Upgrade to a paid plan for higher rate limits—contact sales@rocketreach.co.

Example: Handling Rate Limits in Python

import time
import requests

api_key = "YOUR_API_KEY"
url = "https://api.rocketreach.co/api/v2/person/lookup"
headers = {"Api-Key": api_key}
params = {"name": "John Doe"}

response = requests.get(url, headers=headers, params=params)

if response.status_code == 429:
    retry_after = int(response.headers.get("Retry-After", 5))
    print(f"Rate limit exceeded. Retrying in {retry_after} seconds...")
    time.sleep(retry_after)
    response = requests.get(url, headers=headers, params=params)

Next Steps

Now that you understand how to handle API requests and responses, here’s what you can do next:


You Might Also Like

Have more questions? Talk to us