import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
harpa_ai: {
type: "app",
app: "harpa_ai",
}
},
async run({steps, $}) {
const data = {
"action": "scrape",
"url": "https://harpa.ai/blog",
"grab": [{"selector":".PostList__postTitle","at":"all","label":"data"}],
"node": "4wwg"
}
return await axios($, {
method: "post",
url: `https://api.harpa.ai/api/v1/grid`,
headers: {
Authorization: `Bearer ${this.harpa_ai.$auth.api_key}`,
"content-type": `application/json`,
},
data,
})
},
})
HARPA AI uses API keys for authentication. When you connect your HARPA AI account, Pipedream securely stores the keys so you can easily authenticate to HARPA AI APIs in both code and no-code steps.