{"openapi":"3.1.0","info":{"title":"Web Page to Markdown & AI Summary API","version":"1.0.0","description":"Turn any URL into clean Markdown or plain text for LLMs, RAG and AI agents: navigation, footers and cookie banners are removed, PDFs and Office documents are converted too, and pages that need JavaScript or block bots are rendered in a real browser automatically. A second endpoint returns an AI summary of a URL or your own text.\n\nAll endpoints accept GET (query string) or POST (JSON body). Errors use one shape: `{\"success\": false, \"error\": {\"code\", \"message\", \"retryable\"}}`. When a numeric `Retry-After` header is present, `error.retryAfterSeconds` is included.","contact":{"name":"TidyTools","url":"https://apify.com/tidytools"}},"servers":[{"url":"https://webcapture-api.yukailin.workers.dev","description":"Origin (reachable only through the marketplace gateway)"}],"tags":[{"name":"Markdown"}],"paths":{"/api/v1/markdown":{"get":{"operationId":"markdownGet","summary":"Convert a URL to Markdown or text (GET)","description":"Fetches the page (or document) and returns its main content as Markdown (default) or plain text, with a token estimate.","tags":["Markdown"],"parameters":[{"name":"url","schema":{"type":"string"},"description":"Page URL. A bare domain such as `example.com` is accepted (https is assumed). Private, local and cloud-metadata addresses are refused.","required":true,"example":"https://example.com","in":"query"},{"name":"format","schema":{"type":"string","default":"markdown","enum":["markdown","text"]},"description":"Output format.","required":false,"in":"query"},{"name":"render","schema":{"type":"string","default":"auto","enum":["auto","never","always"]},"description":"`auto` (default): plain HTTP first, a real Chrome browser only when the site blocks plain requests or needs JavaScript. `never`: HTTP only. `always`: browser only.","required":false,"in":"query"},{"name":"removeBoilerplate","schema":{"type":"boolean","default":true},"description":"Drop navigation, header, footer, aside and similar page chrome.","required":false,"in":"query"},{"name":"cssSelector","schema":{"type":"string"},"description":"Keep only the part of the page matching this CSS selector (e.g. `article`).","required":false,"in":"query"},{"name":"includeLinks","schema":{"type":"boolean","default":false},"description":"Also return the absolute links found on the page (up to 1,000).","required":false,"in":"query"},{"name":"maxChars","schema":{"type":"integer","default":200000,"minimum":100,"maximum":500000},"description":"Maximum characters in this chunk. Use `startIndex` or `nextStartIndex` to read the rest.","required":false,"in":"query"},{"name":"startIndex","schema":{"type":"integer","default":0,"minimum":0},"description":"Character offset in the full converted content. Send 0 to receive pagination metadata, then use `nextStartIndex` until it is null.","required":false,"in":"query"},{"name":"timeoutMs","schema":{"type":"integer","default":20000,"minimum":1000,"maximum":30000},"description":"Page-load timeout in milliseconds.","required":false,"in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string"},"finalUrl":{"type":"string"},"statusCode":{"type":"integer"},"contentType":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"language":{"type":"string"},"renderedWith":{"type":"string"},"format":{"type":"string"},"content":{"type":"string"},"chars":{"type":"integer"},"tokensEstimate":{"type":"integer"},"truncated":{"type":"boolean"},"startIndex":{"type":"integer","description":"Present when startIndex was supplied."},"nextStartIndex":{"type":["integer","null"],"description":"Next offset, or null when this was the final chunk. Present when startIndex was supplied."},"totalChars":{"type":"integer","description":"Full converted content length before chunking. Present when startIndex was supplied."}}},"example":{"success":true,"url":"https://docs.python.org/3/tutorial/venv.html","finalUrl":"https://docs.python.org/3/tutorial/venv.html","statusCode":200,"contentType":"text/html","title":"12. Virtual Environments and Packages — Python 3.14.7 documentation","description":"Introduction: Python applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the ...","language":"en","renderedWith":"http","format":"markdown","content":"---\ntitle: 12. Virtual Environments and Packages\ndescription: Introduction: Python applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the ...\nimage: https://docs.python.org/3.14/_images/social_previews/summary_tutorial_venv_56f836f1.png\n---\n\n \n\n# 12\\. Virtual Environments and Packages[¶](#virtual-environments-and-packages \"Link to this heading\")\n\n## 12.1\\. Introduction[¶](#introduction \"Link to this heading\")\n\nPython applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the application may require that a particular bug has been fixed or the application may be written using an obsolete version of the library’s interface.\n\nThis means it may not be possible for one Python installation to meet the requirements of every application. If application A needs version 1.0 of a particular module but application B needs version 2.0, then the requirements are in conflict and installing either version 1.0 or 2.0 will leave one application unable to run.\n\nThe so","chars":1200,"tokensEstimate":300,"truncated":true}}}},"400":{"description":"Invalid parameter (`invalid_request`) or a private/local target (`url_not_allowed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"url_not_allowed","message":"private, local and reserved hosts are not allowed"}}}}},"413":{"description":"Request body or target document too large (`too_large`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The target site refused (`target_blocked`), could not be reached or its domain does not resolve (`target_unreachable`), the page does not exist (`target_error`, HTTP 404/410), or returned unsupported content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"target_blocked","message":"The target refused the request: target returned HTTP 403","details":{"targetStatus":403,"finalUrl":"https://www.g2.com/"}}}}}},"502":{"description":"Temporary failure on our side (`upstream_error`); safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"The target did not respond in time (`timeout`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"markdown","summary":"Convert a URL to Markdown or text","description":"Fetches the page (or document) and returns its main content as Markdown (default) or plain text, with a token estimate.\n\nThe same parameters as the GET form, sent as a JSON body.","tags":["Markdown"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Page URL. A bare domain such as `example.com` is accepted (https is assumed). Private, local and cloud-metadata addresses are refused."},"format":{"type":"string","default":"markdown","enum":["markdown","text"],"description":"Output format."},"render":{"type":"string","default":"auto","enum":["auto","never","always"],"description":"`auto` (default): plain HTTP first, a real Chrome browser only when the site blocks plain requests or needs JavaScript. `never`: HTTP only. `always`: browser only."},"removeBoilerplate":{"type":"boolean","default":true,"description":"Drop navigation, header, footer, aside and similar page chrome."},"cssSelector":{"type":"string","description":"Keep only the part of the page matching this CSS selector (e.g. `article`)."},"includeLinks":{"type":"boolean","default":false,"description":"Also return the absolute links found on the page (up to 1,000)."},"maxChars":{"type":"integer","default":200000,"minimum":100,"maximum":500000,"description":"Maximum characters in this chunk. Use `startIndex` or `nextStartIndex` to read the rest."},"startIndex":{"type":"integer","default":0,"minimum":0,"description":"Character offset in the full converted content. Send 0 to receive pagination metadata, then use `nextStartIndex` until it is null."},"timeoutMs":{"type":"integer","default":20000,"minimum":1000,"maximum":30000,"description":"Page-load timeout in milliseconds."}},"required":["url"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string"},"finalUrl":{"type":"string"},"statusCode":{"type":"integer"},"contentType":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"language":{"type":"string"},"renderedWith":{"type":"string"},"format":{"type":"string"},"content":{"type":"string"},"chars":{"type":"integer"},"tokensEstimate":{"type":"integer"},"truncated":{"type":"boolean"},"startIndex":{"type":"integer","description":"Present when startIndex was supplied."},"nextStartIndex":{"type":["integer","null"],"description":"Next offset, or null when this was the final chunk. Present when startIndex was supplied."},"totalChars":{"type":"integer","description":"Full converted content length before chunking. Present when startIndex was supplied."}}},"example":{"success":true,"url":"https://docs.python.org/3/tutorial/venv.html","finalUrl":"https://docs.python.org/3/tutorial/venv.html","statusCode":200,"contentType":"text/html","title":"12. Virtual Environments and Packages — Python 3.14.7 documentation","description":"Introduction: Python applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the ...","language":"en","renderedWith":"http","format":"markdown","content":"---\ntitle: 12. Virtual Environments and Packages\ndescription: Introduction: Python applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the ...\nimage: https://docs.python.org/3.14/_images/social_previews/summary_tutorial_venv_56f836f1.png\n---\n\n \n\n# 12\\. Virtual Environments and Packages[¶](#virtual-environments-and-packages \"Link to this heading\")\n\n## 12.1\\. Introduction[¶](#introduction \"Link to this heading\")\n\nPython applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the application may require that a particular bug has been fixed or the application may be written using an obsolete version of the library’s interface.\n\nThis means it may not be possible for one Python installation to meet the requirements of every application. If application A needs version 1.0 of a particular module but application B needs version 2.0, then the requirements are in conflict and installing either version 1.0 or 2.0 will leave one application unable to run.\n\nThe so","chars":1200,"tokensEstimate":300,"truncated":true}}}},"400":{"description":"Invalid parameter (`invalid_request`) or a private/local target (`url_not_allowed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"url_not_allowed","message":"private, local and reserved hosts are not allowed"}}}}},"413":{"description":"Request body or target document too large (`too_large`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The target site refused (`target_blocked`), could not be reached or its domain does not resolve (`target_unreachable`), the page does not exist (`target_error`, HTTP 404/410), or returned unsupported content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"target_blocked","message":"The target refused the request: target returned HTTP 403","details":{"targetStatus":403,"finalUrl":"https://www.g2.com/"}}}}}},"502":{"description":"Temporary failure on our side (`upstream_error`); safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"The target did not respond in time (`timeout`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/summarize":{"get":{"operationId":"summarizeGet","summary":"Summarize a URL or text with AI (GET)","description":"Summarizes a web page (`url`) or your own `text` (up to 100,000 characters) with Llama 3.3 70B. Statements are grounded in the source text only.","tags":["Markdown"],"parameters":[{"name":"url","schema":{"type":"string"},"description":"Page to summarize (or send `text`).","required":false,"example":"https://en.wikipedia.org/wiki/Web_scraping","in":"query"},{"name":"text","schema":{"type":"string"},"description":"Text to summarize instead of a URL (max 100,000 characters).","required":false,"in":"query"},{"name":"style","schema":{"type":"string","default":"paragraph","enum":["one-line","paragraph","bullets"]},"description":"Summary shape.","required":false,"in":"query"},{"name":"maxWords","schema":{"type":"integer","default":80,"minimum":10,"maximum":300},"description":"Approximate summary length.","required":false,"in":"query"},{"name":"language","schema":{"type":"string"},"description":"Write the summary in this language (e.g. `Spanish`, `Traditional Chinese`). Default: the source language.","required":false,"in":"query"},{"name":"focus","schema":{"type":"string"},"description":"What the summary should focus on (e.g. `pricing and limits`).","required":false,"in":"query"},{"name":"render","schema":{"type":"string","default":"auto","enum":["auto","never","always"]},"description":"`auto` (default): plain HTTP first, a real Chrome browser only when the site blocks plain requests or needs JavaScript. `never`: HTTP only. `always`: browser only.","required":false,"in":"query"},{"name":"timeoutMs","schema":{"type":"integer","default":20000,"minimum":1000,"maximum":30000},"description":"Page-load timeout in milliseconds.","required":false,"in":"query"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string"},"finalUrl":{"type":"string"},"title":{"type":"string"},"renderedWith":{"type":"string"},"style":{"type":"string"},"language":{"type":"string"},"summary":{"type":"string"},"sourceChars":{"type":"integer"},"truncated":{"type":"boolean"}}},"example":{"success":true,"url":"https://en.wikipedia.org/wiki/Web_scraping","finalUrl":"https://en.wikipedia.org/wiki/Web_scraping","title":"Web scraping - Wikipedia","renderedWith":"http","style":"bullets","language":"same as source","summary":"- Web scraping is a form of data scraping used for extracting data from websites.\n- Web scraping software may directly access the World Wide Web using the Hypertext Transfer Protocol or a web browser.\n- The legality of web scraping varies across the world and may be against the terms of service of some websites.\n- In the United States, website owners can use legal claims such as copyright infringement and trespass to chattel to prevent undesired web scraping.\n- The US courts have acknowledged that users of scrapers or robots may be held liable for committing trespass to chattels.\n- The European Union has its own laws and regulations regarding web scraping, with some countries having specific rules and guidelines.\n- The Danish Maritime and Commercial Court ruled in 2006 that web scraping was legal as long as the data was not copyrighted.","sourceChars":58109,"truncated":true}}}},"400":{"description":"Invalid parameter (`invalid_request`) or a private/local target (`url_not_allowed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"url_not_allowed","message":"private, local and reserved hosts are not allowed"}}}}},"413":{"description":"Request body or target document too large (`too_large`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The target site refused (`target_blocked`), could not be reached or its domain does not resolve (`target_unreachable`), the page does not exist (`target_error`, HTTP 404/410), or returned unsupported content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"target_blocked","message":"The target refused the request: target returned HTTP 403","details":{"targetStatus":403,"finalUrl":"https://www.g2.com/"}}}}}},"502":{"description":"Temporary failure on our side (`upstream_error`); safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"The target did not respond in time (`timeout`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"summarize","summary":"Summarize a URL or text with AI","description":"Summarizes a web page (`url`) or your own `text` (up to 100,000 characters) with Llama 3.3 70B. Statements are grounded in the source text only.\n\nThe same parameters as the GET form, sent as a JSON body.","tags":["Markdown"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Page to summarize (or send `text`)."},"text":{"type":"string","description":"Text to summarize instead of a URL (max 100,000 characters)."},"style":{"type":"string","default":"paragraph","enum":["one-line","paragraph","bullets"],"description":"Summary shape."},"maxWords":{"type":"integer","default":80,"minimum":10,"maximum":300,"description":"Approximate summary length."},"language":{"type":"string","description":"Write the summary in this language (e.g. `Spanish`, `Traditional Chinese`). Default: the source language."},"focus":{"type":"string","description":"What the summary should focus on (e.g. `pricing and limits`)."},"render":{"type":"string","default":"auto","enum":["auto","never","always"],"description":"`auto` (default): plain HTTP first, a real Chrome browser only when the site blocks plain requests or needs JavaScript. `never`: HTTP only. `always`: browser only."},"timeoutMs":{"type":"integer","default":20000,"minimum":1000,"maximum":30000,"description":"Page-load timeout in milliseconds."}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string"},"finalUrl":{"type":"string"},"title":{"type":"string"},"renderedWith":{"type":"string"},"style":{"type":"string"},"language":{"type":"string"},"summary":{"type":"string"},"sourceChars":{"type":"integer"},"truncated":{"type":"boolean"}}},"example":{"success":true,"url":"https://en.wikipedia.org/wiki/Web_scraping","finalUrl":"https://en.wikipedia.org/wiki/Web_scraping","title":"Web scraping - Wikipedia","renderedWith":"http","style":"bullets","language":"same as source","summary":"- Web scraping is a form of data scraping used for extracting data from websites.\n- Web scraping software may directly access the World Wide Web using the Hypertext Transfer Protocol or a web browser.\n- The legality of web scraping varies across the world and may be against the terms of service of some websites.\n- In the United States, website owners can use legal claims such as copyright infringement and trespass to chattel to prevent undesired web scraping.\n- The US courts have acknowledged that users of scrapers or robots may be held liable for committing trespass to chattels.\n- The European Union has its own laws and regulations regarding web scraping, with some countries having specific rules and guidelines.\n- The Danish Maritime and Commercial Court ruled in 2006 that web scraping was legal as long as the data was not copyrighted.","sourceChars":58109,"truncated":true}}}},"400":{"description":"Invalid parameter (`invalid_request`) or a private/local target (`url_not_allowed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"url_not_allowed","message":"private, local and reserved hosts are not allowed"}}}}},"413":{"description":"Request body or target document too large (`too_large`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The target site refused (`target_blocked`), could not be reached or its domain does not resolve (`target_unreachable`), the page does not exist (`target_error`, HTTP 404/410), or returned unsupported content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"target_blocked","message":"The target refused the request: target returned HTTP 403","details":{"targetStatus":403,"finalUrl":"https://www.g2.com/"}}}}}},"502":{"description":"Temporary failure on our side (`upstream_error`); safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"The target did not respond in time (`timeout`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["success","error"],"properties":{"success":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["not_configured","unauthorized","not_found","method_not_allowed","invalid_request","rate_limited","url_not_allowed","target_blocked","target_unreachable","target_error","unsupported_content","too_large","timeout","upstream_error","board_not_found","app_not_found"]},"message":{"type":"string"},"retryable":{"type":"boolean","description":"true for rate_limited, timeout, upstream_error and browser_busy; false for other errors."},"retryAfterSeconds":{"type":"integer","description":"Seconds to wait before retrying, when a numeric Retry-After header is present."},"details":{"type":"object","additionalProperties":true}}}}}}}}