MarkUDown
Create Schema API — MarkUDown AI extraction schema generator docs
POST
/api/create-schemaCreate Schema
Describe the data you want in plain language and get back a suggested extraction setup, generated by an LLM: the fields and their types, the extraction scope and keyword/path filters for URLs. The request is synchronous.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| query | string | required | — | Plain-language description of the data you want, optionally with the site URL. |
Request
curl -X POST https://api.scrapetechnology.com/api/create-schema \
-H "X-API-KEY: your-api-key" \
-H "Content-Type: application/json" \
-d '{"query": "title, price and star rating of every book on https://books.toscrape.com"}'Response
{
"url": "https://books.toscrape.com",
"extraction_scope": "list_page",
"extraction_target": null,
"title": "string",
"price": "float",
"rating": "string",
"allowed_words": ["catalogue", "book"],
"blocked_words": ["login", "basket"],
"allowed_patterns": ["/catalogue/"],
"blocked_patterns": []
}Python — pip install markudown
from markudown import MarkUDown
md = MarkUDown(api_key="your-api-key")
schema = md.create_schema("title, price and star rating of every book on https://books.toscrape.com")
print(schema)Node.js — npm install markudown-sdk
import { MarkUDown } from "markudown-sdk";
const md = new MarkUDown({ apiKey: "your-api-key" });
const schema = await md.createSchema("title, price and star rating of every book on https://books.toscrape.com");
console.log(schema);The response is one flat JSON object: every key other than url, extraction_scope, extraction_target and the four filter lists is a field name with its type. To use it with Extract, turn each field into {"name": …, "type": …, "active": true}. extraction_scope is one of whole_site, category, single_page, search_query, list_page or unknown. Review the output: it is written by an LLM.
Cost: No credits charged; counts toward the rate limit.