import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
webscrape_ai: {
type: "app",
app: "webscrape_ai",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.webscrapeai.com/scrapeWebSite`,
params: {
url: `https://news.ycombinator.com/`,
command: `I want to extract all the news details`,
apiKey: `${this.webscrape_ai.$auth.api_key}`,
schema: `{"author":"string","comments_count":"integer","points":"integer","posted_time":"string","title":"string","url":"url"}`,
},
})
},
})
Webscrape AI uses API keys for authentication. When you connect your Webscrape AI account, Pipedream securely stores the keys so you can easily authenticate to Webscrape AI APIs in both code and no-code steps.