CB Insights Data API: Extract Structured JSON in 2026
Tutorials

CB Insights Data API: Extract Structured JSON in 2026

Learn how to build a robust cb insights data api pipeline to extract structured JSON finance data using AlterLab's Extract API for AI and analytics.

H
Herald Blog Service
5 min read
6 views

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

Try it free

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

TL;DR

To get structured CB Insights data via API, use a data API like AlterLab to send a target URL and a JSON schema to the /v1/extract endpoint. The API handles browser rendering and anti-bot measures, returning a validated JSON object containing specific finance fields like ticker, price, and market cap.

Why use CB Insights data?

Publicly available data from CB Insights is a critical signal for financial engineering and market analysis. Most developers integrate this data into three primary workflows:

  1. AI Training and RAG: Feeding structured company profiles into Large Language Models (LLMs) to improve the accuracy of Retrieval-Augmented Generation (RAG) systems for venture capital analysis.
  2. Competitive Intelligence: Monitoring public shifts in market capitalization or price volatility across a specific sector to trigger automated alerts.
  3. Automated Analytics: Building dashboards that aggregate public finance metrics from multiple sources into a single source of truth.

What data can you extract?

When building a data pipeline for finance, consistency is more important than volume. Focus on these publicly accessible fields to maintain a clean dataset:

Ticker: The unique identifier for the company on public exchanges. – Price: The current trading price of the asset. – Change Percent: The percentage move in price over a specific window (e.g., 24h). – Volume: The total number of shares or contracts traded. – Market Cap: The total market value of the company's outstanding shares.

99.2%Extraction Accuracy
1.4sAvg Response Time
100%Typed JSON Output

The extraction approach

Traditional web scraping relies on CSS selectors or XPath. This approach is fragile because finance sites frequently update their DOM structure to optimize performance or prevent bots. If a div class changes from .price-value to .current-price, your entire pipeline breaks.

A data API approach shifts the logic from "find this element" to "find this data." By using an LLM-powered extraction layer, the API understands the context of the page. It identifies the "Price" regardless of where it sits in the HTML, ensuring your pipeline remains stable even when the site layout changes.

To begin implementing this, refer to the Getting started guide for environment setup.

Quick start with AlterLab Extract API

The Extract API allows you to define exactly what data you want. You don't need to write parsing logic; you simply provide the schema.

Python Implementation

Using the official SDK is the most efficient way to integrate structured extraction into a Python data pipeline.

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")

schema = {
  "type": "object",
  "properties": {
    "ticker": {
      "type": "string",
      "description": "The ticker field"
    },
    "price": {
      "type": "string",
      "description": "The price field"
    },
    "change_percent": {
      "type": "string",
      "description": "The change percent field"
    },
    "volume": {
      "type": "string",
      "description": "The volume field"
    },
    "market_cap": {
      "type": "string",
      "description": "The market cap field"
    }
  }
}

result = client.extract(
    url="https://cbinsights.com/example-page",
    schema=schema,
)
print(result.data)

cURL Implementation

For lightweight integrations or shell scripts, use the REST endpoint. Detailed parameters can be found in the Extract API docs.

Bash
curl -X POST https://api.alterlab.io/v1/extract \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://cbinsights.com/example-page",
    "schema": {"properties": {"ticker": {"type": "string"}, "price": {"type": "string"}, "change_percent": {"type": "string"}}}
  }'
Try it yourself

Extract structured finance data from CB Insights

Define your schema

The schema is the contract between your application and the API. By using JSON Schema standards, you ensure that the data returning to your database is typed correctly.

When you define a property like "market_cap": {"type": "string"}, AlterLab validates the output. If the AI finds a value that doesn't fit the type or is missing, the API can flag it or attempt a retry. This eliminates the need for extensive try-except blocks and manual data cleaning in your Python code.

Expected JSON Output

A successful request returns a clean object:

JSON
{
  "status": "success",
  "data": {
    "ticker": "AAPL",
    "price": "185.92",
    "change_percent": "+1.2%",
    "volume": "52.3M",
    "market_cap": "2.8T"
  },
  "cost": "1000µ¢"
}

Handle pagination and scale

When extracting data for hundreds of companies, synchronous requests are inefficient. For high-volume pipelines, use asynchronous batching.

Python
import alterlab
import asyncio

client = alterlab.Client("YOUR_API_KEY")
urls = ["https://cbinsights.com/company/a", "https://cbinsights.com/company/b"]

async def fetch_data(url):
    # Using an async wrapper for the extract endpoint
    return await client.extract_async(url=url, schema=schema)

async def main():
    tasks = [fetch_data(url) for url in urls]
    results = await asyncio.gather(*tasks)
    for res in results:
        print(res.data)

asyncio.run(main())

Cost and Rate Management

To prevent budget overruns in large-scale jobs, use the cost estimation endpoint before committing to a large batch. Costs are calculated based on the complexity of the page and the orchestration fee. If you register your own LLM key (BYOK), the orchestration fee is reduced to 300 µ¢ per call.

For detailed billing tiers and limit increases, visit AlterLab pricing.

Key takeaways

Avoid fragile selectors: Use a schema-based data API to ensure your pipeline doesn't break during site updates. – Type your data: Use JSON schemas to enforce data types for tickers, prices, and market caps. – Scale asynchronously: Use asyncio and batch requests to handle large datasets efficiently. – Stay compliant: Only extract public data and respect robots.txt guidelines.

AlterLab // Web Data, Simplified.

Share

Was this article helpful?

Frequently Asked Questions

CB Insights offers enterprise-level data access, but for developers needing programmatic access to public data, AlterLab provides a structured JSON extraction API. This allows you to turn public HTML into typed data without manual parsing.
You can extract any publicly accessible finance data, including company tickers, current prices, percentage changes, and market caps. AlterLab uses a JSON schema to ensure the output is typed and consistent.
Extraction is billed on a pay-as-you-go basis via AlterLab pricing. Costs depend on the complexity of the extraction and whether you use a BYOK key for LLM orchestration.