{"uid":"cap_7MlZXTpbEUdHeMW-ynOW9","slug":"css-selector-scraper-js-rendered-pages-96883bb0","name":"CSS Selector Scraper (JS-Rendered Pages)","description":"Extract specific elements from a JavaScript-rendered page by CSS selector. Give a list of selectors (e.g. 'h1', '.price', 'a.product') and get back the text and attributes of every match. Backed by a headless browser, so it works on SPAs and JS-heavy pages.","url":"https://api.agishub.com/v1/scrape","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"enum":["http"],"type":"string"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["url","selectors"],"properties":{"url":{"type":"string","format":"uri","description":"Full http/https URL of the page to scrape."},"selectors":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20,"minItems":1,"description":"CSS selectors to extract, e.g. ['h1', 'a.product', '.price']. Returns the text and attributes of every match per selector."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"enum":["json"],"type":"string"},"example":{"type":"object"}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"result":"Extract specific elements from a JavaScript-rendered page by CSS selector. Give a list of selectors (e.g. 'h1', '.price'"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yTIuyjGFKc3Mk6ARX21lJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts text and attributes of elements matching CSS selectors from a JavaScript-rendered web page using a headless browser.","exampleAgentPrompt":"Scrape the page at https://example.com/products using a headless browser and extract the text and attributes of all elements matching 'h1', '.price', and 'a.product'.","exampleUseCases":[{"title":"E-commerce price monitoring","prompt":"Go to https://shop.example.com/sneakers and pull the text of every element matching '.product-name' and '.price' — I want to see all product names and their prices from that JS-rendered page."},{"title":"SPA article headline extraction","prompt":"Can you scrape https://news.example.com using a headless browser and extract the text of all elements matching 'h2.article-title' and 'span.author' for me?"},{"title":"Lead generation link harvesting","prompt":"Fetch the rendered HTML from https://directory.example.com/companies and extract all elements matching 'a.company-link' — I need the href attributes and link text for every match on the page."}],"resultDescription":"A JSON object containing, for each provided CSS selector, a list of matched DOM elements with their inner text content and HTML attributes (e.g. href, src, class). Returns all matches found on the fully JavaScript-rendered page.","failureModes":["URL unreachable or returns non-200 status — empty results or error response","No elements match the given selectors — empty match list returned","Page requires authentication — scraped content may be login wall instead of target content","Selectors array exceeds maximum of 20 items — request rejected","Headless browser timeout on very slow or complex pages — partial or no results","Invalid CSS selector syntax — error or zero matches returned"],"whenToPreferThis":"Choose this endpoint when the target page relies on JavaScript to render its content (SPAs, React/Vue/Angular apps) and static HTML scraping would fail. It is ideal when you need to extract specific, named elements by CSS class, tag, or attribute rather than the full page body. Prefer it over full-page scrapers when you only need a targeted subset of DOM elements and want structured per-selector results.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:57:35.558Z","isFirstParty":false}