HTML to Markdown
Convert HTML content to Markdown format.
Endpoint
POST https://www.acrewity.com/api/services/execute
Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
n8n Integration
This service is also available via our n8n community node: @acrewity/n8n-nodes-acrewity
Operations
Convert HTML to Markdown
Convert HTML content to Markdown with table, image, and code block preservation
Operation ID: convert
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
content |
string | Yes | - | HTML content to convert |
heading_style |
string | No | atx |
Heading style Options: atx, setext |
code_block_style |
string | No | fenced |
Code block style Options: fenced, indented |
bullet_list_marker |
string | No | - |
Bullet list marker character Options: -, +, * |
link_style |
string | No | inlined |
Link formatting style Options: inlined, referenced |
extract_images |
boolean | No | false |
Extract image information from the HTML |
Example Request
{
"service": "html-to-markdown",
"operation": "convert",
"parameters": {
"content": "<h1>Product Update</h1><p>We're excited to announce <strong>version 2.0</strong> with:</p><ul><li>Improved performance</li><li>New dashboard</li><li>API v2 support</li></ul><table><tr><th>Feature</th><th>Status</th></tr><tr><td>Dark Mode</td><td>Available</td></tr><tr><td>Mobile App</td><td>Coming Soon</td></tr></table>",
"heading_style": "atx",
"link_style": "inlined"
}
}
Example Response
{
"success": true,
"result": {
"data": {
"markdown": "# Product Update\n\nWe're excited to announce **version 2.0** with:\n\n- Improved performance\n- New dashboard\n- API v2 support\n\n| Feature | Status |\n|---------|--------|\n| Dark Mode | Available |\n| Mobile App | Coming Soon |"
}
},
"credits_used": 1
}
Convert HTML Fragment
Convert an HTML fragment to Markdown without full document processing
Operation ID: fragment
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
content |
string | Yes | - | HTML fragment to convert |
Example Request
{
"service": "html-to-markdown",
"operation": "fragment",
"parameters": {
"content": "<p>Contact us at <a href=\"mailto:support@example.com\">support@example.com</a> or visit our <a href=\"https://docs.example.com\">documentation</a>.</p>"
}
}
Example Response
{
"success": true,
"result": {
"data": {
"markdown": "Contact us at [support@example.com](mailto:support@example.com) or visit our [documentation](https://docs.example.com)."
}
},
"credits_used": 1
}
More Examples
See Data Transformation Examples for complete workflow examples including WYSIWYG editor integration and content migration.