semrush-api-client 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backlinks/getAnchors.js +1 -1
- package/dist/backlinks/getBacklinks.js +1 -1
- package/dist/backlinks/getIndexedPages.js +1 -1
- package/dist/backlinks/getReferringDomains.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/domain/getAdsCopies.js +1 -1
- package/dist/domain/getDomainOrganicSearchKeywords.js +1 -1
- package/dist/domain/getDomainOverview.js +1 -1
- package/dist/keyword/getBroadMatchKeywords.js +1 -1
- package/dist/keyword/getPhraseQuestions.js +1 -1
- package/dist/keyword/getRelatedKeywords.js +1 -1
- package/dist/overview/getSemrushRank.js +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ async function getAnchors({ target, target_type = "domain", export_columns = [
|
|
|
7
7
|
"backlinks_num",
|
|
8
8
|
"first_seen",
|
|
9
9
|
"last_seen",
|
|
10
|
-
], displaySort = "backlinks_num_desc", display_limit =
|
|
10
|
+
], displaySort = "backlinks_num_desc", display_limit = 10, outputObj = true, }) {
|
|
11
11
|
const params = {
|
|
12
12
|
type: "backlinks_anchors",
|
|
13
13
|
target,
|
|
@@ -24,7 +24,7 @@ async function getBacklinks({ target, target_type = "domain", export_columns = [
|
|
|
24
24
|
"sitewide",
|
|
25
25
|
"newlink",
|
|
26
26
|
"lostlink",
|
|
27
|
-
], displaySort = "page_ascore_desc", display_limit =
|
|
27
|
+
], displaySort = "page_ascore_desc", display_limit = 10, outputObj = true, }) {
|
|
28
28
|
const params = {
|
|
29
29
|
type: "backlinks",
|
|
30
30
|
target,
|
|
@@ -10,7 +10,7 @@ async function getIndexedPages({ target, target_type = "domain", export_columns
|
|
|
10
10
|
"last_seen",
|
|
11
11
|
"external_num",
|
|
12
12
|
"internal_num",
|
|
13
|
-
], displaySort = "backlinks_num_desc", display_limit =
|
|
13
|
+
], displaySort = "backlinks_num_desc", display_limit = 10, outputObj = true, }) {
|
|
14
14
|
const params = {
|
|
15
15
|
type: "backlinks_pages",
|
|
16
16
|
target,
|
|
@@ -11,7 +11,7 @@ async function getReferringDomains({ target, target_type = "domain", export_colu
|
|
|
11
11
|
"country",
|
|
12
12
|
"first_seen",
|
|
13
13
|
"last_seen",
|
|
14
|
-
], displaySort = "backlinks_num_desc", display_limit =
|
|
14
|
+
], displaySort = "backlinks_num_desc", display_limit = 10, outputObj = true, }) {
|
|
15
15
|
const params = {
|
|
16
16
|
type: "backlinks_refdomains",
|
|
17
17
|
target,
|
package/dist/client/index.js
CHANGED
|
@@ -60,7 +60,7 @@ class SemrushAPIClient {
|
|
|
60
60
|
}
|
|
61
61
|
catch (error) {
|
|
62
62
|
if (axios_1.default.isAxiosError(error)) {
|
|
63
|
-
throw new Error(`API request failed: ${error.message}`);
|
|
63
|
+
throw new Error(`API request failed: ${error.message}${error.code ? ` (code: ${error.code})` : ""}${error.response?.status ? ` (status: ${error.response.status})` : ""}`);
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
66
|
throw new Error(`Unexpected error: ${error}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAdsCopies = getAdsCopies;
|
|
4
|
-
async function getAdsCopies({ domain, export_columns = ["Tt", "Ds", "Vu", "Ur", "Pc", "Un"], database = "us", display_limit =
|
|
4
|
+
async function getAdsCopies({ domain, export_columns = ["Tt", "Ds", "Vu", "Ur", "Pc", "Un"], database = "us", display_limit = 10, outputObj = true, }) {
|
|
5
5
|
const params = {
|
|
6
6
|
type: "domain_adwords_unique",
|
|
7
7
|
export_columns: export_columns.join(","),
|
|
@@ -14,7 +14,7 @@ async function getDomainOrganicSearchKeywords({ domain, export_columns = [
|
|
|
14
14
|
"Co",
|
|
15
15
|
"Nr",
|
|
16
16
|
"Td",
|
|
17
|
-
], database = "us", displayPosition, displayPositionsType, display_limit =
|
|
17
|
+
], database = "us", displayPosition, displayPositionsType, display_limit = 10, outputObj = true, }) {
|
|
18
18
|
const params = {
|
|
19
19
|
type: "domain_organic",
|
|
20
20
|
export_columns: export_columns.join(","),
|
|
@@ -23,7 +23,7 @@ async function getDomainOverview({ domain, export_columns = [
|
|
|
23
23
|
"Sc",
|
|
24
24
|
"Srn",
|
|
25
25
|
"Srl",
|
|
26
|
-
], database = "us", displayDate, display_limit =
|
|
26
|
+
], database = "us", displayDate, display_limit = 10, outputObj = true, }) {
|
|
27
27
|
const params = {
|
|
28
28
|
type: "domain_ranks",
|
|
29
29
|
export_columns: export_columns.join(","),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBroadMatchKeywords = getBroadMatchKeywords;
|
|
4
|
-
async function getBroadMatchKeywords({ phrase, export_columns = ["Ph", "Nq", "Cp", "Co", "Nr", "Td", "In", "Kd"], database = "us", displaySort = "nq_desc", display_limit =
|
|
4
|
+
async function getBroadMatchKeywords({ phrase, export_columns = ["Ph", "Nq", "Cp", "Co", "Nr", "Td", "In", "Kd"], database = "us", displaySort = "nq_desc", display_limit = 10, outputObj = true, }) {
|
|
5
5
|
const params = {
|
|
6
6
|
type: "phrase_fullsearch",
|
|
7
7
|
phrase,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getPhraseQuestions = getPhraseQuestions;
|
|
4
|
-
async function getPhraseQuestions({ phrase, export_columns = ["Ph", "Nq", "Cp", "Co", "Nr", "Td", "In", "Kd"], database = "us", displaySort = "nq_desc", display_limit =
|
|
4
|
+
async function getPhraseQuestions({ phrase, export_columns = ["Ph", "Nq", "Cp", "Co", "Nr", "Td", "In", "Kd"], database = "us", displaySort = "nq_desc", display_limit = 10, outputObj = true, }) {
|
|
5
5
|
const params = {
|
|
6
6
|
type: "phrase_questions",
|
|
7
7
|
phrase,
|
|
@@ -12,7 +12,7 @@ async function getRelatedKeywords({ phrase, export_columns = [
|
|
|
12
12
|
"Fk",
|
|
13
13
|
"In",
|
|
14
14
|
"Kd",
|
|
15
|
-
], database = "us", displaySort = "nq_desc", display_limit =
|
|
15
|
+
], database = "us", displaySort = "nq_desc", display_limit = 10, outputObj = true, }) {
|
|
16
16
|
const params = {
|
|
17
17
|
type: "phrase_related",
|
|
18
18
|
phrase,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSemrushRank = getSemrushRank;
|
|
4
|
-
async function getSemrushRank({ export_columns = ["Dn", "Rk", "Or", "Ot", "Oc", "Ad", "At", "Ac"], database = "us", display_limit =
|
|
4
|
+
async function getSemrushRank({ export_columns = ["Dn", "Rk", "Or", "Ot", "Oc", "Ad", "At", "Ac"], database = "us", display_limit = 10, outputObj = true, }) {
|
|
5
5
|
const params = {
|
|
6
6
|
type: "rank",
|
|
7
7
|
export_columns: export_columns.join(","),
|