Extract from URL

Point it at any website. Describe what you want. Get structured JSON data.

Checking agent-browser…
Configuration
Extraction
Extraction failed
✓ Extracted
API Reference
POST /api/extract

Navigates to the given URL using a headless browser, captures the page content, and uses an OpenAI model to extract exactly what you describe. Returns structured JSON.

Request Headers
HeaderTypeDescription
Content-TypestringrequiredMust be application/json
X-Pass-KeystringoptionalRequired only when PASS_KEY is set in server .env
Request Body
FieldTypeDescription
urlstringrequiredThe full URL of the page to scrape (e.g. https://example.com)
extractionDetailsstringrequiredPlain-English description of what data to extract
openaiApiKeystringoptionalYour OpenAI API key. Falls back to OPENAI_API_KEY in server .env
modelstringoptionalOpenAI model to use. Default: gpt-4o-mini
outputFormatobjectoptionalA JSON schema / example structure. The AI fills in values matching this shape.
Example — basic extraction
curl -X POST http://localhost:3000/api/extract \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "extractionDetails": "Extract the top 5 stories: title, URL, and points for each",
    "model": "gpt-4o-mini"
  }'
Example — with output schema
curl -X POST http://localhost:3000/api/extract \
  -H "Content-Type: application/json" \
  -H "X-Pass-Key: your-pass-key" \
  -d '{
    "url": "https://example.com/product/123",
    "extractionDetails": "Extract product details",
    "model": "gpt-4o",
    "outputFormat": {
      "name": "",
      "price": 0,
      "currency": "",
      "rating": 0,
      "reviews": [{ "author": "", "stars": 0, "text": "" }]
    }
  }'
Success Response
{
  "success": true,
  "data": { ... },          // extracted data matching your request
  "url": "https://...",
  "extractedAt": "2025-01-15T08:30:00.000Z",
  "model": "gpt-4o-mini",
  "tokensUsed": 1842
}
Error Response
{
  "success": false,
  "error": "Human-readable error message"
}
GET /api/health

Verifies agent-browser is installed and returns the server configuration. No authentication required.

Example
curl http://localhost:3000/api/health
Response
{
  "status": "ok",
  "agentBrowser": "1.2.3",
  "hasApiKey": true,
  "requiresPassKey": false,
  "timestamp": "2025-01-15T08:00:00.000Z"
}
Tips · Be specific — "Extract the H1 heading and the first paragraph" works better than "summarise the page." · For pages behind filters or dropdowns, the tool automatically plans and executes UI interactions before extracting. · The output format field accepts any valid JSON — arrays, nested objects, whatever you need.