Operations (sample payloads)
Main operations
Selector
Execute a jQuery style selector on the HTML dom and return certain attributes/properties of the elements in question Sample Input
{
"html_content": "<html><body><div class='container'><h1 id='title'>Welcome to My Website</h1><p class='content'>This is a sample paragraph.</p><a href='https://example.com' class='link'>Click here</a></div></body></html>",
"query_selector": "div.container",
"return_properties": \{
"attributes": [
"id",
"class"
],
"element_properties": [
"tagName",
"innerHTML"
],
"classes": true,
"html_content": true
\}
}
Sample Output
{
"elements": [
{
"tag": "div",
"attributes": {
"class": "container"
},
"properties": \{
"tagName": "DIV",
"innerHTML": "<h1 id='title'>Welcome to My Website</h1><p class='content'>This is a sample paragraph.</p><a href='https://example.com' class='link'>Click here</a>"
\},
"classes": [
"container"
],
"html": "<h1 id='title'>Welcome to My Website</h1><p class='content'>This is a sample paragraph.</p><a href='https://example.com' class='link'>Click here</a>"
}
]
}