{"openapi":"3.1.0","info":{"title":"Web Page API","description":"Web Page API is a hosted REST API that turns any public URL into a link preview (title, description, images, favicons, Open Graph and Twitter card fields) or into the page's main content as clean Markdown for LLM prompts and RAG, both behind one API key. It fetches without a headless browser, refuses private-network and cloud-metadata addresses, and stores nothing.\n\nUse /v1/preview for link unfurling in chat, CMS, social and bookmarking apps, and /v1/markdown to feed web pages to LLMs, agents, RAG pipelines and search indexes. Markdown requests honour robots.txt; previews do not, like Slack and Discord unfurlers. One fetch is capped at 8 seconds and 3 MB, so allow at least 15 s client timeouts. Docs, pricing and FAQ: https://web-page-api.fly.dev/","contact":{"url":"https://web-page-api.fly.dev/"},"version":"1.0.0"},"paths":{"/v1/preview":{"get":{"tags":["Web pages"],"summary":"Link preview: title, description, images, favicon, Open Graph and Twitter card","description":"Fetches the page's head and returns a link preview: title, description, site_name, canonical, lang, type, image and images[] (absolute, with width/height/alt when declared), videos[], favicons[], theme_color, author, published/modified time, keywords, oEmbed endpoint and Twitter card fields, plus final_url, status, redirects and fetch_ms. Falls back from Open Graph to Twitter card to plain HTML. Non-HTML URLs (an image, a PDF) get a minimal preview. Does not consult robots.txt, like Slack and Discord unfurlers. Private and metadata addresses are refused.","operationId":"getLinkPreview","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2048,"description":"Absolute http(s) URL of the page","examples":["https://en.wikipedia.org/wiki/Markdown"],"title":"Url"},"description":"Absolute http(s) URL of the page"},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/markdown":{"get":{"tags":["Web pages"],"summary":"Fetch a page and return its main content as clean Markdown","description":"Fetches the page and returns only its main content (article, docs page, README) as clean Markdown, without menus, footers or cookie banners, for LLM prompts, RAG and search indexing. Also returns title, description, lang, image, word_count, reading_time_minutes, truncated and, with include_links=true, a links list. Honours robots.txt for the token WebPageAPI (robots_disallowed otherwise). text/plain and text/markdown pages are returned as is.","operationId":"getMarkdownFromUrl","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2048,"description":"Absolute http(s) URL of the page","examples":["https://en.wikipedia.org/wiki/Markdown"],"title":"Url"},"description":"Absolute http(s) URL of the page"},{"name":"include_links","in":"query","required":false,"schema":{"type":"boolean","description":"Keep hyperlinks and return a links list","default":false,"title":"Include Links"},"description":"Keep hyperlinks and return a links list"},{"name":"include_images","in":"query","required":false,"schema":{"type":"boolean","description":"Keep images as ![alt](url)","default":false,"title":"Include Images"},"description":"Keep images as ![alt](url)"},{"name":"max_chars","in":"query","required":false,"schema":{"type":"integer","maximum":1000000,"minimum":100,"description":"Truncate the Markdown to this many characters","default":100000,"title":"Max Chars"},"description":"Truncate the Markdown to this many characters"},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Web pages"],"summary":"Convert HTML you already have to clean Markdown (nothing is fetched)","description":"Converts HTML you already have to the same Markdown output as GET /v1/markdown. Nothing is fetched; base_url is only used to resolve relative links.","operationId":"convertHtmlToMarkdown","parameters":[{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HtmlIn":{"properties":{"html":{"type":"string","maxLength":3000000,"minLength":1,"title":"Html","description":"The page's HTML"},"base_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Base Url","description":"URL the HTML came from; used only to resolve relative links"},"include_links":{"type":"boolean","title":"Include Links","default":false},"include_images":{"type":"boolean","title":"Include Images","default":false},"max_chars":{"type":"integer","maximum":1000000.0,"minimum":100.0,"title":"Max Chars","default":100000}},"type":"object","required":["html"],"title":"HtmlIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"externalDocs":{"description":"Docs, examples, pricing and FAQ","url":"https://web-page-api.fly.dev/"}}