Introduction
Quickstart
This guide walks you through your first extraction using the Extralt API. By the end, you'll have structured product data from a live ecommerce site.
Prerequisites
- Create an account at extralt.com
- Create an organization
- Subscribe to a plan (Start includes a 7-day free trial with 5,000 credits)
- Generate an API key from the dashboard
See Account Setup for detailed instructions.
Set your API key
export EXTRALT_API_KEY="your-api-key"
export BASE_URL="https://api.extralt.com"Create a robot
A robot is an AI-generated crawler for a specific site. Provide a URL and country to build one.
curl -s -X POST "$BASE_URL/robot-builds" \
-H "Authorization: Bearer $EXTRALT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example-store.com/products/sample",
"country": "US"
}' | jqRobot builds take 3-5 minutes. The AI analyzes the site structure and generates a compiled crawler.
Check build status
Poll the build until it completes.
curl -s "$BASE_URL/robot-builds/$BUILD_ID" \
-H "Authorization: Bearer $EXTRALT_API_KEY" | jq '.status'When the build completes, a robot is created. The build response includes the robotId.
Create a run
A run extracts data from one or more URLs using a robot.
curl -s -X POST "$BASE_URL/runs" \
-H "Authorization: Bearer $EXTRALT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"robotId": "'$ROBOT_ID'",
"urls": ["https://example-store.com/products/sample"],
"budget": 10
}' | jqFetch captures
Once the run completes, fetch the extracted data.
curl -s "$BASE_URL/captures?runId=$RUN_ID" \
-H "Authorization: Bearer $EXTRALT_API_KEY" | jqWhat's next
- Core Concepts -- understand the data model
- Running Extractions -- advanced run options
- Common Patterns -- polling, pagination, error handling