intelligent-utilities/html-to-markdown-or-text

Convert HTML to plain text or markdown, optionally keep links

Public
4 runs

Run intelligent-utilities/html-to-markdown-or-text with an API

Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.

Input schema

The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.

Field Type Default value Description
html
string
HTML to strip
keep_links
boolean
False
Append (URL) after link text
base_url
string
Optional base URL for resolving relative links
to_markdown
boolean
False
Convert HTML to Markdown instead of plain text

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{
  "type": "string",
  "title": "Output"
}
Example API response
View prediction
('# Welcome to My Website\n'
 '\n'
 '## Home Section\n'
 '\n'
 'This is a sample paragraph with some text content.\n'
 '\n'
 '### Featured Article\n'
 '\n'
 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod '
 'tempor incididunt ut labore et dolore magna aliqua.\n'
 '\n'
 'Read More\n'
 '\n'
 '---\n'
 '\n'
 '## About Us\n'
 '\n'
 '![Company photo](placeholder.jpg)\n'
 '\n'
 'We are a company dedicated to creating amazing web experiences.\n'
 '\n'
 '- Quality service\n'
 '- Customer satisfaction\n'
 '- Innovation\n'
 '\n'
 '---\n'
 '\n'
 '## Contact Form\n'
 '\n'
 'Name:\n'
 '[text input]\n'
 '\n'
 'Email:\n'
 '[email input]\n'
 '\n'
 'Message:\n'
 '[textarea]\n'
 '\n'
 '[Send Message]\n'
 '\n'
 '---\n'
 '\n'
 '© 2024 My Website. All rights reserved.')