Convert a web page or online file
convert_urlFetch a public URL and convert what it serves - a web page, or a PDF, Word, Excel, PowerPoint, notebook, subtitle or data file - to Markdown or another format. Use this when you have a link; if you already have the content, use convert (text) or convert_file (file bytes) instead, which skip the download.
Parameters:
url (required): an absolute http:// or https:// URL; surrounding whitespace is trimmed. Redirects are followed. Only public addresses are fetched: private, loopback and cloud-metadata addresses are refused, also after redirects. Responses over 20 MB, or slower than 15 seconds, fail. There is no source_format parameter: the format is taken from the first of (1) the final URL's file extension (.pdf, .docx, .xlsx, ...), (2) the Content-Type header (PDF, Office or text/html), (3) the content itself, detected like convert with source_format auto. A link to a viewer page (e.g. a GitHub file page) is HTML; link to the raw file to convert the file itself.
target_format (default markdown): web pages (HTML) allow only markdown and text; files allow the same targets as in convert_file, and content-detected data (JSON, YAML, CSV) the same as in convert. An unsupported pair returns an error that names both formats.
pretty_json (default false): only relevant for target_format json, and currently has no effect - JSON output is always indented with two spaces. Ignored for other targets.
Pages that need a login or render their content with JavaScript may convert to little or nothing. Returns the converted content as text; excel and docx output is returned as an embedded resource. Read-only: the page is not stored. Requires a slim-down API key or OAuth token; rate-limited per account (default 60 calls per minute).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "convert_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http or https URL of a publicly reachable page or file, e.g. https://example.com/article. Pages behind a login, and private or local network addresses, cannot be fetched. | |
| pretty_json | No | Only meaningful when target_format is json. JSON output is always indented with two spaces, so true and false (default) currently give the same result; it is accepted for compatibility with the REST API. Ignored for every other target. | |
| target_format | No | Format to convert to. Default markdown. Allowed values depend on the detected source format: web pages allow only markdown and text; files follow the convert_file list. excel and docx come back as an embedded binary resource, all others as text. |