Skip to content

Commit aebc8c6

Browse files
committed
Get Referring Domains
1 parent f1590d6 commit aebc8c6

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import { parseObjectEntries } from "../../common/utils.mjs";
2+
import dataforseo from "../../dataforseo.app.mjs";
3+
4+
export default {
5+
key: "dataforseo-get-referring-domains",
6+
name: "Get Referring Domains",
7+
description:
8+
"Get detailed overview of referring domains pointing to the specified target. [See the documentation](https://docs.dataforseo.com/v3/backlinks/referring_domains/live/)",
9+
version: "0.0.1",
10+
type: "action",
11+
methods: {
12+
getReferringDomains(args = {}) {
13+
return this._makeRequest({
14+
path: "/backlinks/referring_domains/live",
15+
method: "post",
16+
...args,
17+
});
18+
},
19+
},
20+
props: {
21+
dataforseo,
22+
target: {
23+
propDefinition: [
24+
dataforseo,
25+
"backlinksTarget",
26+
],
27+
},
28+
backlinksStatusType: {
29+
propDefinition: [
30+
dataforseo,
31+
"backlinksStatusType",
32+
],
33+
},
34+
includeSubdomains: {
35+
propDefinition: [
36+
dataforseo,
37+
"includeSubdomains",
38+
],
39+
},
40+
includeIndirectLinks: {
41+
propDefinition: [
42+
dataforseo,
43+
"includeIndirectLinks",
44+
],
45+
},
46+
excludeInternalBacklinks: {
47+
propDefinition: [
48+
dataforseo,
49+
"excludeInternalBacklinks",
50+
],
51+
},
52+
backlinksFilters: {
53+
propDefinition: [
54+
dataforseo,
55+
"backlinksFilters",
56+
],
57+
},
58+
rankScale: {
59+
propDefinition: [
60+
dataforseo,
61+
"rankScale",
62+
],
63+
},
64+
tag: {
65+
propDefinition: [
66+
dataforseo,
67+
"tag",
68+
],
69+
},
70+
additionalOptions: {
71+
propDefinition: [
72+
dataforseo,
73+
"additionalOptions",
74+
],
75+
description: "Additional parameters to send in the request. [See the documentation](https://docs.dataforseo.com/v3/backlinks/referring_domains/live/) for all available parameters. Values will be parsed as JSON where applicable.",
76+
},
77+
},
78+
async run({ $ }) {
79+
const response = await this.getReferringDomains({
80+
$,
81+
data: [
82+
{
83+
target: this.target,
84+
include_subdomains: this.includeSubdomains,
85+
include_indirect_links: this.includeIndirectLinks,
86+
exclude_internal_backlinks: this.excludeInternalBacklinks,
87+
backlinks_status_type: this.backlinksStatusType,
88+
backlinks_filters: this.backlinksFilters,
89+
rank_scale: this.rankScale,
90+
tag: this.tag,
91+
...parseObjectEntries(this.additionalOptions),
92+
},
93+
],
94+
});
95+
$.export("$summary", "Successfully retrieved referring domains");
96+
return response;
97+
},
98+
};

0 commit comments

Comments
 (0)