semrush-api-client 0.1.15 → 0.1.17
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/client/index.d.ts +2 -0
- package/dist/client/index.js +2 -0
- package/dist/domain/getAdsCopies.js +1 -1
- package/dist/domain/getDomainOrganicSearchKeywords.js +1 -1
- package/dist/domain/getDomainOverview.d.ts +2 -1
- package/dist/domain/getDomainOverview.js +2 -1
- package/dist/domain/getDomainPaidSearchKeywords.js +1 -1
- package/dist/keyword/getBroadMatchKeywords.d.ts +12 -0
- package/dist/keyword/getBroadMatchKeywords.js +14 -0
- package/dist/keyword/getPhraseQuestions.d.ts +0 -1
- package/dist/keyword/getPhraseQuestions.js +1 -1
- package/dist/keyword/getRelatedKeywords.js +1 -1
- package/dist/overview/getRankDifference.js +1 -1
- package/dist/overview/getSemrushRank.js +1 -1
- package/package.json +1 -1
package/dist/client/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { getIndexedPages } from "../backlinks/getIndexedPages";
|
|
|
14
14
|
import { getReferringDomains } from "../backlinks/getReferringDomains";
|
|
15
15
|
import { getRelatedKeywords } from "../keyword/getRelatedKeywords";
|
|
16
16
|
import { getPhraseQuestions } from "../keyword/getPhraseQuestions";
|
|
17
|
+
import { getBroadMatchKeywords } from "../keyword/getBroadMatchKeywords";
|
|
17
18
|
export declare class SemrushAPIClient {
|
|
18
19
|
private client;
|
|
19
20
|
private api_key;
|
|
@@ -40,4 +41,5 @@ export declare class SemrushAPIClient {
|
|
|
40
41
|
getReferringDomains: typeof getReferringDomains;
|
|
41
42
|
getRelatedKeywords: typeof getRelatedKeywords;
|
|
42
43
|
getPhraseQuestions: typeof getPhraseQuestions;
|
|
44
|
+
getBroadMatchKeywords: typeof getBroadMatchKeywords;
|
|
43
45
|
}
|
package/dist/client/index.js
CHANGED
|
@@ -21,6 +21,7 @@ const getIndexedPages_1 = require("../backlinks/getIndexedPages");
|
|
|
21
21
|
const getReferringDomains_1 = require("../backlinks/getReferringDomains");
|
|
22
22
|
const getRelatedKeywords_1 = require("../keyword/getRelatedKeywords");
|
|
23
23
|
const getPhraseQuestions_1 = require("../keyword/getPhraseQuestions");
|
|
24
|
+
const getBroadMatchKeywords_1 = require("../keyword/getBroadMatchKeywords");
|
|
24
25
|
class SemrushAPIClient {
|
|
25
26
|
client;
|
|
26
27
|
api_key;
|
|
@@ -82,5 +83,6 @@ class SemrushAPIClient {
|
|
|
82
83
|
getReferringDomains = getReferringDomains_1.getReferringDomains;
|
|
83
84
|
getRelatedKeywords = getRelatedKeywords_1.getRelatedKeywords;
|
|
84
85
|
getPhraseQuestions = getPhraseQuestions_1.getPhraseQuestions;
|
|
86
|
+
getBroadMatchKeywords = getBroadMatchKeywords_1.getBroadMatchKeywords;
|
|
85
87
|
}
|
|
86
88
|
exports.SemrushAPIClient = SemrushAPIClient;
|
|
@@ -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, display_limit = 1000, outputObj = true, }) {
|
|
4
|
+
async function getAdsCopies({ domain, export_columns = ["Tt", "Ds", "Vu", "Ur", "Pc", "Un"], database = "us", display_limit = 1000, 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, displayPosition, displayPositionsType, display_limit = 1000, outputObj = true, }) {
|
|
17
|
+
], database = "us", displayPosition, displayPositionsType, display_limit = 1000, outputObj = true, }) {
|
|
18
18
|
const params = {
|
|
19
19
|
type: "domain_organic",
|
|
20
20
|
export_columns: export_columns.join(","),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SemrushAPIClient } from "../client";
|
|
2
2
|
import { Database } from "../type/general/database";
|
|
3
3
|
import { ExportColumns } from "../type/general/exportColumns";
|
|
4
|
-
export declare function getDomainOverview(this: SemrushAPIClient, { domain, export_columns, database, display_limit, outputObj, }: {
|
|
4
|
+
export declare function getDomainOverview(this: SemrushAPIClient, { domain, export_columns, database, displayDate, display_limit, outputObj, }: {
|
|
5
5
|
domain: string;
|
|
6
6
|
export_columns?: ExportColumns[];
|
|
7
7
|
database?: Database;
|
|
8
8
|
display_limit?: number;
|
|
9
9
|
outputObj?: boolean;
|
|
10
|
+
displayDate?: string;
|
|
10
11
|
}): Promise<string | Record<string, string>[]>;
|
|
@@ -23,12 +23,13 @@ async function getDomainOverview({ domain, export_columns = [
|
|
|
23
23
|
"Sc",
|
|
24
24
|
"Srn",
|
|
25
25
|
"Srl",
|
|
26
|
-
], database, display_limit = 1000, outputObj = true, }) {
|
|
26
|
+
], database = "us", displayDate, display_limit = 1000, outputObj = true, }) {
|
|
27
27
|
const params = {
|
|
28
28
|
type: "domain_ranks",
|
|
29
29
|
export_columns: export_columns.join(","),
|
|
30
30
|
domain,
|
|
31
31
|
database,
|
|
32
|
+
displayDate: displayDate,
|
|
32
33
|
display_limit,
|
|
33
34
|
};
|
|
34
35
|
return this.get(this.BASE_URL, params, outputObj);
|
|
@@ -14,7 +14,7 @@ async function getDomainPaidSearchKeywords({ domain, export_columns = [
|
|
|
14
14
|
"Co",
|
|
15
15
|
"Nr",
|
|
16
16
|
"Td",
|
|
17
|
-
], database, displayPosition, display_limit = 1000, outputObj = true, }) {
|
|
17
|
+
], database = "us", displayPosition, display_limit = 1000, outputObj = true, }) {
|
|
18
18
|
const params = {
|
|
19
19
|
type: "domain_adwords",
|
|
20
20
|
export_columns: export_columns.join(","),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SemrushAPIClient } from "../client";
|
|
2
|
+
import { Database } from "../type/general/database";
|
|
3
|
+
export type ExportColumns = "Ph" | "Nq" | "Cp" | "Co" | "Nr" | "Td" | "Fk" | "In" | "Kd";
|
|
4
|
+
export type DisplaySort = "nq_asc" | "nq_desc" | "cp_asc" | "cp_desc" | "co_asc" | "co_desc" | "nr_asc" | "nr_desc" | "kd_asc" | "kd_desc";
|
|
5
|
+
export declare function getBroadMatchKeywords(this: SemrushAPIClient, { phrase, export_columns, database, displaySort, display_limit, outputObj, }: {
|
|
6
|
+
phrase: string;
|
|
7
|
+
database?: Database;
|
|
8
|
+
export_columns?: ExportColumns[];
|
|
9
|
+
displaySort?: DisplaySort;
|
|
10
|
+
outputObj?: boolean;
|
|
11
|
+
display_limit?: number;
|
|
12
|
+
}): Promise<string | Record<string, string>[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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 = 1000, outputObj = true, }) {
|
|
5
|
+
const params = {
|
|
6
|
+
type: "phrase_fullsearch",
|
|
7
|
+
phrase,
|
|
8
|
+
database,
|
|
9
|
+
display_sort: displaySort,
|
|
10
|
+
display_limit,
|
|
11
|
+
export_columns: export_columns.join(","),
|
|
12
|
+
};
|
|
13
|
+
return this.get(this.ANALYTICS_URL, params, outputObj);
|
|
14
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SemrushAPIClient } from "../client";
|
|
2
2
|
import { Database } from "../type/general/database";
|
|
3
|
-
export type IndexedPagephraseType = "root_domain" | "domain" | "url";
|
|
4
3
|
export type ExportColumns = "Ph" | "Nq" | "Cp" | "Co" | "Nr" | "Td" | "In" | "Kd";
|
|
5
4
|
export type DisplaySort = "nq_asc" | "nq_desc" | "cp_asc" | "cp_desc" | "co_asc" | "co_desc" | "nr_asc" | "nr_desc" | "kd_asc" | "kd_desc";
|
|
6
5
|
export declare function getPhraseQuestions(this: SemrushAPIClient, { phrase, export_columns, database, displaySort, display_limit, outputObj, }: {
|
|
@@ -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, displaySort = "nq_desc", display_limit = 1000, outputObj = true, }) {
|
|
4
|
+
async function getPhraseQuestions({ phrase, export_columns = ["Ph", "Nq", "Cp", "Co", "Nr", "Td", "In", "Kd"], database = "us", displaySort = "nq_desc", display_limit = 1000, 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, displaySort = "nq_desc", display_limit = 1000, outputObj = true, }) {
|
|
15
|
+
], database = "us", displaySort = "nq_desc", display_limit = 1000, outputObj = true, }) {
|
|
16
16
|
const params = {
|
|
17
17
|
type: "phrase_related",
|
|
18
18
|
phrase,
|
|
@@ -12,7 +12,7 @@ async function getRankDifference({ domain, export_columns = [
|
|
|
12
12
|
"At",
|
|
13
13
|
"Ac",
|
|
14
14
|
"Sh",
|
|
15
|
-
], database, display_limit = 1000, outputObj = true, }) {
|
|
15
|
+
], database = "us", display_limit = 1000, outputObj = true, }) {
|
|
16
16
|
const params = {
|
|
17
17
|
type: "rank_difference",
|
|
18
18
|
export_columns: export_columns.join(","),
|
|
@@ -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, display_limit = 1000, outputObj = true, }) {
|
|
4
|
+
async function getSemrushRank({ export_columns = ["Dn", "Rk", "Or", "Ot", "Oc", "Ad", "At", "Ac"], database = "us", display_limit = 1000, outputObj = true, }) {
|
|
5
5
|
const params = {
|
|
6
6
|
type: "rank",
|
|
7
7
|
export_columns: export_columns.join(","),
|