How to Scrape Clearbit Data: Complete Guide for 2026
Tutorials

How to Scrape Clearbit Data: Complete Guide for 2026

Learn how to scrape Clearbit data efficiently using Python and Node.js. This guide covers handling anti-bot protections, structured AI extraction, and scaling pipelines.

H
Herald Blog Service
5 min read
4 views

AlterLab handles this automaticallyscrape any URL with one API call. No infrastructure required.

Try it free

TL;DR

To scrape Clearbit data, use a request library or SDK that supports proxy rotation and header management to navigate anti-bot protections. For high-reliability pipelines, use the AlterLab API to automatically escalate from simple HTTP requests to full browser rendering, ensuring you only pay for the successful tier.

Disclaimer: This guide covers extracting publicly accessible data. Always review a site's robots.txt and Terms of Service before scraping.

Why collect data from Clearbit?

Data enrichment is a cornerstone of modern B2B workflows. Engineers often need to pull publicly available company information to fuel internal databases. Practical use cases include:

  • Market Research: Tracking company growth, headcount trends, or industry shifts based on public profiles.
  • Data Analysis: Aggregating public company metadata to build competitive intelligence dashboards.
  • Lead Enrichment: Supplementing internal CRM datasets with publicly listed company details.
Try it yourself

Try scraping Clearbit with AlterLab

Technical challenges

Scraping modern SaaS platforms is rarely as simple as a standard GET request. Sites like Clearbit utilize advanced anti-bot protections to prevent automated scraping. These include:

  • Fingerprinting: Checking for inconsistencies in browser headers and TLS fingerprints.
  • JavaScript Execution: Many elements are rendered dynamically, meaning a simple HTTP client will only see an empty shell.
  • Rate Limiting: Detecting and blocking IP addresses that make too many requests in a short window.

To handle these, you cannot rely on basic libraries like requests or axios alone. You need a solution that integrates a Smart Rendering API to handle JavaScript execution and rotate proxies seamlessly.

Quick start with AlterLab API

The fastest way to start is using the AlterLab SDK. Whether you prefer Python or Node.js, the implementation is nearly identical. You can find more details in our Getting started guide.

Python Implementation

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")
response = client.scrape("https://clearbit.com/example-page")
print(response.text)

Node.js Implementation

JAVASCRIPT
import { AlterLab } from "alterlab";

const client = new AlterLab({ apiKey: "YOUR_API_KEY" });
const response = await client.scrape("https://clearbit.com/example-page");
console.log(response.text);

cURL Implementation

Bash
curl -X POST https://api.alterlab.io/v1/scrape \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"url": "https://clearbit.com/example-page"}'

Extracting structured data

Once you have the raw HTML, you need to parse it. For standard pages, you can use CSS selectors to target specific elements like company names or descriptions. However, if the content is embedded in a JSON blob within the <script> tags, you will need to extract that string first.

Structured JSON extraction with Cortex

Parsing HTML with regex or complex CSS selectors is brittle. If a site updates its layout, your scraper breaks. To solve this, use Cortex AI. Instead of writing selectors, you provide a schema, and Cortex extracts the data for you.

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")
result = client.extract(
    url="https://clearbit.com/example-page",
    schema={
        "type": "object",
        "properties": {
            "company_name": {"type": "string"},
            "industry": {"type": "string"},
            "location": {"type": "string"},
            "description": {"type": "string"}
        }
    }
)
print(result.data)  # Typed JSON output

Cost breakdown

Efficiency is key when scaling. AlterLab uses an auto-escalation model. You start at the lowest tier (T1), and if the request fails due to anti-bot measures, the system automatically retries with a higher tier (e.g., T3 or T4). You only pay for the tier that successfully delivers the data.

For a full list of pricing, visit our AlterLab pricing page.

TierUse CaseCost per RequestCost per 1,000Requests per $1
T1 — CurlStatic HTML, no JS needed$0.0002$0.205,000
T2 — HTTPStandard pages with headers$0.0003$0.303,333
T3 — StealthProtected pages, anti-bot active$0.002$2.00500
T4 — BrowserFull JS rendering required$0.004$4.00250
T5 — CAPTCHACAPTCHA solving + JS rendering$0.02$20.0050
99.2%Success Rate
1.2sAvg Response
$0.002Per Request (T3)

Best practices

  1. Respect Robots.txt: Always check the target domain's /robots.txt file to understand allowed paths.
  2. Implement Rate Limiting: Do not hammer a single domain with thousands of requests per second. Use a delay between requests.
  3. Handle Dynamic Content: If you are seeing "Access Denied" or empty pages, you likely need a browser-based rendering tier.
  4. Validate Data: Even with AI extraction, always run a validation check on the returned JSON to ensure the data types match your schema.

Scaling up

When moving from a single script to a production pipeline, consider these architectural patterns:

  • Batching: Instead of one-off requests, batch your URLs and process them through a worker queue.
  • Scheduling: Use cron-based scheduling to automate recurring scrapes for monitoring tasks.
  • Webhooks: Rather than polling your API for results, set up webhooks to receive data the moment a scrape completes.

Key takeaways

  • Use the AlterLab SDK for easy integration in Python or Node.js.
  • Use Cortex AI to avoid the fragility of CSS selectors.
  • Leverage auto-escalation to keep costs low while ensuring high success rates.
  • Always respect the target site's technical and legal boundaries.

For more specific implementation details, check our Clearbit scraping guide.

Share

Was this article helpful?

Frequently Asked Questions

Scraping publicly accessible data is generally legal, but you must respect robots.txt and Terms of Service. Always implement rate limiting and avoid attempting to access private or non-public information.
Clearbit employs standard anti-bot protections that require sophisticated header management and proxy rotation. These challenges are best handled by a [Smart Rendering API](/smart-rendering-api) that manages browser sessions automatically.
Costs range from $0.0002 per request for static HTML to $0.004 per request for full JS rendering. AlterLab uses auto-escalation, so you only pay for the specific tier that successfully retrieves the data.