Skip to content

Commit 3463db1

Browse files
authored
DataForSEO new components (#18095)
* new components * pnpm-lock.yaml * versions * updates * updates * update * pnpm-lock.yaml * pnpm-lock.yaml * updates
1 parent bd527ae commit 3463db1

File tree

58 files changed

+2531
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2531
-43
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import dataforseo from "../../dataforseo.app.mjs";
2+
import { ConfigurationError } from "@pipedream/platform";
3+
import { parseArray } from "../../common/utils.mjs";
4+
5+
export default {
6+
key: "dataforseo-get-app-intersection",
7+
name: "Get App Intersection",
8+
description: "Compare keyword overlap between mobile apps to find shared ranking opportunities. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/app_intersection/live/?bash)",
9+
version: "0.0.1",
10+
type: "action",
11+
props: {
12+
dataforseo,
13+
appIds: {
14+
type: "string[]",
15+
label: "App IDs",
16+
description: "Package names (IDs) of target Android apps on Google Play; you can find the package name in the app page URL (e.g., com.example.app)",
17+
},
18+
locationCode: {
19+
propDefinition: [
20+
dataforseo,
21+
"locationCode",
22+
],
23+
},
24+
languageCode: {
25+
propDefinition: [
26+
dataforseo,
27+
"languageCode",
28+
],
29+
},
30+
limit: {
31+
propDefinition: [
32+
dataforseo,
33+
"limit",
34+
],
35+
},
36+
},
37+
async run({ $ }) {
38+
const appIds = {};
39+
const parsedAppIds = parseArray(this.appIds);
40+
41+
for (let i = 0; i < parsedAppIds.length; i++) {
42+
appIds[`${i + 1}`] = parsedAppIds[i];
43+
}
44+
45+
const response = await this.dataforseo.getAppIntersection({
46+
$,
47+
debug: true,
48+
data: [
49+
{
50+
app_ids: appIds,
51+
location_code: this.locationCode,
52+
language_code: this.languageCode,
53+
limit: this.limit,
54+
},
55+
],
56+
});
57+
58+
if (response.status_code !== 20000) {
59+
throw new ConfigurationError(`Error: ${response.status_message}`);
60+
}
61+
62+
if (response.tasks[0].status_code !== 20000) {
63+
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`);
64+
}
65+
66+
$.export("$summary", "Successfully retrieved app intersection.");
67+
return response;
68+
},
69+
};
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import dataforseo from "../../dataforseo.app.mjs";
2+
import { ConfigurationError } from "@pipedream/platform";
3+
4+
export default {
5+
key: "dataforseo-get-app-reviews-summary",
6+
name: "Get App Reviews Summary",
7+
description: "Get app reviews and ratings summary for mobile app reputation analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/apple/app_reviews/task_post/?bash)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
dataforseo,
12+
appId: {
13+
type: "string",
14+
label: "App ID",
15+
description: "The ID of the mobile application on App Store. Yyou can find the ID in the URL of every app listed on App Store. Example: in the URL https://apps.apple.com/us/app/id835599320, the id is `835599320`",
16+
},
17+
locationCode: {
18+
propDefinition: [
19+
dataforseo,
20+
"locationCode",
21+
],
22+
},
23+
languageCode: {
24+
propDefinition: [
25+
dataforseo,
26+
"languageCode",
27+
],
28+
},
29+
sortBy: {
30+
type: "string",
31+
label: "Sort By",
32+
description: "Sort reviews by specific criteria",
33+
options: [
34+
"most_recent",
35+
"most_helpful",
36+
],
37+
optional: true,
38+
},
39+
},
40+
async run({ $ }) {
41+
const response = await this.dataforseo.getAppReviewsSummary({
42+
$,
43+
data: [
44+
{
45+
app_id: this.appId,
46+
location_code: this.locationCode,
47+
language_code: this.languageCode,
48+
sort_by: this.sortBy,
49+
},
50+
],
51+
});
52+
53+
if (response.status_code !== 20000) {
54+
throw new ConfigurationError(`Error: ${response.status_message}`);
55+
}
56+
57+
if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) {
58+
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`);
59+
}
60+
61+
$.export("$summary", `Successfully retrieved app reviews summary for "${this.appId}".`);
62+
return response;
63+
},
64+
};
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import dataforseo from "../../dataforseo.app.mjs";
2+
import { ConfigurationError } from "@pipedream/platform";
3+
4+
export default {
5+
key: "dataforseo-get-app-store-search",
6+
name: "Get App Store Search",
7+
description: "Search iOS App Store apps by keywords for app store optimization (ASO) analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/apple/app_searches/task_post/?bash)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
dataforseo,
12+
keyword: {
13+
type: "string",
14+
label: "Keyword",
15+
description: "The keyword to search for",
16+
},
17+
locationCode: {
18+
propDefinition: [
19+
dataforseo,
20+
"locationCode",
21+
],
22+
},
23+
languageCode: {
24+
propDefinition: [
25+
dataforseo,
26+
"languageCode",
27+
],
28+
},
29+
waitForResults: {
30+
type: "boolean",
31+
label: "Wait for Results",
32+
description: "Wait for the results to be available. Not for use with Pipedream Connect.",
33+
default: true,
34+
optional: true,
35+
},
36+
postbackUrl: {
37+
type: "string",
38+
label: "Postback URL",
39+
description: "The URL to receive the search results. Only applicable when \"Wait for Results\" = `FALSE`",
40+
optional: true,
41+
},
42+
},
43+
async run({ $ }) {
44+
let response;
45+
const context = $.context;
46+
const run = context
47+
? context.run
48+
: {
49+
runs: 1,
50+
};
51+
52+
if (run.runs === 1) {
53+
let postbackUrl = this.postbackUrl;
54+
if (context && this.waitForResults) {
55+
({ resume_url: postbackUrl } = $.flow.rerun(600000, null, 1));
56+
}
57+
response = await this.dataforseo.getAppStoreSearch({
58+
$,
59+
data: [
60+
{
61+
keyword: this.keyword,
62+
location_code: this.locationCode,
63+
language_code: this.languageCode,
64+
postback_url: postbackUrl,
65+
},
66+
],
67+
});
68+
69+
if (response.status_code !== 20000) {
70+
throw new ConfigurationError(`Error: ${response.status_message}`);
71+
}
72+
73+
if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) {
74+
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`);
75+
}
76+
}
77+
78+
if (run.runs > 1) {
79+
response = run.callback_request.body;
80+
}
81+
82+
$.export("$summary", `Successfully searched App Store for "${this.keyword}".`);
83+
return response;
84+
},
85+
};

components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Get Backlinks History",
66
description:
77
"Get historical backlinks data back to the beginning of 2019. [See the documentation](https://docs.dataforseo.com/v3/backlinks/history/live/)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
methods: {
1111
getBacklinksHistory(args = {}) {

components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "Get Backlinks Summary",
77
description:
88
"Get an overview of backlinks data available for a given domain, subdomain, or webpage. [See the documentation](https://docs.dataforseo.com/v3/backlinks/summary/live/)",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
type: "action",
1111
methods: {
1212
getBacklinksSummary(args = {}) {

components/dataforseo/actions/get-backlinks/get-backlinks.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "Get Backlinks",
77
description:
88
"Get a list of backlinks and relevant data for a given domain, subdomain, or webpage. [See the documentation](https://docs.dataforseo.com/v3/backlinks/backlinks/live/)",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
type: "action",
1111
methods: {
1212
getBacklinks(args = {}) {
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import dataforseo from "../../dataforseo.app.mjs";
2+
import { ConfigurationError } from "@pipedream/platform";
3+
4+
export default {
5+
key: "dataforseo-get-bing-organic-results",
6+
name: "Get Bing Organic Results",
7+
description: "Retrieve Bing organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/bing/organic/live/regular/?bash)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
dataforseo,
12+
keyword: {
13+
type: "string",
14+
label: "Keyword",
15+
description: "The keyword to search for",
16+
},
17+
locationCode: {
18+
propDefinition: [
19+
dataforseo,
20+
"locationCode",
21+
],
22+
},
23+
languageCode: {
24+
propDefinition: [
25+
dataforseo,
26+
"languageCode",
27+
],
28+
},
29+
depth: {
30+
type: "integer",
31+
label: "Depth",
32+
description: "The parsing depth. Default: 100",
33+
max: 700,
34+
optional: true,
35+
},
36+
maxCrawlPages: {
37+
type: "integer",
38+
label: "Max Crawl Pages",
39+
description: "The page crawl limit",
40+
max: 100,
41+
optional: true,
42+
},
43+
},
44+
async run({ $ }) {
45+
const response = await this.dataforseo.getBingOrganicResults({
46+
$,
47+
data: [
48+
{
49+
keyword: this.keyword,
50+
location_code: this.locationCode,
51+
language_code: this.languageCode,
52+
depth: this.depth,
53+
max_crawl_pages: this.maxCrawlPages,
54+
},
55+
],
56+
});
57+
58+
if (response.status_code !== 20000) {
59+
throw new ConfigurationError(`Error: ${response.status_message}`);
60+
}
61+
62+
if (response.tasks[0].status_code !== 20000) {
63+
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`);
64+
}
65+
66+
$.export("$summary", `Successfully retrieved Bing organic results for "${this.keyword}".`);
67+
return response;
68+
},
69+
};

components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Get Bulk Backlinks",
66
description:
77
"Get the number of backlinks pointing to specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_backlinks/live/)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
methods: {
1111
getBulkBacklinks(args = {}) {

components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Get Bulk Ranks",
66
description:
77
"Get rank scores of specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_ranks/live/)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
methods: {
1111
getBacklinksBulkRanks(args = {}) {

components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Get Bulk Referring Domains",
66
description:
77
"Get the number of referring domains pointing to the specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_referring_domains/live/)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
methods: {
1111
getBulkReferringDomains(args = {}) {

0 commit comments

Comments
 (0)