Skip to content

Content conversion

Microlink can turn a URL into the format your downstream system needs. The same data rule model works for normal web pages and for PDF URLs:
  • use attr: 'markdown' when the consumer wants clean Markdown
  • use attr: 'html' when the consumer wants HTML markup
  • keep the default JSON response when an application needs metadata around the field
  • add embed when the API URL itself should return Markdown or HTML

Choose the guide

SourceOutputGuide
Any public URLMarkdownConvert any URL to Markdown
Any public URLHTMLConvert any URL to HTML
PDF URLMarkdownConvert a PDF URL to Markdown
PDF URLHTMLConvert a PDF URL to HTML

The shared pattern

The shortest useful request has three parts:
{
  url: 'https://example.com',
  data: {
    content: {
      attr: 'markdown'
    }
  },
  meta: false
}
Change the field name from content to anything your application expects. Change attr to switch the output format.

JSON or direct output

The default response is JSON:
{
  "status": "success",
  "data": {
    "content": "# Example Domain\n\nThis domain is for use..."
  }
}
When the converted field is the final response, set embed to that field name:
{
  url: 'https://example.com',
  data: {
    content: {
      attr: 'markdown'
    }
  },
  meta: false,
  embed: 'content'
}
That makes the API URL return the converted body directly instead of a JSON envelope.

When to use the deeper guides

These pages are direct conversion recipes. Use the broader guides when you need more control:
  • Markdown for scoping, frontmatter, and production Markdown delivery.
  • Data extraction for nested fields, collections, typed values, and browser-side evaluation.
  • Private pages for cookies, authorization headers, and server-side proxying.