@pipedream/dataforseo
Version:
Pipedream DataForSEO Components
45 lines (43 loc) • 1.07 kB
JavaScript
import dataforseo from "../../dataforseo.app.mjs";
export default {
key: "dataforseo-get-ranked-keywords",
name: "Get Ranked Keywords",
description: "Description for get-ranked-keywords. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_site/task_post/?bash)",
version: "0.0.2",
type: "action",
props: {
dataforseo,
locationCode: {
propDefinition: [
dataforseo,
"locationCode",
],
},
targetType: {
propDefinition: [
dataforseo,
"targetType",
],
},
target: {
propDefinition: [
dataforseo,
"target",
],
},
},
async run({ $ }) {
const response = await this.dataforseo.getRankedKeywords({
$,
data: [
{
location_code: this.locationCode,
target_type: this.targetType,
target: this.target,
},
],
});
$.export("$summary", `Successfully sent the request. Status: ${response.tasks[0].status_message}`);
return response;
},
};