POST
web
html_extract
1 creditExtract text, links, meta tags, and headings from HTML content
Endpoint
POST /api/v1/tools/web/html_extract
Body Parameters
html
string
required
Example
input
Request
{
"html": "<html><head><title>Test</title><meta name='description' content='A test page'></head><body><h1>Hello</h1><p>World</p><a href='https://example.com'>Link</a></body></html>"
}
output
Response
{
"meta": {
"description": "A test page"
},
"text": "Test\nHello\nWorld\nLink",
"links": [
{
"href": "https://example.com",
"text": "Link"
}
],
"title": "Test",
"headings": [
{
"text": "Hello",
"level": 1
}
]
}
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": {
"meta": {
"description": "A test page"
},
"text": "Test\nHello\nWorld\nLink",
"links": [
{
"href": "https://example.com",
"text": "Link"
}
],
"title": "Test",
"headings": [
{
"text": "Hello",
"level": 1
}
]
},
"meta": {
"tool": "html_extract",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.