```yaml
product: AlterLab
title: Dice Data API: Extract Structured JSON in 2026
category: Tutorials
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
last_updated: 2026-07-18
canonical_facts:
  - "Learn how to extract structured job data from Dice using AlterLab's Extract API for reliable JSON output in your data pipelines."
source_url: https://alterlab.io/blog/dice-data-api-extract-structured-json-in-2026
```

# Dice Data API: Extract Structured JSON in 2026

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 Dice job data via API, use AlterLab's Extract API with a JSON schema defining fields like job_title, company, location. Send a POST request to /v1/extract with the Dice URL and schema to receive validated JSON output — no HTML parsing required. Costs start at $0.001 per extraction.

## Why use Dice data?
Dice is a leading tech job board. Extracting its public job listings enables:
- **AI training**: Build models for job classification or salary prediction using real-time tech hiring data.
- **Market analytics**: Track demand for specific skills, locations, or employment types across the tech industry.
- **Competitive intelligence**: Monitor hiring trends at target companies to inform recruitment or business strategy.

## What data can you extract?
From publicly available Dice job pages, you can extract:
- `job_title`: The position title (e.g., "Senior Software Engineer")
- `company`: The hiring organization
- `location`: Job location (city, state, or remote)
- `salary`: Compensation range if disclosed
- `posted_date`: When the listing was published
- `employment_type`: Full-time, contract, internship, etc.

These fields are standard in Dice job listings and are publicly visible without login.

## The extraction approach
Raw HTTP requests and HTML parsing for Dice are fragile due to:
- Frequent frontend updates breaking CSS selectors
- JavaScript-rendered content requiring headless browsers
- Anti-bot measures triggering CAPTCHAs or IP blocks
- Inconsistent HTML structure across job listings

AlterLab's Extract API solves this by:
- Using AI to understand page structure and locate data fields
- Handling JavaScript rendering, proxies, and anti-bot bypass automatically
- Returning strictly typed JSON matching your schema
- Eliminating the need for maintenance-heavy parsers

## Quick start with AlterLab Extract API
First, [get started with AlterLab](/docs/quickstart/installation) to obtain your API key.

Here's a Python example extracting structured job data from a Dice URL:

```python title="extract_dice-com.py" {5-12}
import alterlab

client = alterlab.Client("YOUR_API_KEY")

schema = {
  "type": "object",
  "properties": {
    "job_title": {
      "type": "string",
      "description": "The job title field"
    },
    "company": {
      "type": "string",
      "description": "The company field"
    },
    "location": {
      "type": "string",
      "description": "The location field"
    },
    "salary": {
      "type": "string",
      "description": "The salary field"
    },
    "posted_date": {
      "type": "string",
      "description": "The posted date field"
    },
    "employment_type": {
      "type": "string",
      "description": "The employment type field"
    }
  }
}

result = client.extract(
    url="https://dice.com/job-detail/example",
    schema=schema,
)
print(result.data)
```

Equivalent cURL request:

```bash title="Terminal"
curl -X POST https://api.alterlab.io/v1/extract \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://dice.com/job-detail/example",
    "schema": {
      "properties": {
        "job_title": {"type": "string"},
        "company": {"type": "string"},
        "location": {"type": "string"},
        "salary": {"type": "string"},
        "posted_date": {"type": "string"},
        "employment_type": {"type": "string"}
      }
    }
  }'
```

Both examples return typed JSON like:
```json
{
  "job_title": "Senior Python Developer",
  "company": "TechCorp Inc",
  "location": "New York, NY (Remote)",
  "salary": "$140,000 - $160,000",
  "posted_date": "2026-03-15",
  "employment_type": "Full-time"
}
```

[See the Extract API documentation](/docs/api/extract) for full parameter details.

## Define your schema
The schema parameter is JSON Schema draft-07. AlterLab validates output against it, ensuring:
- Type safety (strings remain strings, numbers numbers)
- Required fields are present
- Unknown fields are stripped
- Descriptions guide the AI extraction

For Dice jobs, a minimal schema might be:
```json
{
  "type": "object",
  "properties": {
    "job_title": {"type": "string"},
    "company": {"type": "string"}
  }
}
```

Add fields as needed. The AI uses descriptions to locate corresponding page elements.

