View as Markdown
WebScraping.AI icon

WebScraping.AI ACTION

Ask Question about Webpage

Gets an answer to a question about a given webpage. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's WebScraping.AI account once, then configure and run Ask Question about Webpage from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "webscraping_ai-ask-question",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    webscraping_ai: { authProvisionId: "apn_xxxxxxx" },
    targetUrl: "Target URL",
    question: "Question",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Ask Question about Webpage inputs
Property Type Description
targetUrl Target URL string
The URL of the webpage to scrape.
Required
question Question string
The question to ask about the given webpage. E.g. What is the summary of this page content?
Required
headers Headers object
HTTP headers to pass to the target page
Optional
timeout Timeout integer
Maximum web page retrieval time in ms. Increase it in case of timeout errors (10000 by default, maximum is 30000).
Optional
js JS boolean
Execute on-page JavaScript using a headless browser (true by default)
Optional
jsTimeout JS Timeout integer
Maximum JavaScript rendering time in ms. Default: 2000
Optional
waitFor Wait For string
CSS selector to wait for before returning the page content. Useful for pages with dynamic content loading. Overrides js_timeout.
Optional
proxy Proxy string
Type of proxy, use residential proxies if your site restricts traffic from datacenters (datacenter by default). Note that residential proxy requests are more expensive than datacenter, see the pricing page for details.
Optional
country Country string
Country of the proxy to use (us by default)
Optional
customProxy Custom Proxy string
Your own proxy URL to use instead of our built-in proxy pool in "http://user:password@host:port" format (Smartproxy for example).
Optional
device Device string
Type of device emulation. Default is desktop
Optional
errorOn404 Error on 404 boolean
Return error on 404 HTTP status on the target page (false by default)
Optional
errorOnRedirect Error on Redirect boolean
Return error on redirect on the target page (false by default)
Optional
jsScript JS Script string
Custom JavaScript code to execute on the target page. Example: document.querySelector('button').click();
Optional
format Format string
Format of the response (text by default). json will return a JSON object with the response, text will return a plain text/HTML response.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
webscraping_ai-ask-question
Version
0.0.2
App
WebScraping.AI
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes