Content conversion
Point url at anything and pick the output with attr. Documents are converted to an HTML DOM at fetch time, so the same rule reads a PDF or
.docx just like a web page.Supported source formats
| Type | Extension |
|---|---|
| Web page | html |
pdf | |
| Word document | docx |
| Spreadsheet | xlsx |
| Presentation | pptx |
| OpenDocument text | odt |
| Rich text | rtf |
| Ebook | epub |
| JSON endpoint | json |
Choose the output
| Output | attr | Guide |
|---|---|---|
| Plain text | text | URL to Text |
| Markdown | markdown | URL to Markdown |
| HTML | html | URL to HTML |
| Structured JSON | json | JSON endpoint to JSON |
Each guide shows the same recipe across a web page, a PDF, and an office document.
The shared pattern
{
url: 'https://example.com',
data: {
content: {
attr: 'markdown'
}
},
meta: false
}Rename
content to whatever your app expects, and switch attr to change the output. By default the field comes back inside a JSON envelope:{
"status": "success",
"data": {
"content": "# Example Domain\n\nThis domain is for use..."
}
}Add embed with the field name to return the converted body directly instead:
{
url: 'https://example.com',
data: {
content: {
attr: 'markdown'
}
},
meta: false,
embed: 'content'
}Go deeper
- Data extraction for selectors, scoping, nested fields, collections, typed values, and browser-side evaluation.
- Private pages for cookies, authorization headers, and server-side proxying.