MarkUDown

Prompt Extract API — MarkUDown LLM web data extraction docs

POST/api/prompt-extract

Prompt Extract

Extract data from a page with a plain-language instruction — no schema. The LLM chooses the field names and returns an array of JSON objects.

ParameterTypeRequiredDefaultDescription
urlstringrequired—URL of the page to extract from.
promptstringrequired—What to extract, in plain language.
main_contentbooleanoptionaltrueExtract only the main content (drops navigation, header and footer).
timeoutintegeroptional60Page load timeout in seconds.
callback_urlstringoptionalnullWebhook URL to POST the result to when the job completes.

Request

curl -X POST https://api.scrapetechnology.com/api/prompt-extract \
  -H "X-API-KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://quotes.toscrape.com/", "prompt": "Every quote with its author and tags"}'

Response

// POST returns { "success": true, "id": "abc123", "url": "/api/extract/abc123" }
// Poll GET /api/extract/{id}
{
  "success": true,
  "id": "abc123",
  "status": "completed",
  "data": {
    "success": true,
    "data": [
      {
        "quote": "The world as we have created it is a process of our thinking...",
        "author": "Albert Einstein",
        "tags": ["change", "deep-thoughts", "thinking", "world"]
      }
    ],
    "total": 1,
    "url": "https://quotes.toscrape.com/",
    "processing_time_ms": 5400
  }
}

Python — pip install markudown

from markudown import MarkUDown

md = MarkUDown(api_key="your-api-key")
job = md.prompt_extract("https://quotes.toscrape.com/", "Every quote with its author and tags")
print(job["data"]["data"])

Node.js — npm install markudown-sdk

import { MarkUDown } from "markudown-sdk";

const md = new MarkUDown({ apiKey: "your-api-key" });
const job = await md.promptExtract("https://quotes.toscrape.com/", "Every quote with its author and tags");
console.log(job.data.data);
Prompt Extract jobs are polled at GET /api/extract/{id} (not /api/prompt-extract). Only the first 50,000 characters of the page's Markdown are sent to the LLM.

Cost: 5 credits per request.