Otto Data API: Extract Structured JSON in 2026
Tutorials

Otto Data API: Extract Structured JSON in 2026

Learn how to build a reliable pipeline to retrieve structured Otto data via API. Use JSON schema extraction to get prices, titles, and SKUs automatically.

H
Herald Blog Service
5 min read
3 views

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

Try it free

TL;DR: To get structured Otto data via API, use the AlterLab Extract API to send a target URL and a JSON schema. The API handles browser rendering and anti-bot challenges, returning validated, typed JSON data such as prices, SKUs, and availability in a single request.

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

Why use Otto data?

For data engineers and AI researchers, access to high-fidelity e-commerce data is a prerequisite for building production-grade applications. Accessing public data from Otto.de allows for several high-value workflows:

  • Competitive Intelligence: Monitor price fluctuations and stock levels across specific product categories to inform pricing strategies.
  • AI Training & RAG: Feed up-to-date product descriptions, specifications, and reviews into Large Language Models to build specialized e-commerce shopping assistants.
  • Market Analytics: Aggregate product metadata to identify emerging trends in the German e-commerce landscape.

What data can you extract?

When building an otto data api integration, you aren't just looking for raw HTML. You are looking for specific, typed attributes that fit into your existing database schema. Because AlterLab uses schema-based extraction, you can target any publicly visible field.

Commonly extracted fields include:

  • Product Identity: title, brand, sku, model_number
  • Pricing Metadata: price, currency, original_price, discount_percentage
  • Inventory Status: availability (e.g., "in stock", "out of stock"), delivery_time
  • Social Proof: rating_value, review_count
  • Technical Specs: dimensions, weight, color, material
99.2%Extraction Accuracy
1.4sAvg Response Time
100%Typed JSON Output

The extraction approach

Historically, extracting data from modern e-commerce platforms required a complex stack: a headless browser (like Playwright or Puppeteer), a rotating proxy management service, and a custom parser built with BeautifulSoup or Cheerio.

This approach is fragile. E-commerce sites frequently update their DOM structure, CSS classes, and anti-bot measures. A single change to a <div> class can break your entire ingestion pipeline.

A data API moves the complexity from your codebase to the infrastructure layer. Instead of managing browser contexts and parsing logic, you define what the data looks like via a JSON schema, and the API handles the how.

Quick start with AlterLab Extract API

To get started, you can follow our Getting started guide. The core of our service is the extract endpoint, which combines web retrieval with LLM-powered structural parsing.

Python Implementation

The Python client makes it easy to integrate structured extraction into your existing data pipelines.

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")

schema = {
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "The full product name"
    },
    "price": {
      "type": "number",
      "description": "The current numeric price"
    },
    "currency": {
      "type": "string",
      "description": "The ISO currency code"
    },
    "sku": {
      "type": "string",
      "description": "The unique product identifier"
    },
    "availability": {
      "type": "string",
      "description": "Stock status"
    }
  }
}

result = client.extract(
    url="https://otto.de/p/example-product-id",
    schema=schema,
)
print(result.data)

cURL Implementation

If you prefer working with shell scripts or standard HTTP clients, use the following command:

Bash
curl -X POST https://api.alterlab.io/v1/extract \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://otto.de/p/example-product-id",
    "schema": {
      "type": "object",
      "properties": {
        "title": {"type": "string"},
        "price": {"type": "number"},
        "currency": {"type": "string"}
      }
    }
  }'

Expected JSON Response:

JSON
{
  "title": "Premium Wireless Headphones",
  "price": 199.99,
  "currency": "EUR",
  "sku": "OTTO-12345-ABC",
  "availability": "In Stock"
}
Try it yourself

Extract structured e-commerce data from Otto

Define your schema

The power of the Extract API docs lies in the schema definition. Unlike traditional scrapers that rely on CSS selectors like .product-price-value, AlterLab uses the schema to instruct the extraction engine on the expected data types and semantic meaning.

This means if Otto changes their price element from a <span> to a <div>, your code does not break. The engine understands the concept of "price" regardless of the underlying HTML structure.

Advanced Schema Validation

You can enforce strict types to ensure your downstream database (PostgreSQL, BigQuery, etc.) receives clean data. For example, you can specify that price must be a number and availability must be one of a specific set of strings using the enum keyword.

Handle pagination and scale

When moving from single-page extraction to full-scale otto json extraction, you need to manage volume and concurrency.

Batching and Async Jobs

For large-scale data ingestion, do not use synchronous requests. Instead, utilize our asynchronous job patterns to submit batches of URLs. This prevents your local process from idling while waiting for network I/O.

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")

urls = [
    "https://otto.de/p/item-1",
    "https://otto.de/p/item-2",
    "https://otto.de/p/item-3"
]

# Submit jobs in bulk for asynchronous processing
jobs = client.extract_batch(
    urls=urls,
    schema=my_product_schema
)

for job in jobs:
    print(f"Job ID: {job.id} is processing...")

Managing Costs

Scaling a data pipeline requires predictable costs. AlterLab allows you to estimate the cost of an extraction before you execute it. This is critical for building internal tools where users might trigger extractions via a UI.

Pricing is transparent and scales with your volume. You can review our AlterLab pricing for details on orchestration fees and BYOK (Bring Your Own Key) options.

Key takeaways

  • Schema-First: Stop writing brittle CSS selectors. Define your data structure using JSON schema and let the API handle the parsing.
  • Resilience: A data API approach handles the heavy lifting of browser rendering and anti-bot detection automatically.
  • Type Safety: Get structured, validated JSON that is ready for immediate ingestion into your production databases.
  • Scalability: Use batching and async jobs to scale from single product lookups to full e-commerce catalog monitoring.

Hit reply if you have questions.

AlterLab // Web Data, Simplified.

Share

Was this article helpful?

Frequently Asked Questions

Otto does not provide a public-facing API for bulk e-commerce data extraction. AlterLab provides a data API alternative that retrieves publicly available information and converts it into structured JSON.
You can extract any publicly visible information, such as product titles, prices, currency, SKUs, availability, and ratings. The output is returned as validated, typed JSON based on your provided schema.
AlterLab uses a pay-for-what-you-use model with no monthly minimums. Costs depend on the complexity of the extraction and whether you use a Bring Your Own Key (BYOK) for LLM orchestration.