extract-html-fragment
Extract specific HTML content from a webpage by providing a URL and CSS selector. Ideal for retrieving targeted web elements for data processing or integration.
Instructions
Extract a specific HTML fragment from a webpage using CSS selectors
Input Schema
Name | Required | Description | Default |
---|---|---|---|
anchorId | No | Optional anchor ID to locate a specific fragment | |
body | No | Request body for POST requests | |
followRedirects | No | Whether to follow redirects | |
fragmentSelector | No | CSS selector for the HTML fragment to extract (when responseType is html-fragment) | |
headers | No | HTTP headers | |
method | No | HTTP method | GET |
selector | Yes | CSS selector for the HTML fragment to extract | |
timeout | No | Request timeout in milliseconds | |
url | Yes | URL to fetch |
Input Schema (JSON Schema)
{
"properties": {
"anchorId": {
"description": "Optional anchor ID to locate a specific fragment",
"type": "string"
},
"body": {
"description": "Request body for POST requests",
"type": "string"
},
"followRedirects": {
"default": true,
"description": "Whether to follow redirects",
"type": "boolean"
},
"fragmentSelector": {
"description": "CSS selector for the HTML fragment to extract (when responseType is html-fragment)",
"type": "string"
},
"headers": {
"additionalProperties": {
"type": "string"
},
"description": "HTTP headers",
"type": "object"
},
"method": {
"default": "GET",
"description": "HTTP method",
"enum": [
"GET",
"POST"
],
"type": "string"
},
"selector": {
"description": "CSS selector for the HTML fragment to extract",
"type": "string"
},
"timeout": {
"description": "Request timeout in milliseconds",
"type": "number"
},
"url": {
"description": "URL to fetch",
"type": "string"
}
},
"required": [
"url",
"selector"
],
"type": "object"
}