API Documentation
Everything you need to integrate LucidExtractor into your applications.
Introduction
LucidExtractor is a powerful web scraping and SEO analysis platform designed for developers, marketers, and businesses. Extract data from any website, crawl sites, monitor changes and analyze on-page SEO - all through a simple REST API.
π Core Features
- β’ Single URL & Bulk Scraping
- β’ Website Crawling (Sitemap, Links, Hybrid)
- β’ AI-Powered Data Extraction
- β’ On-page SEO Analysis
- β’ Page Monitoring & Scheduling
- β’ JavaScript Rendering
β¨ Advanced Features
- β’ Browser Session Reuse
- β’ Page Actions (Click, Scroll, Fill)
- β’ Scrape Templates
- β’ Smart Caching
- β’ Webhook Integrations
- β’ MCP Server for AI Assistants
Getting Started
Follow these steps to start using LucidExtractor:
Create an Account
Sign up at lucidextractor.com/signup to get started with 500 free credits.
Get Your API Key
Navigate to Dashboard β API Keys to generate your unique API key.
Make Your First Request
Use the API key to authenticate and start scraping!
import requests
API_KEY = "your_api_key"
BASE_URL = "https://api.lucidextractor.com/v1"
response = requests.post(
f"{BASE_URL}/scrape/scrape",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"url": "https://example.com", "output": "markdown"}
)
data = response.json()
print(data["content"])Base URL
https://api.lucidextractor.com/v1API Endpoints Overview
| Endpoint | Description | Credits |
|---|---|---|
| /scrape/scrape | Single URL scraping | 1-10 |
| /scrape/batch | Bulk URL scraping | Per URL |
| /browser/batch | Browser session reuse | 3/URL |
| /crawl/crawl | Website crawling | Per page |
| /ai/extract | AI data extraction | 5+ |
| /seo/analyze | SEO analysis | 5 |
| /seo/audit | Advanced SEO audit | 15 |
| /seo/pagespeed | PageSpeed / Lighthouse | 8 |
| /seo/pagespeed/compare | Mobile vs desktop | 12 |
| /seo/core-web-vitals | Core Web Vitals check | 5 |
Authentication
All API requests require authentication using a Bearer token. Include your API key in the Authorization header.
π Security Tip: Never expose your API key in client-side code. Always make API calls from your server.
import requests
API_KEY = "your_api_key"
response = requests.post(
"https://api.lucidextractor.com/v1/scrape/scrape",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"url": "https://example.com"}
)
print(response.json())Error Handling
LucidExtractor uses standard HTTP status codes and returns structured JSON error responses to help you handle errors gracefully.
HTTP Status Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Missing or invalid API key |
| 402 | Insufficient Credits | Not enough credits for the request |
| 404 | Not Found | Resource not found |
| 422 | Validation Error | Request body failed validation |
| 429 | Rate Limited | Too many requests or concurrent limit exceeded |
| 500 | Server Error | Internal server error |
Error Response Format
{
"error": "error_type",
"message": "Human-readable error description",
"detail": "Additional context (when available)"
}Insufficient Credits (402)
Returns a detailed breakdown of the credit cost:
{
"error": "insufficient_credits",
"message": "You need 10 credits but only have 5 available",
"required": 10,
"available": 5,
"breakdown": {
"base": 5,
"js_render": 3,
"proxy": 2,
"screenshot": 0
}
}Rate Limiting (429)
Rate limits use a sliding window. Check the Retry-After header to know when to retry.
// Concurrent limit exceeded
{
"error": "concurrent_limit_exceeded",
"message": "Maximum concurrent requests reached for your plan"
}
// Rate limit exceeded (includes Retry-After header)
{
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 30 seconds"
}Credit Cost Breakdown
| Feature | Credits | Notes |
|---|---|---|
| Base scrape | 1 | Every request |
| JS rendering | +3 | render_js: true |
| Anti-bot bypass | +3 | bypass_protection: true |
| Screenshot | +2 | screenshot: true |
| AI extraction | +5 | Per AI call + tokens |
| SEO analysis | 5 | Includes JS rendering |
π‘ Best Practice: Always handle errors gracefully. Implement exponential backoff for 429 errors and check credit balance before large batch operations.
Scraping
The scraping API supports various options for extracting web content with full control over rendering, output format, and data extraction.
Basic Scrape
// POST /v1/scrape/scrape
{
"url": "https://example.com",
"output": "markdown", // html, markdown, text, json, markdown_clean, llm_json
"render_js": false, // Enable JavaScript rendering
"timeout": 30000 // Timeout in milliseconds
}With JavaScript Rendering
{
"url": "https://spa-example.com",
"render_js": true,
"wait_for": ".content-loaded", // Wait for CSS selector
"wait": 2000, // Additional wait (ms)
"device": "desktop", // desktop, mobile, tablet
"block_resources": true // Block images/CSS for speed
}With CSS Selector Extraction
{
"url": "https://example.com/products",
"render_js": true,
"extract": [
{"name": "title", "selector": "h1.product-title"},
{"name": "price", "selector": ".price", "attribute": "text"},
{"name": "images", "selector": "img.product", "attribute": "src", "multiple": true},
{"name": "rating", "selector": "[data-rating]", "attribute": "data-rating"}
]
}LLM-Ready Output
{
"url": "https://example.com/article",
"output": "llm_json",
"llm_clean": true, // Remove nav, footer, ads
"llm_metadata": true, // Extract title, author, dates
"llm_chunk": true, // Split into chunks
"llm_chunk_strategy": "heading", // paragraph, heading, sentence, token
"llm_chunk_size": 1000, // Max tokens per chunk
"llm_count_tokens": true // Count tokens for GPT-4, Claude
}With Screenshot
{
"url": "https://example.com",
"render_js": true,
"screenshot": true,
"screenshot_full_page": true, // Capture entire page
"screenshot_type": "png" // png or jpeg
}
// Response includes base64 screenshot in "screenshot" fieldOutput Formats
| Format | Description | Use Case |
|---|---|---|
| html | Raw HTML source | Custom parsing |
| markdown | Converted to Markdown | Documentation, LLMs |
| markdown_clean | Markdown without boilerplate | AI processing |
| text | Plain text only | Text analysis |
| json | Structured JSON with metadata | Data pipelines |
| llm_json | LLM-optimized with chunks | RAG, embeddings |
SEO Analysis
Comprehensive SEO analysis including E-E-A-T signals, Core Web Vitals, accessibility, and security audits.
Basic SEO Analysis
// POST /v1/seo/analyze (5 credits)
{
"url": "https://example.com"
}
// Response:
{
"url": "https://example.com",
"overall_score": 85,
"grade": "A",
"meta_tags": {
"title": "Example - Great Products",
"description": "Find the best...",
"has_title": true,
"title_length": 24
},
"headings": {"h1_count": 1, "h2_count": 5, ...},
"images": {"total": 12, "missing_alt": 2},
"links": {"internal": 45, "external": 8},
"schema": {"types": ["Organization", "Product"]},
"recommendations": [...]
}Advanced SEO Audit
// POST /v1/seo/audit (15 credits)
{
"url": "https://example.com",
"include_pagespeed": true, // Lighthouse mobile + desktop (Google PageSpeed Insights, our own Lighthouse as fallback)
"include_brand": true, // Brand consistency analysis
"include_security": true, // Security headers
"include_accessibility": true, // Accessibility audit
"include_resources": true // Resource optimization
}
// Response includes:
// - Core Web Vitals (LCP, INP, CLS, FCP, TTFB)
// - Lighthouse scores: performance, accessibility, best practices, SEO
// - Brand analysis (colors, fonts, logo)
// - Security headers (HSTS, CSP, X-Frame-Options)
// - Accessibility (ARIA, skip links, headings)
// - Resource optimization opportunitiesPageSpeed and Core Web Vitals
Lighthouse scores, lab metrics and real-user Core Web Vitals. By default we ask Google PageSpeed Insights; when Google can't serve the request (its shared rate limit, or it can't reach the page) the same audit runs in our own Chrome with Lighthouse, and real-user data comes from the Chrome UX Report. Each result says which one ran. Credits are charged only when the analysis succeeds.
// POST /v1/seo/pagespeed (8 credits)
{
"url": "https://example.com",
"strategy": "mobile", // mobile | desktop
"categories": ["performance", "accessibility", "best-practices", "seo"],
"engine": "auto", // auto (default) | google | lighthouse
"proxy": "http://user:pass@host:port" // optional: run Lighthouse through your proxy (implies "lighthouse")
}
// Response (excerpt):
{
"performance_score": 97,
"accessibility_score": 92,
"best_practices_score": 100,
"seo_score": 91,
"largest_contentful_paint": 1810.4, // lab, ms
"core_web_vitals": {
"has_real_data": true, // real Chrome users (field data) when Google has it
"lcp": {"value": 2745, "unit": "ms", "category": "AVERAGE"}, ...
},
"source": "pagespeed_api", // pagespeed_api | lighthouse
"lighthouse_version": "13.6.0",
"field_data_scope": "url", // url | origin | null (no real-user data for this site)
"fallback_reason": null, // why our own Lighthouse ran, when it did
"opportunities": [...], "diagnostics": [...]
}
// POST /v1/seo/pagespeed/compare (12 credits): same body; returns "mobile", "desktop" and "comparison"
// GET /v1/seo/core-web-vitals?url=https://example.com&engine=auto (5 credits):
// {"core_web_vitals": {...}, "overall_status": "good" | "needs-improvement" | "poor",
// "passed": true, "data_type": "field" | "lab", "field_data_scope": "url", "source": "pagespeed_api"}Real-user data exists only for pages and sites with enough Chrome traffic; otherwisefield_data_scope is null and Core Web Vitals are rated from the lab run. Our own Lighthouse only analyzes public addresses.
Analysis Components
π Traditional SEO
- β’ Meta tags (title, description, canonical)
- β’ Heading structure (H1-H6)
- β’ Image optimization (alt text)
- β’ Internal/external links
- β’ Schema.org structured data
β‘ Lab performance (own Chrome)
- β’ LCP, CLS, TBT, FCP, TTFB, Speed Index
- β’ Lab INP from a scripted session
- β’ Performance score (Lighthouse curves)
- β’ Field data from your visitors via RUM
- β’ Optimization opportunities
Bulk Scraping
Process multiple URLs efficiently with the batch API. Perfect for large-scale data extraction with CSS selectors. For AI-powered extraction, use /v1/ai/extract/batch.
Batch Request
// POST /v1/scrape/batch (2-100 URLs)
{
"urls": [
"https://example.com/page1",
"https://example.com/page2",
"https://example.com/page3"
],
"render_js": true,
"output": "markdown",
"parallel": 5,
"max_retries": 2,
"bypass_protection": false,
"proxy": "http://user:pass@your-proxy:8080",
"extract": [
{"name": "title", "selector": "h1"},
{"name": "price", "selector": ".price", "attribute": "text"}
]
}
// Response:
{
"results": [
{"url": "...", "content": "...", "extracted_data": {...}, "success": true},
{"url": "...", "content": "...", "extracted_data": {...}, "success": true},
{"url": "...", "error": "...", "success": false}
],
"credits_used": 6,
"successful": 2,
"failed": 1
}Async Bulk Jobs
// POST /v1/scrape/bulk/start
{
"urls": ["url1", "url2", ... "url1000"],
"render_js": true,
"output": "markdown"
}
// Response: {"job_id": "bulk_abc123"}
// Check status:
GET /v1/scrape/bulk/{job_id}/status
// Download results when complete:
GET /v1/scrape/bulk/{job_id}/downloadπ‘ Pro Tip: Use async bulk jobs for 100+ URLs. Results are stored for 48 hours.
Browser Batch
Process multiple URLs with a single browser instance for maximum efficiency. Perfect for scraping sites that require session persistence or authentication.
π Single Launch
One browser for all URLs - eliminates startup overhead
π Session Reuse
Maintains cookies/session across all URLs
β»οΈ Auto Recovery
Restarts browser if blocked
Browser Batch Request
// POST /v1/browser/batch
{
"urls": [
"https://example.com/page1",
"https://example.com/page2",
"https://example.com/page3"
],
"initial_url": "https://example.com", // Visit first to establish session
"bypass_protection": true,
"wait": 1000,
"output": "json",
"extract": [
{"name": "title", "selector": "h1"},
{"name": "price", "selector": ".price"}
],
"auto_recovery": true, // Restart browser if blocked
"block_images": true, // Speed up loading
"blocked_indicators": ["Access Denied", "Captcha"] // Detection patterns
}
// Response:
{
"success": true,
"total": 3,
"successful": 3,
"failed": 0,
"results": [
{"url": "...", "content": "...", "extracted": {...}},
...
],
"browser_restarts": 0
}Optimized Fetch Mode
// POST /v1/browser/fetch
{
"urls": ["url1", "url2", "url3", ...],
"initial_url": "https://example.com", // Session cookie source
"delay_between_requests": 1.5, // Delay in seconds
"max_retries": 2,
"output": "markdown"
}
// Uses internal fetch() after initial browser visit
// Faster than full browser rendering for each URLπ‘ Use Cases: E-commerce product scraping, paginated results, multi-page forms, sites requiring login, session-based content.
Browser Sessions
A real Chrome you drive step by step from your code, your own AI agent (over MCP) or the dashboard. A session costs 2 credits per started minute, uses the proxy saved in Settings (or one you pass), and closes after idle_timeout seconds without actions, at max_duration, or when your credits run out. Only public websites can be reached. Free plan: 1 session at a time, up to 15 minutes; paid plans: 2 to 10 sessions, up to 60 minutes.
# 1. Open a session (uses your saved proxy unless "use_saved_proxy": false)
curl -X POST https://api.lucidextractor.com/v1/browser/sessions \
-H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"idle_timeout": 120}'
# -> {"session": {"id": "ses_...", "status": "active", "credits_per_minute": 2, "proxy": "host:port", ...}}
# 2. Run actions in order (stops at the first failure unless "stop_on_error": false)
curl -X POST https://api.lucidextractor.com/v1/browser/sessions/ses_.../actions \
-H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"actions": [
{"type": "navigate", "url": "https://quotes.toscrape.com/login"},
{"type": "snapshot"},
{"type": "type", "selector": "#username", "text": "demo"},
{"type": "screenshot"}
]}'
# 3. Close it (stops the per-minute charge)
curl -X DELETE https://api.lucidextractor.com/v1/browser/sessions/ses_... -H "X-API-Key: YOUR_API_KEY"// Action types
{"type": "navigate", "url": "https://..."}
{"type": "click", "selector": "button.submit"} // or {"type": "click", "element": 12} from snapshot
{"type": "click_at", "x": 400, "y": 300}
{"type": "type", "element": 5, "text": "hello", "submit": true}
{"type": "press", "key": "Enter"} // Enter, Tab, Escape, ArrowDown, PageDown, ...
{"type": "scroll", "direction": "down", "amount": 800}
{"type": "wait", "ms": 1000}
{"type": "wait_for", "selector": ".results", "timeout": 20}
{"type": "evaluate", "script": "return document.title"}
{"type": "content", "format": "markdown"} // markdown | text | html
{"type": "snapshot"} // URL, title, numbered interactive elements, page text
{"type": "screenshot", "full_page": false} // base64 PNG
{"type": "cookies"}
{"type": "back"}
// Also: GET /v1/browser/sessions?status=active|closed and GET /v1/browser/sessions/{id}AI Agent
Give a task in plain English and a start URL; the agent drives a browser session and returns JSON. It runs on your own AI model and API key (Settings > AI & proxy), so model calls are billed by your provider. Its browser session costs 2 credits per started minute. The agent never buys, pays, signs up, deletes anything or enters passwords, and you can limit it to certain domains.
// POST /v1/agent/tasks
{
"task": "Find the quotes tagged 'humor' and return the author and text of the first two",
"start_url": "https://quotes.toscrape.com/",
"allowed_domains": ["quotes.toscrape.com"],
"max_steps": 25,
"output_schema": {
"type": "object",
"required": ["quotes"],
"properties": {"quotes": {"type": "array", "items": {"type": "object",
"properties": {"author": {"type": "string"}, "text": {"type": "string"}}}}}
}
}
// -> {"task": {"id": "agt_...", "status": "running", "model": "gemini/gemini-3.5-flash", ...}}
// GET /v1/agent/tasks/agt_... (poll every few seconds)
// -> {"task": {"status": "completed", "result": {"quotes": [...]}, "summary": "...",
// "steps": [{"n": 1, "tool": "click", "ok": true, ...}], "credits_charged": 6}}
// Statuses: running, completed, gave_up, failed, cancelled, max_steps, timeout
// DELETE /v1/agent/tasks/agt_... cancels a running taskYour AI Model & Proxy
Save your own proxy and your own AI model once (Settings > AI & proxy, or the API below). Secrets are encrypted and never returned. Your model is used for AI extraction (/v1/ai/*, which then costs only the scrape credits) and for the AI agent. Supported providers: OpenAI, Anthropic, Google AI Studio (Gemini), Mistral, Groq, DeepSeek, xAI, OpenRouter, Together AI, Fireworks AI, Cohere and Perplexity.
# Your proxy (used by browser sessions and the agent)
curl -X PUT https://api.lucidextractor.com/v1/integrations/proxy -H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" -d '{"proxy_url": "http://user:pass@host:port"}'
curl -X POST https://api.lucidextractor.com/v1/integrations/proxy/test -H "X-API-Key: YOUR_API_KEY"
# -> {"ok": true, "exit_ip": "203.0.113.7"}
# Your AI model: provider/model plus your API key
curl -X PUT https://api.lucidextractor.com/v1/integrations/llm -H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" -d '{"model": "openai/gpt-5.5", "api_key": "sk-..."}'
curl -X POST https://api.lucidextractor.com/v1/integrations/llm/test -H "X-API-Key: YOUR_API_KEY"
# -> {"ok": true, "model": "openai/gpt-5.5", "supports_tools": true}
# GET /v1/integrations shows what's saved (proxy host, model, last 4 of the key)
# DELETE /v1/integrations/proxy and DELETE /v1/integrations/llm remove themPage Actions
Execute browser actions before scraping to interact with dynamic content - click buttons, fill forms, scroll pages, and more.
Execute Actions
// POST /v1/actions/execute
{
"url": "https://example.com",
"actions": [
{"type": "click", "selector": ".cookie-accept"},
{"type": "wait", "value": "1000"},
{"type": "fill", "selector": "input[name='search']", "value": "query"},
{"type": "press", "value": "Enter"},
{"type": "wait_for", "selector": ".results-loaded"},
{"type": "scroll", "options": {"type": "bottom"}},
{"type": "screenshot"}
],
"stop_on_error": false,
"return_html": true
}Available Actions
| Action | Description | Parameters |
|---|---|---|
| click | Click an element | selector |
| fill | Type text into input | selector, value |
| scroll | Scroll the page | pixels/element/bottom/infinite |
| select | Select dropdown option | selector, value |
| hover | Hover over element | selector |
| wait | Wait fixed time | value (ms) |
| wait_for | Wait for selector/navigation | selector/options |
| press | Press keyboard key | value (key name) |
| evaluate | Run JavaScript | value (JS code) |
| screenshot | Capture screenshot | options.full_page |
Action Presets
// GET /v1/actions/presets
// Available presets:
{
"load_more": "Click load more buttons and scroll",
"infinite_scroll": "Scroll to trigger infinite loading",
"accept_cookies": "Click cookie consent buttons",
"close_popups": "Close modal and popup elements",
"login_form": "Template for login forms",
"search": "Template for search interactions"
}Website Crawling
Discover and scrape entire websites with our powerful async crawling API. Jobs run in the background with parallel workers for fast, scalable crawling.
Async Website Crawl (Recommended)
// POST /v1/crawl/async - Create async crawl job
{
"url": "https://example.com",
"max_pages": 100, // Max pages to crawl
"max_depth": 3, // Max link depth
"parallel_instances": 5, // Concurrent scraping workers (1-20)
"batch_size": 10, // URLs per batch (1-100)
"use_sitemap": true, // Parse sitemap.xml for URLs
"follow_links": true, // Discover URLs by following links
"include_patterns": ["^https://example.com/blog"],
"exclude_patterns": [".*\\.(pdf|zip)$"],
"render_js": false,
"output_format": "markdown",
"only_main_content": true,
"webhook_url": "https://your-site.com/webhook" // Optional
}
// Response:
{
"job_id": "cj_abc123xyz",
"status": "queued",
"message": "Crawl job created successfully",
"estimated_credits": 100
}Poll Job Progress
// GET /v1/crawl/jobs/{job_id}/progress
{
"job_id": "cj_abc123xyz",
"status": "scraping", // pending, discovering, scraping, completed, failed
"total_urls": 85,
"completed_urls": 42,
"failed_urls": 2,
"workers": {
"1": "working",
"2": "working",
"3": "idle"
},
"credits_used": 44
}Get Crawl Results
// GET /v1/crawl/jobs/{job_id}/results?page=1&page_size=50
{
"job_id": "cj_abc123xyz",
"status": "completed",
"total_results": 83,
"page": 1,
"page_size": 50,
"results": [
{
"url": "https://example.com/page1",
"success": true,
"title": "Page Title",
"content": "# Page Content...",
"scraped_at": "2024-01-15T10:30:00Z"
},
...
]
}Parse Sitemap
// POST /v1/crawl/sitemap
{
"url": "https://example.com",
"include_patterns": ["^https://example.com/blog"],
"exclude_patterns": ["/tag/", "/author/"],
"use_browser": false,
"limit": 10000
}
// Response:
{
"success": true,
"url": "https://example.com",
"total_urls": 500,
"total_sitemaps": 3,
"urls": [
{"url": "...", "lastmod": "2024-01-15", "priority": 0.8},
...
],
"sitemaps": ["sitemap.xml", "sitemap-posts.xml", ...]
}Quick URL Discovery (Map)
// POST /v1/crawl/map
{
"url": "https://example.com",
"use_sitemap": true,
"discover_links": true,
"limit": 5000
}
// Returns URLs without scraping - great for planningCrawl Job Endpoints
| Endpoint | Method | Description |
|---|---|---|
| /v1/crawl/async | POST | Create new async crawl job |
| /v1/crawl/jobs | GET | List all crawl jobs |
| /v1/crawl/jobs/{job_id} | GET | Get full job details |
| /v1/crawl/jobs/{job_id}/progress | GET | Lightweight progress polling |
| /v1/crawl/jobs/{job_id}/results | GET | Get paginated results |
| /v1/crawl/jobs/{job_id} | DELETE | Cancel running job |
Crawl Strategies
| Strategy | Description | Best For |
|---|---|---|
| use_sitemap: true | Parse sitemap.xml for URLs | Fast discovery of all pages |
| follow_links: true | Discover URLs by following links | Sites without sitemap |
| Both enabled | Sitemap + link discovery (hybrid) | Complete coverage |
| single | Single URL only | Specific page scraping |
AI Extraction
Use AI to extract structured data from web pages. Define a schema or describe what you need in natural language.
With JSON Schema
// POST /v1/ai/extract
{
"url": "https://example.com/product",
"schema_json": {
"type": "object",
"properties": {
"title": {"type": "string", "description": "Product title"},
"price": {"type": "number", "description": "Product price"},
"features": {
"type": "array",
"items": {"type": "string"},
"description": "List of features"
}
},
"required": ["title", "price"]
},
"render_js": true
}
// Response:
{
"success": true,
"extracted_data": {
"title": "Nike Air Max 90",
"price": 129.99,
"features": ["Air cushioning", "Leather upper", "Rubber outsole"]
},
"credits_used": 10
}With Natural Language Prompt
// POST /v1/ai/extract
{
"url": "https://example.com/article",
"prompt": "Extract the article title, author name, publication date, and main topics covered"
}
// AI will return structured data based on your promptExtract from Content
// POST /v1/ai/extract/content
{
"content": "# Product Page\n\nNike Air Max 90\nPrice: $129.99...",
"prompt": "Extract the product name and price"
}
// Extract from already-scraped content (cheaper, no scraping credit)Batch AI Extraction
// POST /v1/ai/extract/batch (up to 50 URLs)
{
"urls": [
"https://example.com/product1",
"https://example.com/product2",
"https://example.com/product3"
],
"schema_json": {
"type": "object",
"properties": {
"title": {"type": "string"},
"price": {"type": "number"}
}
},
// OR use natural language:
"prompt": "Extract product name and price",
"render_js": true,
"bypass_protection": false
}
// Response:
{
"success": true,
"total": 3,
"successful": 3,
"failed": 0,
"results": [
{"url": "...", "extracted_data": {...}, "success": true},
...
],
"credits_used": 30
}π€ AI Credits: AI extraction costs scraping credit + 1 credit per 1,000 AI tokens (minimum 1 credit). Use extract/content endpoint if you already have the content.
MCP Server
Integrate LucidExtractor with AI assistants like Claude using the Model Context Protocol (MCP). Connect to our hosted MCP server using your API key.
Claude Desktop Configuration
Add LucidExtractor to your Claude Desktop configuration:
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
// ~/Library/Application Support/Claude/claude_desktop_config.json (Mac)
// Claude Desktop launches local servers, so reach the remote one through mcp-remote.
{
"mcpServers": {
"lucidextractor": {
"command": "npx",
"args": ["mcp-remote", "https://api.lucidextractor.com/mcp-http/mcp",
"--header", "Authorization:${LUCID_AUTH}"],
"env": { "LUCID_AUTH": "Bearer YOUR_API_KEY" }
}
}
}
// Claude Code:
// claude mcp add --transport http lucidextractor https://api.lucidextractor.com/mcp-http/mcp \
// --header "Authorization: Bearer YOUR_API_KEY"
// Cursor (.cursor/mcp.json):
// { "mcpServers": { "lucidextractor": { "url": "https://api.lucidextractor.com/mcp-http/mcp",
// "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }Other MCP Clients
Connect any MCP-compatible client over Streamable HTTP (recommended) or the legacy SSE endpoint:
// JavaScript MCP Client
const client = new MCPClient({
transport: 'sse',
url: 'https://api.lucidextractor.com/mcp/sse',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const result = await client.callTool('scrape', {
url: 'https://example.com',
output_format: 'markdown'
});Browser tools for your AI agent
Your own agent (Claude, Cursor, any MCP client) can drive a browser session withbrowser_open,browser_act,browser_snapshot,browser_close andbrowser_sessions, or hand a whole task to our agent with agent_run andagent_status. Same billing as the REST API (2 credits per started session minute); the other tools are scrape, crawl, map, sitemap, extract, screenshot, monitor, seo and actions.
Available Tools
| Tool | Description |
|---|---|
| scrape | Scrape a single URL and get content |
| crawl | Crawl entire website with strategy |
| sitemap | Parse sitemap and get URLs |
| map | Discover URLs without scraping |
π‘ Tip: MCP tool calls consume credits based on your plan. Check your dashboard for usage details.
Page Monitoring
Monitor web pages for changes and get notified when content updates. Perfect for price tracking, stock monitoring, and content changes.
Create Monitor
// POST /v1/monitor (1 credit to create, 1 credit per check)
{
"name": "Product Price Monitor",
"url": "https://example.com/product",
"interval_minutes": 60,
"change_types": ["price", "availability", "content"],
"selectors": [
{"name": "price", "selector": ".product-price", "extract": "text"},
{"name": "stock", "selector": ".stock-status", "extract": "text"}
],
"render_js": true,
"bypass_protection": false,
"proxy_type": "none",
"notifications": [
{"type": "webhook", "url": "https://hooks.example.com/notify"},
{"type": "email", "address": "[email protected]"}
],
"ignore_whitespace": true,
"min_change_threshold": 0.05
}Change Types
| Type | Description |
|---|---|
| content | Any content change |
| text | Text content changes only |
| price | Price changes (e-commerce) |
| availability | Stock/availability changes |
| element | Specific element changes |
| links | Link changes |
Manage Monitors
# List all monitors
GET /v1/monitor
# Get specific monitor
GET /v1/monitor/{monitor_id}
# Update monitor
PATCH /v1/monitor/{monitor_id}
# Pause/Resume monitor
POST /v1/monitor/{monitor_id}/pause
POST /v1/monitor/{monitor_id}/resume
# Trigger manual check
POST /v1/monitor/{monitor_id}/check
# View change history
GET /v1/monitor/{monitor_id}/changes
# Delete monitor
DELETE /v1/monitor/{monitor_id}Scheduling
Schedule recurring scrape jobs with cron expressions. Automatically scrape pages on a schedule and receive results via webhook.
Create Schedule
// POST /v1/schedule (1 credit per scheduled run)
{
"name": "Daily News Scrape",
"url": "https://news.example.com",
"cron_expression": "0 8 * * *",
"timezone": "America/New_York",
"render_js": true,
"bypass_protection": false,
"proxy_type": "none",
"output_format": "markdown",
"only_main_content": true,
"is_crawl": false,
"ai_extract": true,
"ai_schema": {
"type": "object",
"properties": {
"headlines": {"type": "array", "items": {"type": "string"}}
}
},
"webhook_url": "https://hooks.example.com/results",
"notify_on_success": true,
"notify_on_failure": true
}Cron Expression Format
ββββββββββ minute (0-59)
β ββββββββ hour (0-23)
β β ββββββ day of month (1-31)
β β β ββββ month (1-12)
β β β β ββ day of week (0-6, Sun=0)
β β β β β
* * * * *
Common patterns:
β’ 0 * * * * - Every hour
β’ 0 8 * * * - Daily at 8:00 AM
β’ 0 8 * * 1 - Every Monday at 8:00 AM
β’ 0 0 1 * * - First day of month
β’ */15 * * * * - Every 15 minutes
β’ 0 9-17 * * 1-5 - Hourly 9-5 on weekdaysManage Schedules
# List all schedules
GET /v1/schedule
# Trigger manual run
POST /v1/schedule/{schedule_id}/run
# View run history
GET /v1/schedule/{schedule_id}/runs
# Pause/Resume schedule
POST /v1/schedule/{schedule_id}/pause
POST /v1/schedule/{schedule_id}/resumeWebhooks
Receive real-time notifications when events occur. Integrate with Slack, Discord, Zapier, Make, n8n, or your custom endpoint.
Create Webhook
// POST /v1/webhooks
{
"name": "Slack Notifications",
"url": "https://hooks.slack.com/services/xxx/yyy/zzz",
"type": "slack",
"events": [
"scrape.complete",
"scrape.failed",
"monitor.change",
"schedule.complete"
],
"secret": "your_webhook_secret",
"headers": {},
"retry_count": 3,
"timeout": 30
}Webhook Types
slack
Slack-formatted messages
discord
Discord embeds
zapier
Zapier webhooks
make
Make.com webhooks
n8n
n8n webhooks
custom
Raw JSON payload
Available Events
// GET /v1/webhooks/events
{
"events": [
"scrape.complete",
"scrape.failed",
"batch.complete",
"crawl.complete",
"crawl.progress",
"monitor.change",
"monitor.error",
"schedule.complete",
"schedule.failed",
"ai.extraction.complete"
]
}Templates
Save and reuse scrape configurations as templates. Perfect for standardizing extraction across similar sites.
Create Template
// POST /v1/templates
{
"name": "E-commerce Product Scraper",
"description": "Extracts product info from e-commerce sites",
"category": "ecommerce",
"output_format": "json",
"wait_for": ".product-details",
"timeout": 30000,
"actions": [
{"type": "click", "selector": ".cookie-accept"},
{"type": "wait", "value": "500"}
],
"extract_schema": {
"type": "object",
"properties": {
"title": {"type": "string"},
"price": {"type": "number"},
"images": {"type": "array"}
}
},
"include_selectors": [".product-info"],
"exclude_selectors": [".ads", ".sidebar"],
"tags": ["ecommerce", "products"],
"is_public": false
}Use Template
// POST /v1/templates/scrape
{
"url": "https://shop.example.com/product/123",
"template_id": "template_abc123",
"overrides": {
"timeout": 60000
}
}
// Response includes extracted data based on template configBuilt-in Templates
# Get built-in templates
GET /v1/templates/builtin
# Categories: ecommerce, news, social, blog, custom
# Duplicate and customize any templateSmart Caching
Enable smart caching to avoid redundant scrapes and reduce costs. Get cached results instantly for repeated requests.
Cached Scrape
// POST /v1/cache/scrape
{
"url": "https://example.com",
"output_format": "markdown",
"max_age": 3600, // Max cache age in seconds
"bypass_cache": false // Set true to force fresh scrape
}
// Response:
{
"success": true,
"url": "https://example.com",
"content": "...",
"cached": true,
"cache_hit": true,
"cached_at": "2024-01-15T10:00:00Z",
"expires_at": "2024-01-15T11:00:00Z",
"cache_hits": 5
}Cache Statistics
// GET /v1/cache/stats
{
"enabled": true,
"default_ttl": 3600,
"total_entries": 150,
"total_size_mb": 25.5,
"hits": 1200,
"misses": 300,
"hit_rate": 0.80,
"evictions": 50
}Bulk Cache Warming
// POST /v1/cache/bulk
{
"urls": ["url1", "url2", "url3"],
"output_format": "markdown",
"max_age": 7200,
"concurrent": 5
}
// Pre-warm cache for frequently accessed URLsCache Management
# Invalidate specific URL
POST /v1/cache/invalidate
{"url": "https://example.com"}
# Clear all cache
DELETE /v1/cache/clear
# Configure cache settings
PATCH /v1/cache/config
{"enabled": true, "default_ttl": 7200}π° Cost Savings: Cached results don't use credits. An 80% hit rate can reduce your scraping costs by 80%!
Proxy Support
β
BYOK (Bring Your Own Proxy): Use your own proxy from any provider by passing the proxy parameter. No additional charges for BYOK!
BYOK Proxy Usage
Use any proxy provider (BrightData, Oxylabs, SmartProxy, etc.) by providing your proxy URL directly:
{
"url": "https://protected-site.com",
"proxy": "http://user:[email protected]:8080",
"bypass_protection": true
}Proxy URL Format
| Protocol | Format |
|---|---|
| HTTP/HTTPS | http://user:pass@host:port |
| SOCKS5 | socks5://user:pass@host:port |
| Rotating | http://user:[email protected]:port |
π Managed Proxy Network Coming Soon: We're building an integrated proxy network with datacenter, residential, and premium options. Stay tuned for auto-rotation, geo-targeting, and guaranteed success rates!
π Protection Bypass: Enable bypass_protection to automatically handle Cloudflare, hCaptcha, and other bot protection systems.