Structured Tool2 credits
scrape_structured
Extract structured data from any webpage using custom CSS selectors. Perfect for e-commerce product scraping, news aggregation, and any custom data extraction needs.
Use Cases
E-Commerce Product Scraping
Extract product titles, prices, descriptions, and images from online stores
News Article Extraction
Extract headlines, authors, dates, and content from news sites
Custom Data Transformation
Map any HTML structure to your desired JSON schema
Real Estate Listings
Extract property details, prices, and images from listing sites
Endpoint
POST
/api/v1/tools/scrape_structuredAuth Required
2 req/s on Free plan
2 credits
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Required | - | URL to scrape Example: https://example.com/product |
selectors | object | Required | - | CSS selectors mapping field names to selectors Example: {"title": "h1.product-title", "price": ".price", "description": ".product-desc"} |
CSS Selectors: Use any valid CSS selector syntax. Common patterns:
.className- Select by class#id- Select by IDtag.class- Combine tag and class.parent > .child- Direct child[data-id="value"]- Attribute selector
Request Examples
cURL - E-Commerce Product
terminalBash
TypeScript - News Article
scrapeStructured.tsTypescript
Python - Real Estate Listing
scrape_structured.pyPython
Response Example
200 OK320ms
{ "success": true, "data": { "title": "Premium Wireless Headphones", "price": "299.99", "currency": "USD", "description": "High-quality wireless headphones with active noise cancellation and 30-hour battery life.", "image": "https://example.com/images/headphones.jpg", "rating": "4.7", "availability": "In Stock" }, "credits_used": 2, "credits_remaining": 998, "processing_time": 320}Field Descriptions
data.titleExtracted from h1.product-title selectordata.priceExtracted from .price-value selectordata.descriptionExtracted from .product-description selectorcredits_usedCredits deducted for this request (2 per scrape)Credit Cost
2 credits
2 credits per request
Each structured scrape costs 2 credits, regardless of the number of selectors.
Tip: For scraping multiple pages with the same structure, use batch_scrape for better efficiency.
Related Tools
Ready to extract structured data? Sign up for free and get 1,000 credits.