- CLEAN DATA
- ATTR DATA
- CONTEXT
- HUMAN
Short answer
How can I pull specific data from a website without bloating my AI's context?
You use CSS selectors to target only the specific HTML elements you want. This allows your agent to grab precise text or attributes while ignoring the rest of the page's noise. You'll see how this keeps your conversations efficient below.
The results you get
Precise data extraction
The agent filters the web to find exactly what you're looking for.
CLEAN DATA
Targeted text extraction
The agent pulls specific strings from the DOM. You get clean values instead of messy, raw HTML blocks.
ATTR DATA
Grab element attributes
Your AI can pull links, image sources, or IDs. This is perfect for building lists of URLs or media assets.
CONTEXT
Reduced token usage
Because the agent only reads the requested elements, it doesn't waste space on headers, footers, or ads. This keeps your context window open for longer.
HUMAN
Manual selector verification
If a selector fails or returns nothing, you'll need to inspect the page yourself to find the correct CSS path.
The workflow
What your AI does when a URL is provided.
The agent acts as a surgical tool for web scraping.
Identify targets
You tell your agent which CSS selectors to look for, such as a specific class or ID.
query_domExecute query
The agent runs the selector against the page's DOM to isolate the requested nodes.
query_domFilter content
The agent strips away the surrounding HTML tags to leave only the raw text or attribute values.
query_domFormat results
The agent organizes the extracted data into a structure you can actually use in your chat.
query_dom
Try it
Copy these to start.
Use these prompts to begin extracting data immediately.
Starting points
Replace the bracketed text with your specific CSS selectors or target elements.
Cheerio DOM Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_yforvmpWi3y9TqnYhrCHzOXtUdI6qMtPsOkV6gLr/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — Cheerio DOM capabilities are ready to use.
{
"mcpServers": {
"html-dom-query-engine-mcp": {
"url": "https://edge.vinkius.com/vk_preview_yforvmpWi3y9TqnYhrCHzOXtUdI6qMtPsOkV6gLr/mcp"
}
}
}Use the HTML DOM Query Engine to get the text from all 'h2' elements on https://example.com/news.
Find the 'href' attribute for every link inside the '.product-grid' class on this page: https://store.com/items.
Extract the inner text of the element with ID 'price-tag' from https://retailer.com/product/123.
List the 'src' attributes for all images found within the 'article-body' div on https://blog.com/post/1.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect HTML DOM Query Engine once, then ask.
Click the link to connect. Your credentials stay encrypted, and you can start querying any site through your preferred AI client.
Connect HTML DOM Query Engine to your AIFAQ
How this task behaves
- 01
Can the AI click buttons or fill out forms?
No. This MCP is designed for reading and querying existing DOM elements, not for interacting with or navigating through web pages.
- 02
What happens if the CSS selector is wrong?
The agent will return an empty result or an error. You'll need to provide a valid selector for the tool to find anything.
- 03
Does the AI see the whole webpage?
The agent uses the tool to look at specific parts of the page you request. It doesn't ingest the entire HTML file into its memory unless you ask it to.
- 04
Can it scrape data from sites that require a login?
No. The tool queries the DOM of the page as it is currently accessible to the agent. It cannot bypass authentication or log in to accounts.
- 05
Can the AI change the website's content?
No. This tool is read-only. It can only extract information from the HTML; it cannot modify, delete, or upload anything to the web.
More questions about HTML DOM Query Engine? The Connector page answers them. See everything the HTML DOM Query Engine Connector can do
Connect Cheerio DOM to Claude, Cursor, ChatGPT & more