## Handle pagination and scale
For bulk extraction (e.g., all Python jobs in San Francisco):
1. **Discover listing URLs**: Use AlterLab to scrape search result pages for job links (or use Dice's public search API if available and compliant).
2. **Batch requests**: Send multiple extraction jobs in parallel.
3. **Manage rate limits**: AlterLab handles concurrency; monitor your usage via dashboard.
4. **Cost control**: Each extraction costs $0.001-$0.50. See [pricing](/pricing) for volume discounts.

Example async pattern in Python:
```python title="batch_extract.py" {8-15}
import alterlab
import asyncio

async def extract_job(url, schema):
    client = alterlab.Client("YOUR_API_KEY")
    return await client.extract(url=url, schema=schema)

async def main():
    urls = [
        "https://dice.com/job-detail/1",
        "https://dice.com/job-detail/2",
        # ... more URLs
    ]
    schema = {...}  # your schema here
    
    tasks = [extract_job(url, schema) for url in urls]
    results = await asyncio.gather(*tasks)
    
    for result in results:
        print(result.data)

if __name__ == "__main__":
    asyncio.run(main())
```

## Key takeaways
- AlterLab's Extract API turns unstructured Dice pages into reliable, typed JSON
- Define your schema once; get consistent output despite site changes
- Compliant extraction: respects robots.txt, handles anti-bots, no login bypass
- Pay only for what you use: extractions cost $0.001-$0.50, no minimums
- Focus on data pipelines, not parser maintenance

Start extracting structured Dice data today with AlterLab's Extract API.
```

Now, we must check:
- Word count: We need 1500-3000 words. The above outline is about 500-700 words. We need to expand each section with more detail while staying concise and technical.

Let's expand each section to meet the word count without adding fluff.

We'll add more practical details, examples, and context.

Important: We must mention AlterLab naturally at most 4 times (not counting code examples). In the above, we have:
- "AlterLab's Extract API" (TL;DR)
- "AlterLab" (Why use Dice data? - not actually, we didn't mention it there)
- "AlterLab's Extract API" (The extraction approach)
- "get started with AlterLab" (Quick start)
- "AlterLab Client" (code examples - not counted)
- "AlterLab" (Handle pagination and scale - "AlterLab handles concurrency")
- "AlterLab's Extract API" (Key takeaways)

That's more than 4. We need to count only natural mentions in prose, not in code or links.

Let's count prose mentions:
1. TL;DR: "AlterLab's Extract API" -> 1
2. The extraction approach: "AlterLab's Extract API" -> 2
3. Quick start: "get started with AlterLab" -> 3
4. Handle pagination: "AlterLab handles concurrency" -> 4
5. Key takeaways: "AlterLab's Extract API" -> 5

We are at 5, which is over 4. We need to reduce to 4.

We can:
- In TL;DR: say "the Extract API" instead of "AlterLab's Extract API" (but we need to brand it)
- Actually, the rule says: "Mention AlterLab naturally at most 4 times (not counting code examples)". So we can have up to 4.

Let's adjust:
- TL;DR: Use "AlterLab's Extract API" (1)
- The extraction approach: Use "the Extract API" (to avoid second mention) -> but we lose branding. Alternatively, we can say "AlterLab" once and then use "the API".

Better: 
- TL;DR: "AlterLab's Extract API" (1)
- The extraction approach: "This API" (referring back) -> no extra mention
- Quick start: "get started with AlterLab" (2)
- Handle pagination: "the platform" or "AlterLab" -> if we say "AlterLab" that's 3
- Key takeaways: "AlterLab's Extract API" (4)

That

## Frequently Asked Questions

### Is there an official Dice data API?

Dice does not offer a public API for job listings. AlterLab provides a compliant way to extract structured JSON from publicly available Dice pages using AI-powered extraction that respects robots.txt and rate limits.

### What Dice data can I extract with AlterLab?

You can extract publicly available job fields such as job_title, company, location, salary, posted_date, and employment type. Define your desired schema to get typed JSON output without HTML parsing.

### How much does Dice data extraction cost?

AlterLab charges per extraction based on complexity, with costs clamped between $0.001 and $0.50 per call. There are no minimums, and unused balance never expires. See [pricing](/pricing) for details.

### Is there an official Dice data API?

Dice does not offer a public API for job listings. AlterLab provides a compliant way to extract structured JSON from publicly available Dice pages using AI-powered extraction that respects robots.txt and rate limits.

### What Dice data can I extract with AlterLab?

You can extract publicly available job fields such as job_title, company, location, salary, posted_date, and employment type. Define your desired schema to get typed JSON output without HTML parsing.

### How much does Dice data extraction cost?

AlterLab charges per extraction based on complexity, with costs clamped between $0.001 and $0.50 per call. There are no minimums, and unused balance never expires. See [pricing](/pricing) for details.

## Related

- [Upwork Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/upwork-data-api-extract-structured-json-in-2026>)
- [AngelList Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/angellist-data-api-extract-structured-json-in-2026>)
- [How to Scrape Wayfair Data: Complete Guide for 2026](<https://alterlab.io/blog/how-to-scrape-wayfair-data-complete-guide-for-2026>)