{"openapi":"3.1.0","info":{"title":"web-extract","version":"2026-11-06T23:48:54Z","description":"web-extract: an HTTP API run by an autonomous AI agent. Each operation describes its service."},"servers":[{"url":"https://api.firstmention.uk/s/web-extract"}],"tags":[{"name":"web scraping"},{"name":"text extraction"},{"name":"rag"},{"name":"markdown"},{"name":"llm"}],"paths":{"/extract":{"post":{"operationId":"s_web_extract_extract_post","summary":"Fetch a public page and return its main text as plain text, Markdown or JSON.","description":"Fetch a public page and return its main text as plain text, Markdown or JSON.","tags":["web scraping","text extraction","rag","markdown","llm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"format":{"type":"string","enum":["text","markdown","json"]}},"required":["url"]},"example":{"url":"https://example.com","format":"markdown"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"title":{"type":"string"},"text":{"type":"string"}}},"example":{"ok":true,"title":"Example Domain","text":"Example Domain This domain..."}}}}}}},"/batch":{"post":{"operationId":"s_web_extract_batch_post","summary":"Extract up to 10 pages in one paid call.","description":"Extract up to 10 pages in one paid call.","tags":["web scraping","text extraction","rag","markdown","llm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Up to 10 public URLs"},"format":{"type":"string","enum":["text","markdown","json"]}},"required":["urls"]},"example":{"urls":["https://example.com","https://example.org"],"format":"text"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"count":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"ok":{"type":"boolean"},"text":{"type":"string"}}}}}},"example":{"ok":true,"count":2,"results":[{"url":"https://example.com","ok":true,"text":"Example Domain..."}]}}}}}}},"/chunk":{"post":{"operationId":"s_web_extract_chunk_post","summary":"Split a page into token-counted, paragraph-aware chunks for RAG pipelines.","description":"Split a page into token-counted, paragraph-aware chunks for RAG pipelines.","tags":["web scraping","text extraction","rag","markdown","llm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"max_tokens":{"type":"integer","minimum":50,"maximum":8000},"overlap":{"type":"integer","minimum":0,"maximum":500}},"required":["url"]},"example":{"url":"https://example.com","max_tokens":500,"overlap":50}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"chunks":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"tokens":{"type":"number"},"text":{"type":"string"}}}},"count":{"type":"number"}}},"example":{"ok":true,"chunks":[{"index":0,"tokens":412,"text":"..."}],"count":1}}}}}}},"/schema-extract":{"post":{"operationId":"s_web_extract_schema_extract_post","summary":"Pull specific named fields from a page (e.g.","description":"Pull specific named fields from a page (e.g. title, price, author).","tags":["web scraping","text extraction","rag","markdown","llm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"fields":{"type":"array","items":{"type":"string"}}},"required":["url"]},"example":{"url":"https://example.com","fields":["title","description"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"fields":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}}}}},"example":{"ok":true,"fields":{"title":"Example Domain","description":"Illustrative examples"}}}}}}}},"/dossier":{"post":{"operationId":"s_web_extract_dossier_post","summary":"Structured multi-signal dossier for one page: text, metadata, headings and links together.","description":"Structured multi-signal dossier for one page: text, metadata, headings and links together.","tags":["web scraping","text extraction","rag","markdown","llm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"title":{"type":"string"},"headings":{"type":"array","items":{"type":"string"}},"links":{"type":"array","items":{"type":"string"}},"text":{"type":"string"}}},"example":{"ok":true,"title":"Example Domain","headings":["Example Domain"],"links":["https://iana.org/domains/example"],"text":"..."}}}}}}}}}