diff --git a/components/dataforseo/actions/get-app-intersection/get-app-intersection.mjs b/components/dataforseo/actions/get-app-intersection/get-app-intersection.mjs new file mode 100644 index 0000000000000..374a1086d130b --- /dev/null +++ b/components/dataforseo/actions/get-app-intersection/get-app-intersection.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; +import { parseArray } from "../../common/utils.mjs"; + +export default { + key: "dataforseo-get-app-intersection", + name: "Get App Intersection", + 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)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + appIds: { + type: "string[]", + label: "App IDs", + 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)", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const appIds = {}; + const parsedAppIds = parseArray(this.appIds); + + for (let i = 0; i < parsedAppIds.length; i++) { + appIds[`${i + 1}`] = parsedAppIds[i]; + } + + const response = await this.dataforseo.getAppIntersection({ + $, + debug: true, + data: [ + { + app_ids: appIds, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved app intersection."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-app-reviews-summary/get-app-reviews-summary.mjs b/components/dataforseo/actions/get-app-reviews-summary/get-app-reviews-summary.mjs new file mode 100644 index 0000000000000..1286194a3ee19 --- /dev/null +++ b/components/dataforseo/actions/get-app-reviews-summary/get-app-reviews-summary.mjs @@ -0,0 +1,64 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-app-reviews-summary", + name: "Get App Reviews Summary", + 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)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + appId: { + type: "string", + label: "App ID", + 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`", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + sortBy: { + type: "string", + label: "Sort By", + description: "Sort reviews by specific criteria", + options: [ + "most_recent", + "most_helpful", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getAppReviewsSummary({ + $, + data: [ + { + app_id: this.appId, + location_code: this.locationCode, + language_code: this.languageCode, + sort_by: this.sortBy, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved app reviews summary for "${this.appId}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-app-store-search/get-app-store-search.mjs b/components/dataforseo/actions/get-app-store-search/get-app-store-search.mjs new file mode 100644 index 0000000000000..40e99a17d12e0 --- /dev/null +++ b/components/dataforseo/actions/get-app-store-search/get-app-store-search.mjs @@ -0,0 +1,85 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-app-store-search", + name: "Get App Store Search", + 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)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + waitForResults: { + type: "boolean", + label: "Wait for Results", + description: "Wait for the results to be available. Not for use with Pipedream Connect.", + default: true, + optional: true, + }, + postbackUrl: { + type: "string", + label: "Postback URL", + description: "The URL to receive the search results. Only applicable when \"Wait for Results\" = `FALSE`", + optional: true, + }, + }, + async run({ $ }) { + let response; + const context = $.context; + const run = context + ? context.run + : { + runs: 1, + }; + + if (run.runs === 1) { + let postbackUrl = this.postbackUrl; + if (context && this.waitForResults) { + ({ resume_url: postbackUrl } = $.flow.rerun(600000, null, 1)); + } + response = await this.dataforseo.getAppStoreSearch({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + postback_url: postbackUrl, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + } + + if (run.runs > 1) { + response = run.callback_request.body; + } + + $.export("$summary", `Successfully searched App Store for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs b/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs index 1d3799d566e97..e0f3c87b1c760 100644 --- a/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs +++ b/components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs @@ -5,7 +5,7 @@ export default { name: "Get Backlinks History", description: "Get historical backlinks data back to the beginning of 2019. [See the documentation](https://docs.dataforseo.com/v3/backlinks/history/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinksHistory(args = {}) { diff --git a/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs b/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs index 9648d58170fd6..86045edd63625 100644 --- a/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs +++ b/components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs @@ -6,7 +6,7 @@ export default { name: "Get Backlinks Summary", description: "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/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinksSummary(args = {}) { diff --git a/components/dataforseo/actions/get-backlinks/get-backlinks.mjs b/components/dataforseo/actions/get-backlinks/get-backlinks.mjs index d2cc5879f8730..fa7e0ae44becd 100644 --- a/components/dataforseo/actions/get-backlinks/get-backlinks.mjs +++ b/components/dataforseo/actions/get-backlinks/get-backlinks.mjs @@ -6,7 +6,7 @@ export default { name: "Get Backlinks", description: "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/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinks(args = {}) { diff --git a/components/dataforseo/actions/get-bing-organic-results/get-bing-organic-results.mjs b/components/dataforseo/actions/get-bing-organic-results/get-bing-organic-results.mjs new file mode 100644 index 0000000000000..f4b051ac8dbce --- /dev/null +++ b/components/dataforseo/actions/get-bing-organic-results/get-bing-organic-results.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-bing-organic-results", + name: "Get Bing Organic Results", + description: "Retrieve Bing organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/bing/organic/live/regular/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + depth: { + type: "integer", + label: "Depth", + description: "The parsing depth. Default: 100", + max: 700, + optional: true, + }, + maxCrawlPages: { + type: "integer", + label: "Max Crawl Pages", + description: "The page crawl limit", + max: 100, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getBingOrganicResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + depth: this.depth, + max_crawl_pages: this.maxCrawlPages, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Bing organic results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs b/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs index c94c1c9d0b7d1..892647c9953f8 100644 --- a/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs +++ b/components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Backlinks", description: "Get the number of backlinks pointing to specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_backlinks/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBulkBacklinks(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs b/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs index 6b86621c249fc..f686cb90e6ea3 100644 --- a/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs +++ b/components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Ranks", description: "Get rank scores of specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_ranks/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBacklinksBulkRanks(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs b/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs index 8ab65b58f051e..324313c46c208 100644 --- a/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs +++ b/components/dataforseo/actions/get-bulk-referring-domains/get-bulk-referring-domains.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Referring Domains", description: "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/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBulkReferringDomains(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs b/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs index 08feabaec805b..01d665ed7b74c 100644 --- a/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs +++ b/components/dataforseo/actions/get-bulk-spam-score/get-bulk-spam-score.mjs @@ -5,7 +5,7 @@ export default { name: "Get Bulk Spam Score", description: "Get spam scores of the specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_spam_score/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getBulkSpamScore(args = {}) { diff --git a/components/dataforseo/actions/get-bulk-traffic-analytics/get-bulk-traffic-analytics.mjs b/components/dataforseo/actions/get-bulk-traffic-analytics/get-bulk-traffic-analytics.mjs new file mode 100644 index 0000000000000..4cd1f94dbafdb --- /dev/null +++ b/components/dataforseo/actions/get-bulk-traffic-analytics/get-bulk-traffic-analytics.mjs @@ -0,0 +1,54 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-bulk-traffic-analytics", + name: "Get Bulk Traffic Analytics", + description: "Get traffic estimates and analytics for multiple domains in bulk. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/bulk_traffic_estimation/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + targets: { + propDefinition: [ + dataforseo, + "targets", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getBulkTrafficAnalytics({ + $, + data: [ + { + targets: this.targets, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved bulk traffic analytics for ${this.targets.length} domains.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-business-listings-categories/get-business-listings-categories.mjs b/components/dataforseo/actions/get-business-listings-categories/get-business-listings-categories.mjs new file mode 100644 index 0000000000000..b64030edc86c2 --- /dev/null +++ b/components/dataforseo/actions/get-business-listings-categories/get-business-listings-categories.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-business-listings-categories", + name: "Get Business Listings Categories", + description: "Get available business categories for business listings and local SEO. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/categories/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getBusinessListingsCategories({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved business listings categories."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-business-listings/get-business-listings.mjs b/components/dataforseo/actions/get-business-listings/get-business-listings.mjs index 078405645f80a..cd6a340c323c2 100644 --- a/components/dataforseo/actions/get-business-listings/get-business-listings.mjs +++ b/components/dataforseo/actions/get-business-listings/get-business-listings.mjs @@ -4,7 +4,7 @@ export default { key: "dataforseo-get-business-listings", name: "Get Business Listings", description: "Get Business Listings. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/search/live/?bash)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { dataforseo, diff --git a/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs b/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs index 032fba1faa865..04bb26bc21b37 100644 --- a/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs +++ b/components/dataforseo/actions/get-categories-aggregation/get-categories-aggregation.mjs @@ -6,7 +6,7 @@ export default { name: "Get Categories Aggregation", description: "Get information about groups of related categories and the number of entities in each category. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/categories_aggregation/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getCategoriesAggregation(args = {}) { diff --git a/components/dataforseo/actions/get-competitor-domains/get-competitor-domains.mjs b/components/dataforseo/actions/get-competitor-domains/get-competitor-domains.mjs new file mode 100644 index 0000000000000..10107c66de228 --- /dev/null +++ b/components/dataforseo/actions/get-competitor-domains/get-competitor-domains.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-competitor-domains", + name: "Get Competitor Domains", + description: "Find competing domains for specified keywords or target domain. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/competitors_domain/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getCompetitorDomains({ + $, + data: [ + { + target: this.target, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved competitor domains for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-content-citations/get-content-citations.mjs b/components/dataforseo/actions/get-content-citations/get-content-citations.mjs new file mode 100644 index 0000000000000..13aa4851dcf4c --- /dev/null +++ b/components/dataforseo/actions/get-content-citations/get-content-citations.mjs @@ -0,0 +1,46 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-content-citations", + name: "Get Content Citations", + description: "Find mentions and citations of keywords or brands online for brand monitoring and content strategy. [See the documentation](https://docs.dataforseo.com/v3/content_analysis/search/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getContentCitations({ + $, + data: [ + { + keyword: this.keyword, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved content citations for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-content-summary/get-content-summary.mjs b/components/dataforseo/actions/get-content-summary/get-content-summary.mjs new file mode 100644 index 0000000000000..c79ab1836b2f9 --- /dev/null +++ b/components/dataforseo/actions/get-content-summary/get-content-summary.mjs @@ -0,0 +1,39 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-content-summary", + name: "Get Content Summary", + description: "Get content performance metrics and summary for content strategy optimization. [See the documentation](https://docs.dataforseo.com/v3/content_analysis/summary/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getContentSummary({ + $, + data: [ + { + keyword: this.keyword, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved content summary for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-intersection/get-domain-intersection.mjs b/components/dataforseo/actions/get-domain-intersection/get-domain-intersection.mjs new file mode 100644 index 0000000000000..ab565b7b3c621 --- /dev/null +++ b/components/dataforseo/actions/get-domain-intersection/get-domain-intersection.mjs @@ -0,0 +1,66 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-intersection", + name: "Get Domain Intersection", + description: "Compare keyword overlap between multiple domains to find shared ranking opportunities. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/domain_intersection/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target1: { + type: "string", + label: "Target 1", + description: "The first domain to compare. The domain should be specified without https:// and www.", + }, + target2: { + type: "string", + label: "Target 2", + description: "The second domain to compare. The domain should be specified without https:// and www.", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainIntersection({ + $, + data: [ + { + target1: this.target1, + target2: this.target2, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved domain intersection for domains ${this.target1} and ${this.target2}.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-keywords/get-domain-keywords.mjs b/components/dataforseo/actions/get-domain-keywords/get-domain-keywords.mjs new file mode 100644 index 0000000000000..ab162e4a4ea41 --- /dev/null +++ b/components/dataforseo/actions/get-domain-keywords/get-domain-keywords.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-keywords", + name: "Get Domain Keywords", + description: "Get all keywords a domain ranks for in organic search results. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/ranked_keywords/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainKeywords({ + $, + data: [ + { + target: this.target, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved domain keywords for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs b/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs index 6a7ee01178cb0..1ab9e1de0a573 100644 --- a/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs +++ b/components/dataforseo/actions/get-domain-pages-summary/get-domain-pages-summary.mjs @@ -6,7 +6,7 @@ export default { name: "Get Domain Pages Summary", description: "Get detailed summary data on all backlinks and related metrics for each page of the specified domain or subdomain. [See the documentation](https://docs.dataforseo.com/v3/backlinks/domain_pages_summary/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getDomainPagesSummary(args = {}) { diff --git a/components/dataforseo/actions/get-domain-rank-overview/get-domain-rank-overview.mjs b/components/dataforseo/actions/get-domain-rank-overview/get-domain-rank-overview.mjs new file mode 100644 index 0000000000000..af3d93cf00ffc --- /dev/null +++ b/components/dataforseo/actions/get-domain-rank-overview/get-domain-rank-overview.mjs @@ -0,0 +1,54 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-rank-overview", + name: "Get Domain Rank Overview", + description: "Retrieve domain authority and ranking metrics for specified domains. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/domain_rank_overview/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainRankOverview({ + $, + data: [ + { + target: this.target, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved domain rank overview for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-domain-whois-overview/get-domain-whois-overview.mjs b/components/dataforseo/actions/get-domain-whois-overview/get-domain-whois-overview.mjs new file mode 100644 index 0000000000000..091add601f27f --- /dev/null +++ b/components/dataforseo/actions/get-domain-whois-overview/get-domain-whois-overview.mjs @@ -0,0 +1,40 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-domain-whois-overview", + name: "Get Domain Whois Overview", + description: "Get domain registration data and ownership information. [See the documentation](https://docs.dataforseo.com/v3/domain_analytics/whois/overview/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getDomainWhoisOverview({ + $, + data: [ + { + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved domain whois overview."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-ad-traffic-by-keyword/get-google-ads-ad-traffic-by-keyword.mjs b/components/dataforseo/actions/get-google-ads-ad-traffic-by-keyword/get-google-ads-ad-traffic-by-keyword.mjs new file mode 100644 index 0000000000000..29038dc1687a2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-ad-traffic-by-keyword/get-google-ads-ad-traffic-by-keyword.mjs @@ -0,0 +1,73 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-ad-traffic-by-keyword", + name: "Get Google Ads Ad Traffic By Keyword", + description: "Retrieve estimates for impressions, clicks, and cost-per-click for specified keywords, aiding in assessing keyword demand. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/ad_traffic_by_keywords/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + bid: { + type: "integer", + label: "Bid", + description: "The maximum custom bid", + }, + match: { + type: "string", + label: "Match", + description: "The keywords match type", + options: [ + "exact", + "broad", + "phrase", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + optional: true, + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsAdTrafficByKeywords({ + $, + data: [ + { + keywords: this.keywords, + bid: this.bid, + match: this.match, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads ad traffic by keyword."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-keywords-for-keywords-completed-tasks/get-google-ads-keywords-for-keywords-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-keywords-for-keywords-completed-tasks/get-google-ads-keywords-for-keywords-completed-tasks.mjs new file mode 100644 index 0000000000000..ed49027f2dde2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-keywords-for-keywords-completed-tasks/get-google-ads-keywords-for-keywords-completed-tasks.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-keywords-for-keywords-completed-tasks", + name: "Get Google Ads Keywords For Keywords Completed Tasks", + description: "Retrieve the results of completed 'Keywords For Keywords' tasks, providing related keywords for previously submitted keyword requests. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsKeywordsForKeywordsCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads keywords for keywords completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-keywords-for-keywords/get-google-ads-keywords-for-keywords.mjs b/components/dataforseo/actions/get-google-ads-keywords-for-keywords/get-google-ads-keywords-for-keywords.mjs new file mode 100644 index 0000000000000..bd88e09ec29c3 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-keywords-for-keywords/get-google-ads-keywords-for-keywords.mjs @@ -0,0 +1,56 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-keywords-for-keywords", + name: "Get Google Ads Keywords For Keywords", + description: "Retrieve keywords related to specified terms, helping you discover new keyword opportunities. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_keywords/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + optional: true, + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsKeywordsForKeywords({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads keywords for keywords."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-keywords-for-site-completed-tasks/get-google-ads-keywords-for-site-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-keywords-for-site-completed-tasks/get-google-ads-keywords-for-site-completed-tasks.mjs new file mode 100644 index 0000000000000..bbb00ca92e30c --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-keywords-for-site-completed-tasks/get-google-ads-keywords-for-site-completed-tasks.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-keywords-for-site-completed-tasks", + name: "Get Google Ads Keywords For Site Completed Tasks", + description: "Retrieve the results of completed 'Keywords For Site' tasks, which haven't been collected yet. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/keywords_for_site/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsKeywordsForSiteCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads keywords for site completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-languages/get-google-ads-languages.mjs b/components/dataforseo/actions/get-google-ads-languages/get-google-ads-languages.mjs new file mode 100644 index 0000000000000..917f5dfa9703d --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-languages/get-google-ads-languages.mjs @@ -0,0 +1,29 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-languages", + name: "Get Google Ads Languages", + description: "Retrieve a list of languages supported by the Google Ads API, allowing you to specify language targeting in your requests. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/languages/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsLanguages({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads languages."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-locations/get-google-ads-locations.mjs b/components/dataforseo/actions/get-google-ads-locations/get-google-ads-locations.mjs new file mode 100644 index 0000000000000..75ce8d8a1d6a2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-locations/get-google-ads-locations.mjs @@ -0,0 +1,35 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-locations", + name: "Get Google Ads Locations", + description: "Retrieve a list of available locations supported by the Google Ads API, which can be used to specify geographic targeting in your requests. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/locations/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + countryCode: { + type: "string", + label: "Country Code", + description: "The country code to get locations for. Ex: `US`", + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsLocations({ + $, + countryCode: this.countryCode, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads locations"); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-search-volume-completed-tasks/get-google-ads-search-volume-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-search-volume-completed-tasks/get-google-ads-search-volume-completed-tasks.mjs new file mode 100644 index 0000000000000..81da04af60f0f --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-search-volume-completed-tasks/get-google-ads-search-volume-completed-tasks.mjs @@ -0,0 +1,29 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-google-ads-search-volume-completed-tasks", + name: "Get Google Ads Search Volume Completed Tasks", + description: "Retrieve the results of completed 'Search Volume' tasks, which haven't been collected yet. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/search_volume/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsSearchVolumeCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads search volume completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-search-volume/get-google-ads-search-volume.mjs b/components/dataforseo/actions/get-google-ads-search-volume/get-google-ads-search-volume.mjs new file mode 100644 index 0000000000000..e8ab6b57c08f2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-search-volume/get-google-ads-search-volume.mjs @@ -0,0 +1,56 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-ads-search-volume", + name: "Get Google Ads Search Volume", + description: "Retrieve search volume data for specified keywords from Google Ads. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/search_volume/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + optional: true, + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsSearchVolume({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads search volume data."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-status/get-google-ads-status.mjs b/components/dataforseo/actions/get-google-ads-status/get-google-ads-status.mjs new file mode 100644 index 0000000000000..09b383122a537 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-status/get-google-ads-status.mjs @@ -0,0 +1,29 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-google-ads-status", + name: "Get Google Ads Status", + description: "Check the status of Google Ads data updates, indicating whether the keyword data has been refreshed for the previous month. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/status/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsStatus({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads status"); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-ads-traffic-by-keywords-completed-tasks/get-google-ads-traffic-by-keywords-completed-tasks.mjs b/components/dataforseo/actions/get-google-ads-traffic-by-keywords-completed-tasks/get-google-ads-traffic-by-keywords-completed-tasks.mjs new file mode 100644 index 0000000000000..322bffe8ae9c2 --- /dev/null +++ b/components/dataforseo/actions/get-google-ads-traffic-by-keywords-completed-tasks/get-google-ads-traffic-by-keywords-completed-tasks.mjs @@ -0,0 +1,29 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-google-ads-traffic-by-keywords-completed-tasks", + name: "Get Google Ads Traffic By Keywords Completed Tasks", + description: "Retrieve the results of completed 'Ad Traffic By Keywords' tasks, which haven't been collected yet. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/google_ads/ad_traffic_by_keywords/tasks_ready/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleAdsAdTrafficByKeywordsCompletedTasks({ + $, + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved Google Ads traffic by keywords completed tasks."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-images-results/get-google-images-results.mjs b/components/dataforseo/actions/get-google-images-results/get-google-images-results.mjs new file mode 100644 index 0000000000000..9af386afc8133 --- /dev/null +++ b/components/dataforseo/actions/get-google-images-results/get-google-images-results.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-images-results", + name: "Get Google Images Results", + description: "Retrieve Google Images search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/google/images/live/advanced/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleImagesResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google Images results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-my-business-info/get-google-my-business-info.mjs b/components/dataforseo/actions/get-google-my-business-info/get-google-my-business-info.mjs new file mode 100644 index 0000000000000..107d2896ac48d --- /dev/null +++ b/components/dataforseo/actions/get-google-my-business-info/get-google-my-business-info.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-my-business-info", + name: "Get Google My Business Info", + description: "Get detailed Google My Business listing information for local SEO analysis. [See the documentation](https://docs.dataforseo.com/v3/business_data/google/my_business_info/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleMyBusinessInfo({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google My Business info for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-news-results/get-google-news-results.mjs b/components/dataforseo/actions/get-google-news-results/get-google-news-results.mjs new file mode 100644 index 0000000000000..9486b9b8dc4bf --- /dev/null +++ b/components/dataforseo/actions/get-google-news-results/get-google-news-results.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-news-results", + name: "Get Google News Results", + description: "Retrieve Google News search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/google/news/live/advanced/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleNewsResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google News results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-organic-results/get-google-organic-results.mjs b/components/dataforseo/actions/get-google-organic-results/get-google-organic-results.mjs new file mode 100644 index 0000000000000..9f572089bb9c5 --- /dev/null +++ b/components/dataforseo/actions/get-google-organic-results/get-google-organic-results.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-organic-results", + name: "Get Google Organic Results", + description: "Retrieve Google organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/google/organic/live/regular/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + depth: { + type: "integer", + label: "Depth", + description: "The parsing depth. Default: 100", + max: 700, + optional: true, + }, + maxCrawlPages: { + type: "integer", + label: "Max Crawl Pages", + description: "The page crawl limit", + max: 100, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleOrganicResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + depth: this.depth, + max_crawl_pages: this.maxCrawlPages, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google organic results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-play-search/get-google-play-search.mjs b/components/dataforseo/actions/get-google-play-search/get-google-play-search.mjs new file mode 100644 index 0000000000000..b277e570c7367 --- /dev/null +++ b/components/dataforseo/actions/get-google-play-search/get-google-play-search.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-play-search", + name: "Get Google Play Search", + description: "Search Google Play Store apps by keywords for app store optimization (ASO) analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/google/app_searches/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGooglePlaySearch({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully searched Google Play Store for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-google-reviews/get-google-reviews.mjs b/components/dataforseo/actions/get-google-reviews/get-google-reviews.mjs new file mode 100644 index 0000000000000..e84faa2356a5e --- /dev/null +++ b/components/dataforseo/actions/get-google-reviews/get-google-reviews.mjs @@ -0,0 +1,53 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-google-reviews", + name: "Get Google Reviews", + description: "Get Google business reviews and ratings for local SEO and reputation management. [See the documentation](https://docs.dataforseo.com/v3/business_data/google/reviews/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCoordinate: { + propDefinition: [ + dataforseo, + "locationCoordinate", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getGoogleReviews({ + $, + data: [ + { + keyword: this.keyword, + location_coordinate: this.locationCoordinate, + language_code: this.languageCode, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Google reviews for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-historical-serp-data/get-historical-serp-data.mjs b/components/dataforseo/actions/get-historical-serp-data/get-historical-serp-data.mjs new file mode 100644 index 0000000000000..9f46c1687cea9 --- /dev/null +++ b/components/dataforseo/actions/get-historical-serp-data/get-historical-serp-data.mjs @@ -0,0 +1,67 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-historical-serp-data", + name: "Get Historical SERP Data", + description: "Get ranking history for keywords over time. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/historical_serps/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + dateFrom: { + type: "string", + label: "Date From", + description: "Start date for historical data in YYYY-MM-DD format", + optional: true, + }, + dateTo: { + type: "string", + label: "Date To", + description: "End date for historical data in YYYY-MM-DD format", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getHistoricalSerpData({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + date_from: this.dateFrom, + date_to: this.dateTo, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved historical SERP data for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-data-errors/get-keyword-data-errors.mjs b/components/dataforseo/actions/get-keyword-data-errors/get-keyword-data-errors.mjs new file mode 100644 index 0000000000000..d18f4a6f910cd --- /dev/null +++ b/components/dataforseo/actions/get-keyword-data-errors/get-keyword-data-errors.mjs @@ -0,0 +1,77 @@ +import { ConfigurationError } from "@pipedream/platform"; +import dataforseo from "../../dataforseo.app.mjs"; + +export default { + key: "dataforseo-get-keyword-data-errors", + name: "Get Keyword Data Errors", + description: "Retrieve information about the Keywords Data API tasks that returned an error within the past 7 days [See the documentation](https://docs.dataforseo.com/v3/keywords_data/errors/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + dateTimeFrom: { + type: "string", + label: "Date Time From", + description: "The start time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`. Allows filtering results by the datetime parameter within the range of the last 7 days.", + }, + dateTimeTo: { + type: "string", + label: "Date Time To", + description: "The finish time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`. Allows filtering results by the datetime parameter within the range of the last 7 days.", + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + methods: { + validateDateRange(dateTimeFrom, dateTimeTo) { + const from = new Date(dateTimeFrom); + const to = new Date(dateTimeTo); + const now = new Date(); + + if (isNaN(from) || isNaN(to)) { + throw new ConfigurationError("Invalid date format. Use yyyy-mm-dd hh:mm:ss +00:00"); + } + + if (from >= to) { + throw new ConfigurationError("DateTimeFrom must be before DateTimeTo"); + } + + const sevenDaysAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000); + if (from < sevenDaysAgo || from > now) { + throw new ConfigurationError("DateTimeFrom must be within the last 7 days"); + } + if (to < sevenDaysAgo || to > now) { + throw new ConfigurationError("DateTimeTo must be within the last 7 days"); + } + }, + }, + async run({ $ }) { + this.validateDateRange(this.dateTimeFrom, this.dateTimeTo); + + const response = await this.dataforseo.getKeywordDataErrors({ + $, + data: [ + { + datetime_from: this.dateTimeFrom, + datetime_to: this.dateTimeTo, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved keyword data errors."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-data-id-list/get-keyword-data-id-list.mjs b/components/dataforseo/actions/get-keyword-data-id-list/get-keyword-data-id-list.mjs new file mode 100644 index 0000000000000..edfe509c20b06 --- /dev/null +++ b/components/dataforseo/actions/get-keyword-data-id-list/get-keyword-data-id-list.mjs @@ -0,0 +1,96 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-keyword-data-id-list", + name: "Get Keyword Data ID List", + description: "Retrieve the list of IDs and metadata of the completed Keywords Data tasks during the specified period. [See the documentation](https://docs.dataforseo.com/v3/keywords_data/id_list/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + dateTimeFrom: { + type: "string", + label: "Date Time From", + description: "The start time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`. If include_metadata is set to true, minimum value: a month before the current datetime. If include_metadata is set to false, minimum value: six months before the current datetime", + }, + dateTimeTo: { + type: "string", + label: "Date Time To", + description: "The finish time for filtering results in the format \"yyyy-mm-dd hh-mm-ss +00:00\". Example: `2023-01-15 12:57:46 +00:00`", + }, + includeMetadata: { + type: "boolean", + label: "Include Metadata", + description: "If set to `true`, the response will include the metadata of the completed tasks", + optional: true, + }, + sort: { + type: "string", + label: "Sort", + description: "The sort direction", + options: [ + "asc", + "desc", + ], + optional: true, + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + methods: { + validateDateRange(dateTimeFrom, dateTimeTo, includeMetadata) { + const from = new Date(dateTimeFrom); + const to = new Date(dateTimeTo); + + if (isNaN(from) || isNaN(to)) { + throw new ConfigurationError("Invalid date format. Use yyyy-mm-dd hh:mm:ss +00:00"); + } + + if (from >= to) { + throw new ConfigurationError("DateTimeFrom must be before DateTimeTo"); + } + + const monthsBack = includeMetadata + ? 1 + : 6; + const minDate = new Date(); + minDate.setMonth(minDate.getMonth() - monthsBack); + + if (from < minDate) { + throw new ConfigurationError(`DateTimeFrom must not be earlier than ${monthsBack} month(s) ago`); + } + }, + }, + async run({ $ }) { + this.validateDateRange(this.dateTimeFrom, this.dateTimeTo, this.includeMetadata); + + const response = await this.dataforseo.getKeywordDataIdList({ + $, + data: [ + { + datetime_from: this.dateTimeFrom, + datetime_to: this.dateTimeTo, + include_metadata: this.includeMetadata, + sort: this.sort, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", "Successfully retrieved keyword data ID list."); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs b/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs index 2ee9bc3c7fe64..8a1cca329d7e6 100644 --- a/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs +++ b/components/dataforseo/actions/get-keyword-difficulty/get-keyword-difficulty.mjs @@ -4,7 +4,7 @@ export default { key: "dataforseo-get-keyword-difficulty", name: "Get Keyword Difficulty", description: "Get Keyword Difficulty. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/bulk_keyword_difficulty/live/?bash)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { dataforseo, diff --git a/components/dataforseo/actions/get-keyword-ideas-live/get-keyword-ideas-live.mjs b/components/dataforseo/actions/get-keyword-ideas-live/get-keyword-ideas-live.mjs new file mode 100644 index 0000000000000..5ab61d8016980 --- /dev/null +++ b/components/dataforseo/actions/get-keyword-ideas-live/get-keyword-ideas-live.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-keyword-ideas-live", + name: "Get Keyword Ideas Live", + description: "Generate live keyword suggestions and ideas for content strategy. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/keyword_ideas/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getKeywordIdeasLive({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved keyword ideas for ${this.keywords.length} keywords.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-keyword-suggestions/get-keyword-suggestions.mjs b/components/dataforseo/actions/get-keyword-suggestions/get-keyword-suggestions.mjs new file mode 100644 index 0000000000000..8b232496f8d46 --- /dev/null +++ b/components/dataforseo/actions/get-keyword-suggestions/get-keyword-suggestions.mjs @@ -0,0 +1,60 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-keyword-suggestions", + name: "Get Keyword Suggestions", + description: "Get keyword ideas and related terms for specified seed keywords. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/keyword_suggestions/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getKeywordSuggestions({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved keyword suggestions for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs b/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs index a32347ac42732..6134e16806841 100644 --- a/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs +++ b/components/dataforseo/actions/get-ranked-keywords/get-ranked-keywords.mjs @@ -4,7 +4,7 @@ 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", + version: "0.0.3", type: "action", props: { dataforseo, diff --git a/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs b/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs index 6cfbcaccdd9f8..59a4249172cc1 100644 --- a/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs +++ b/components/dataforseo/actions/get-referring-domains/get-referring-domains.mjs @@ -6,7 +6,7 @@ export default { name: "Get Referring Domains", description: "Get detailed overview of referring domains pointing to the specified target. [See the documentation](https://docs.dataforseo.com/v3/backlinks/referring_domains/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { getReferringDomains(args = {}) { diff --git a/components/dataforseo/actions/get-sentiment-analysis/get-sentiment-analysis.mjs b/components/dataforseo/actions/get-sentiment-analysis/get-sentiment-analysis.mjs new file mode 100644 index 0000000000000..1c8f8a90f9359 --- /dev/null +++ b/components/dataforseo/actions/get-sentiment-analysis/get-sentiment-analysis.mjs @@ -0,0 +1,39 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-sentiment-analysis", + name: "Get Sentiment Analysis", + description: "Analyze sentiment of brand mentions and content for reputation management. [See the documentation](https://docs.dataforseo.com/v3/content_analysis/sentiment_analysis/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getSentimentAnalysis({ + $, + data: [ + { + keyword: this.keyword, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully analyzed sentiment for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-technologies-domain-list/get-technologies-domain-list.mjs b/components/dataforseo/actions/get-technologies-domain-list/get-technologies-domain-list.mjs new file mode 100644 index 0000000000000..68e719889e9ac --- /dev/null +++ b/components/dataforseo/actions/get-technologies-domain-list/get-technologies-domain-list.mjs @@ -0,0 +1,40 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-technologies-domain-list", + name: "Get Technologies Domain List", + description: "Get technologies used by a domain (CMS, analytics, frameworks, etc.). [See the documentation](https://docs.dataforseo.com/v3/domain_analytics/technologies/domain_technologies/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + target: { + propDefinition: [ + dataforseo, + "target", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getTechnologiesDomainList({ + $, + data: [ + { + target: this.target, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved technologies for "${this.target}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-top-serp-results/get-top-serp-results.mjs b/components/dataforseo/actions/get-top-serp-results/get-top-serp-results.mjs new file mode 100644 index 0000000000000..f425b83840745 --- /dev/null +++ b/components/dataforseo/actions/get-top-serp-results/get-top-serp-results.mjs @@ -0,0 +1,61 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-top-serp-results", + name: "Get Top SERP Results", + description: "Get top-ranking pages and competitor analysis for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/serp_competitors/live/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keywords: { + propDefinition: [ + dataforseo, + "keywords", + ], + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + limit: { + propDefinition: [ + dataforseo, + "limit", + ], + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getTopSerpResults({ + $, + data: [ + { + keywords: this.keywords, + location_code: this.locationCode, + language_code: this.languageCode, + limit: this.limit, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved top SERP results for ${this.keywords.length} keywords.`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-tripadvisor-reviews/get-tripadvisor-reviews.mjs b/components/dataforseo/actions/get-tripadvisor-reviews/get-tripadvisor-reviews.mjs new file mode 100644 index 0000000000000..3ef45f845e395 --- /dev/null +++ b/components/dataforseo/actions/get-tripadvisor-reviews/get-tripadvisor-reviews.mjs @@ -0,0 +1,105 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-tripadvisor-reviews", + name: "Get TripAdvisor Reviews", + description: "Get TripAdvisor business reviews and ratings, especially useful for hospitality businesses. [See the documentation](https://docs.dataforseo.com/v3/business_data/tripadvisor/reviews/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + countryCode: { + type: "string", + label: "Country Code", + description: "The country code of the target location. Ex: `US`", + }, + locationCode: { + propDefinition: [ + dataforseo, + "tripAdvisorLocationCode", + (c) => ({ + countryCode: c.countryCode, + }), + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + optional: true, + }, + sortBy: { + type: "string", + label: "Sort By", + description: "Sort reviews by specific criteria", + options: [ + "most_recent", + "detailed_reviews", + ], + optional: true, + }, + waitForResults: { + type: "boolean", + label: "Wait for Results", + description: "Wait for the results to be available. Not for use with Pipedream Connect.", + default: true, + optional: true, + }, + postbackUrl: { + type: "string", + label: "Postback URL", + description: "The URL to receive the search results. Only applicable when \"Wait for Results\" = `FALSE`", + optional: true, + }, + }, + async run({ $ }) { + let response; + const context = $.context; + const run = context + ? context.run + : { + runs: 1, + }; + + if (run.runs === 1) { + let postbackUrl = this.postbackUrl; + if (context && this.waitForResults) { + ({ resume_url: postbackUrl } = $.flow.rerun(600000, null, 1)); + } + response = await this.dataforseo.getTripadvisorReviews({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + sort_by: this.sortBy, + postback_url: postbackUrl, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + } + + if (run.runs > 1) { + response = run.callback_request.body; + } + + $.export("$summary", `Successfully retrieved TripAdvisor reviews for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-trustpilot-reviews/get-trustpilot-reviews.mjs b/components/dataforseo/actions/get-trustpilot-reviews/get-trustpilot-reviews.mjs new file mode 100644 index 0000000000000..b78bd1e4db6c3 --- /dev/null +++ b/components/dataforseo/actions/get-trustpilot-reviews/get-trustpilot-reviews.mjs @@ -0,0 +1,50 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-trustpilot-reviews", + name: "Get Trustpilot Reviews", + description: "Get Trustpilot business reviews and ratings for reputation management. [See the documentation](https://docs.dataforseo.com/v3/business_data/trustpilot/reviews/task_post/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + domain: { + type: "string", + label: "Domain", + description: "Domain of the local establishment. Example: `www.thepearlsource.com`", + }, + sortBy: { + type: "string", + label: "Sort By", + description: "Sort reviews by specific criteria", + options: [ + "recency", + "relevance", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getTrustpilotReviews({ + $, + data: [ + { + domain: this.domain, + sort_by: this.sortBy, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Trustpilot reviews for "${this.domain}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/get-yahoo-organic-results/get-yahoo-organic-results.mjs b/components/dataforseo/actions/get-yahoo-organic-results/get-yahoo-organic-results.mjs new file mode 100644 index 0000000000000..6728b9b6fe4a1 --- /dev/null +++ b/components/dataforseo/actions/get-yahoo-organic-results/get-yahoo-organic-results.mjs @@ -0,0 +1,69 @@ +import dataforseo from "../../dataforseo.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "dataforseo-get-yahoo-organic-results", + name: "Get Yahoo Organic Results", + description: "Retrieve Yahoo organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/yahoo/organic/live/regular/?bash)", + version: "0.0.1", + type: "action", + props: { + dataforseo, + keyword: { + type: "string", + label: "Keyword", + description: "The keyword to search for", + }, + locationCode: { + propDefinition: [ + dataforseo, + "locationCode", + ], + }, + languageCode: { + propDefinition: [ + dataforseo, + "languageCode", + ], + }, + depth: { + type: "integer", + label: "Depth", + description: "The parsing depth. Default: 100", + max: 700, + optional: true, + }, + maxCrawlPages: { + type: "integer", + label: "Max Crawl Pages", + description: "The page crawl limit", + max: 100, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dataforseo.getYahooOrganicResults({ + $, + data: [ + { + keyword: this.keyword, + location_code: this.locationCode, + language_code: this.languageCode, + depth: this.depth, + max_crawl_pages: this.maxCrawlPages, + }, + ], + }); + + if (response.status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.status_message}`); + } + + if (response.tasks[0].status_code !== 20000) { + throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); + } + + $.export("$summary", `Successfully retrieved Yahoo organic results for "${this.keyword}".`); + return response; + }, +}; diff --git a/components/dataforseo/actions/parse-page-content/parse-page-content.mjs b/components/dataforseo/actions/parse-page-content/parse-page-content.mjs index 2f11cb3565745..349aaa429a1a1 100644 --- a/components/dataforseo/actions/parse-page-content/parse-page-content.mjs +++ b/components/dataforseo/actions/parse-page-content/parse-page-content.mjs @@ -6,7 +6,7 @@ export default { name: "Parse Page Content", description: "Parse the content on any page and return its structured content. [See the documentation](https://docs.dataforseo.com/v3/on_page/content_parsing/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { parsePageContent(args = {}) { diff --git a/components/dataforseo/actions/search-business-listings/search-business-listings.mjs b/components/dataforseo/actions/search-business-listings/search-business-listings.mjs index 9eb387aceedb2..d7ea44368447c 100644 --- a/components/dataforseo/actions/search-business-listings/search-business-listings.mjs +++ b/components/dataforseo/actions/search-business-listings/search-business-listings.mjs @@ -6,7 +6,7 @@ export default { name: "Search Business Listings", description: "Get information about business entities listed on Google Maps. [See the documentation](https://docs.dataforseo.com/v3/business_data/business_listings/search/live/)", - version: "0.0.1", + version: "0.0.2", type: "action", methods: { searchBusinessListings(args = {}) { diff --git a/components/dataforseo/common/utils.mjs b/components/dataforseo/common/utils.mjs index bfc96415c2b39..e9d8507bf45f7 100644 --- a/components/dataforseo/common/utils.mjs +++ b/components/dataforseo/common/utils.mjs @@ -20,3 +20,11 @@ export function parseObjectEntries(value = {}) { ]), ); } + +export function parseArray(value) { + if (!value) return []; + if (typeof value === "string") { + return JSON.parse(value); + } + return value; +} diff --git a/components/dataforseo/dataforseo.app.mjs b/components/dataforseo/dataforseo.app.mjs index daf4c86d17a28..147e4f7d04fc3 100644 --- a/components/dataforseo/dataforseo.app.mjs +++ b/components/dataforseo/dataforseo.app.mjs @@ -6,7 +6,7 @@ export default { app: "dataforseo", propDefinitions: { locationCode: { - type: "string", + type: "integer", label: "Location Code", description: "The code of the target location", async options() { @@ -20,12 +20,27 @@ export default { })); }, }, + tripAdvisorLocationCode: { + type: "integer", + label: "Location Code", + description: "The code of the target location", + async options({ countryCode }) { + const response = await this.getTripadvisorLocations({ + countryCode, + }); + const locationCodes = response.tasks[0].result; + return locationCodes?.map(({ + location_name, location_code, + }) => ({ + value: location_code, + label: location_name, + })) || []; + }, + }, locationCoordinate: { type: "string", label: "Location Coordinate", - description: - "The location to search, in the format `latitude,longitude,radius` where radius is specified in kilometers. Example: `53.476225,-2.243572,200`", - + description: "The location to search, in the format `latitude,longitude,radius` where radius is specified in kilometers. Example: `53.476225,-2.243572,200`", }, targetType: { type: "string", @@ -36,13 +51,12 @@ export default { target: { type: "string", label: "Target", - description: "The domain name or the url of the target website or page", + description: "The domain name or the url of the target website or page. The domain should be specified without https:// and www.", }, backlinksTarget: { type: "string", label: "Target", - description: - "Domain, subdomain or webpage to get data for. A domain or a subdomain should be specified without `https://` and `www`. A page should be specified with absolute URL (including `http://` or `https://`", + description: "Domain, subdomain or webpage to get data for. A domain or a subdomain should be specified without `https://` and `www`. A page should be specified with absolute URL (including `http://` or `https://`)", }, categories: { type: "string[]", @@ -69,9 +83,9 @@ export default { optional: true, }, limit: { - type: "string", + type: "integer", label: "Limit", - description: "The maximum number of returned businesses", + description: "The maximum number of results to return. Maximum: 1000", optional: true, }, languageCode: { @@ -104,8 +118,7 @@ export default { rankScale: { type: "string", label: "Rank Scale", - description: - "Whether rank values are presented on a 0-100 or 0-1000 scale", + description: "Whether rank values are presented on a 0-100 or 0-1000 scale", optional: true, options: [ "one_hundred", @@ -116,36 +129,31 @@ export default { tag: { type: "string", label: "Tag", - description: - "You can use this parameter to identify the task and match it with the result.", + description: "You can use this parameter to identify the task and match it with the result.", optional: true, }, includeSubdomains: { type: "boolean", label: "Include Subdomains", - description: - "Whether the subdomains of the `target` will be included in the search. Default is `true`", + description: "Whether the subdomains of the `target` will be included in the search. Default is `true`", optional: true, }, includeIndirectLinks: { type: "boolean", label: "Include Indirect Links", - description: - "Whether indirect links to the target will be included in the results. Default is `true`", + description: "Whether indirect links to the target will be included in the results. Default is `true`", optional: true, }, excludeInternalBacklinks: { type: "boolean", label: "Exclude Internal Backlinks", - description: - "Indicates if internal backlinks from subdomains to the target will be excluded from the results. Default is `true`", + description: "Indicates if internal backlinks from subdomains to the target will be excluded from the results. Default is `true`", optional: true, }, backlinksStatusType: { type: "string", label: "Backlinks Status Type", - description: - "You can use this field to choose what backlinks will be returned and used for aggregated metrics for your target", + description: "You can use this field to choose what backlinks will be returned and used for aggregated metrics for your target", optional: true, options: [ { @@ -180,7 +188,7 @@ export default { _baseUrl() { return "https://api.dataforseo.com/v3"; }, - async _makeRequest(opts = {}) { + _makeRequest(opts = {}) { const { $ = this, path, @@ -195,38 +203,320 @@ export default { }, }); }, - async getKeywordDifficulty(args = {}) { + getKeywordDifficulty(args = {}) { return this._makeRequest({ path: "/dataforseo_labs/google/bulk_keyword_difficulty/live", method: "post", ...args, }); }, - async getBusinessListings(args = {}) { + getBusinessListings(args = {}) { return this._makeRequest({ path: "/business_data/business_listings/search/live", method: "post", ...args, }); }, - async getRankedKeywords(args = {}) { + getRankedKeywords(args = {}) { return this._makeRequest({ path: "/keywords_data/google_ads/keywords_for_site/live", method: "post", ...args, }); }, - async getLanguageCode(args = {}) { + getLanguageCode(args = {}) { return this._makeRequest({ path: "/keywords_data/google_ads/languages", ...args, }); }, - async getLocations(args = {}) { + getLocations(args = {}) { return this._makeRequest({ path: "/serp/google/ads_search/locations", ...args, }); }, + getKeywordDataIdList(args = {}) { + return this._makeRequest({ + path: "/keywords_data/id_list", + method: "post", + ...args, + }); + }, + getKeywordDataErrors(args = {}) { + return this._makeRequest({ + path: "/keywords_data/errors", + method: "post", + ...args, + }); + }, + getGoogleAdsStatus(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/status", + ...args, + }); + }, + getGoogleAdsLocations({ + countryCode, ...args + }) { + return this._makeRequest({ + path: `/keywords_data/google_ads/locations/${countryCode}`, + ...args, + }); + }, + getTripadvisorLocations({ + countryCode, ...args + }) { + return this._makeRequest({ + path: `/business_data/tripadvisor/locations/${countryCode}`, + ...args, + }); + }, + getGoogleAdsLanguages(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/languages", + ...args, + }); + }, + getGoogleAdsSearchVolume(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/search_volume/live", + method: "post", + ...args, + }); + }, + getGoogleAdsSearchVolumeCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/search_volume/tasks_ready", + ...args, + }); + }, + getGoogleAdsKeywordsForSiteCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/keywords_for_site/tasks_ready", + ...args, + }); + }, + getGoogleAdsKeywordsForKeywords(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/keywords_for_keywords/live", + method: "post", + ...args, + }); + }, + getGoogleAdsKeywordsForKeywordsCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/keywords_for_keywords/tasks_ready", + ...args, + }); + }, + getGoogleAdsAdTrafficByKeywords(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/ad_traffic_by_keywords/live", + method: "post", + ...args, + }); + }, + getGoogleAdsAdTrafficByKeywordsCompletedTasks(args = {}) { + return this._makeRequest({ + path: "/keywords_data/google_ads/ad_traffic_by_keywords/tasks_ready", + ...args, + }); + }, + getGoogleOrganicResults(args = {}) { + return this._makeRequest({ + path: "/serp/google/organic/live/regular", + method: "post", + ...args, + }); + }, + getGoogleImagesResults(args = {}) { + return this._makeRequest({ + path: "/serp/google/images/live/advanced", + method: "post", + ...args, + }); + }, + getGoogleNewsResults(args = {}) { + return this._makeRequest({ + path: "/serp/google/news/live/advanced", + method: "post", + ...args, + }); + }, + getBingOrganicResults(args = {}) { + return this._makeRequest({ + path: "/serp/bing/organic/live/regular", + method: "post", + ...args, + }); + }, + getYahooOrganicResults(args = {}) { + return this._makeRequest({ + path: "/serp/yahoo/organic/live/regular", + method: "post", + ...args, + }); + }, + getDomainRankOverview(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/domain_rank_overview/live", + method: "post", + ...args, + }); + }, + getCompetitorDomains(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/competitors_domain/live", + method: "post", + ...args, + }); + }, + getDomainKeywords(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/ranked_keywords/live", + method: "post", + ...args, + }); + }, + getKeywordSuggestions(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/keyword_suggestions/live", + method: "post", + ...args, + }); + }, + getHistoricalSerpData(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/historical_serps/live", + method: "post", + ...args, + }); + }, + getDomainIntersection(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/domain_intersection/live", + method: "post", + ...args, + }); + }, + getTopSerpResults(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/serp_competitors/live", + method: "post", + ...args, + }); + }, + getKeywordIdeasLive(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/keyword_ideas/live", + method: "post", + ...args, + }); + }, + getDomainWhoisOverview(args = {}) { + return this._makeRequest({ + path: "/domain_analytics/whois/overview/live", + method: "post", + ...args, + }); + }, + getTechnologiesDomainList(args = {}) { + return this._makeRequest({ + path: "/domain_analytics/technologies/domain_technologies/live", + method: "post", + ...args, + }); + }, + getAppIntersection(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/app_intersection/live", + method: "post", + ...args, + }); + }, + getBulkTrafficAnalytics(args = {}) { + return this._makeRequest({ + path: "/dataforseo_labs/google/bulk_traffic_estimation/live", + method: "post", + ...args, + }); + }, + getGoogleMyBusinessInfo(args = {}) { + return this._makeRequest({ + path: "/business_data/google/my_business_info/live", + method: "post", + ...args, + }); + }, + getTrustpilotReviews(args = {}) { + return this._makeRequest({ + path: "/business_data/trustpilot/reviews/task_post", + method: "post", + ...args, + }); + }, + getTripadvisorReviews(args = {}) { + return this._makeRequest({ + path: "/business_data/tripadvisor/reviews/task_post", + method: "post", + ...args, + }); + }, + getGoogleReviews(args = {}) { + return this._makeRequest({ + path: "/business_data/google/reviews/task_post", + method: "post", + ...args, + }); + }, + getBusinessListingsCategories(args = {}) { + return this._makeRequest({ + path: "/business_data/business_listings/categories", + ...args, + }); + }, + getAppStoreSearch(args = {}) { + return this._makeRequest({ + path: "/app_data/apple/app_searches/task_post", + method: "post", + ...args, + }); + }, + getGooglePlaySearch(args = {}) { + return this._makeRequest({ + path: "/app_data/google/app_searches/task_post", + method: "post", + ...args, + }); + }, + getAppReviewsSummary(args = {}) { + return this._makeRequest({ + path: "/app_data/apple/app_reviews/task_post", + method: "post", + ...args, + }); + }, + getContentCitations(args = {}) { + return this._makeRequest({ + path: "/content_analysis/search/live", + method: "post", + ...args, + }); + }, + getSentimentAnalysis(args = {}) { + return this._makeRequest({ + path: "/content_analysis/sentiment_analysis/live", + method: "post", + ...args, + }); + }, + getContentSummary(args = {}) { + return this._makeRequest({ + path: "/content_analysis/summary/live", + method: "post", + ...args, + }); + }, }, }; diff --git a/components/dataforseo/package.json b/components/dataforseo/package.json index 6b25a7c7a2b06..bc6ed849bae2a 100644 --- a/components/dataforseo/package.json +++ b/components/dataforseo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/dataforseo", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream DataForSEO Components", "main": "dataforseo.app.mjs", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af111effa0004..880ebe1f50564 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13014,8 +13014,7 @@ importers: specifier: ^1.4.0 version: 1.6.6 - components/siteglide: - specifiers: {} + components/siteglide: {} components/siteleaf: dependencies: