- EXTRACT
- FILTER
- PROCESS
- REVIEW
Short answer
How can I get image or video URLs from a webpage using AI?
You tell your AI which HTML container holds the media you want, and it uses the query_dom tool to find and extract the source URLs. You'll get a clean list of links ready for your next step.
The results you get.
Where your media links land.
The AI handles the document navigation so you don't have to.
EXTRACT
Clean URL lists
The AI finds the exact source attributes for images and videos. You get direct links instead of messy HTML code.
FILTER
Targeted selection
The AI ignores the rest of the page junk. It only pulls media from the specific divs or classes you name.
PROCESS
Ready for automation
The extracted links are formatted for immediate use. You can feed them directly into a downloader or a media processor.
REVIEW
Human verification
The AI presents the found URLs to you first. You decide which ones are valid before moving them into your production pipeline.
The workflow
What your AI does when the HTML arrives.
The AI acts as a surgical tool for the document tree.
Locate containers
Your AI identifies the specific HTML elements or CSS selectors you've pointed out.
query_domIsolate attributes
The AI looks inside those containers to find the source attributes.
query_domFilter media types
The AI separates image links from video links based on your instructions.
query_domFormat output
The AI organizes the raw strings into a structured list for your use.
query_dom
Try it
Copy these to start.
Use these prompts to kick off the scraping process.
Starting points
Swap out the website URL and the specific CSS class or ID you want to target.
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"
}
}
}Scrape all image URLs from the div with class 'product-gallery' on https://example.com/item
Find all video source URLs inside the main content container on https://example.com/video-feed
Look for any img tags inside the 'sidebar-ads' section of https://example.com/home and give me the links
Extract the src attribute from all video elements within the #media-player div on https://example.com/watch
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect HTML DOM Query Engine once, then ask.
One click connects this MCP to your preferred client. Your credentials stay encrypted and the setup is handled on our end.
Connect HTML DOM Query Engine to your AIFAQ
How this task behaves.
- 01
Can the AI click buttons to reveal more images?
No. This MCP reads the existing HTML structure provided to it; it does not interact with or click elements on a live page.
- 02
Will it download the files for me?
No. The AI extracts the URLs. You are responsible for downloading or processing the actual media files using those links.
- 03
Can I target specific CSS selectors?
Yes. You can tell the AI to look for specific classes, IDs, or tag structures within the DOM.
- 04
Does it work on sites that require a login?
The AI can only see the HTML that is currently accessible to the client session it is running in.
- 05
Can the AI change the website's content?
No. This tool is read-only. It can only query and retrieve data from the HTML.
More questions about HTML DOM Query Engine? See everything the HTML DOM Query Engine Connector can do
Connect Cheerio DOM to Claude, Cursor, ChatGPT & more
