POST
/
v1
/
localscraper

LocalScraper works similarly to SmartScraper but accepts HTML content directly instead of a URL. This is useful when you already have the HTML content or need to scrape content that requires authentication.

Key Features

  • Process HTML content directly
  • No URL required
  • Supports large HTML files (up to 2MB)
  • Same AI-powered extraction capabilities as SmartScraper

Example Response

{
  "request_id": "<request-id>",
  "status": "completed",
  "user_prompt": "Extract all product prices and names",
  "result": {
    "products": [
      {
        "name": "iPhone 15 Pro",
        "price": "$999.99",
        "availability": "In Stock"
      },
      {
        "name": "MacBook Air M2",
        "price": "$1,299.00",
        "availability": "Pre-order"
      },
      {
        "name": "AirPods Pro",
        "price": "$249.99",
        "availability": "In Stock"
      },
      {
        "name": "iPad Air",
        "price": "$599.00",
        "availability": "Out of Stock"
      }
    ]
  },
  "error": ""
}

Authorizations

SGAI-APIKEY
string
header
required

Body

application/json
user_prompt
string
required
website_html
string
required

HTML content, maximum size 2MB

output_schema
object | null

Response

200 - application/json
request_id
string
required
status
enum<string>
required
Available options:
queued,
processing,
completed,
failed
user_prompt
string
required
error
string
default:
result
object | null