semrush-api-client 0.1.14 → 0.1.16
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/README.md +3 -2
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +3 -3
- package/dist/domain/getAdsCopies.js +1 -1
- package/dist/domain/{getDomainOrganic.d.ts → getDomainOrganicSearchKeywords.d.ts} +1 -1
- package/dist/domain/{getDomainOrganic.js → getDomainOrganicSearchKeywords.js} +3 -3
- package/dist/{overview → domain}/getDomainOverview.d.ts +2 -1
- package/dist/{overview → domain}/getDomainOverview.js +2 -1
- package/dist/domain/getDomainPaidSearchKeywords.js +1 -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/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# semrush-api-client
|
|
2
|
+
|
|
2
3
|
[](https://github.com//RenKoya1/semrush-api-client)
|
|
3
4
|
[](https://www.npmjs.com/package/semrush-api-client)
|
|
4
5
|
|
|
@@ -27,10 +28,10 @@ const client = new SemrushAPIClient({
|
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
// Get domain rank
|
|
30
|
-
client.
|
|
31
|
+
client.getDomainOverview({ domain: "apple.com" });
|
|
31
32
|
|
|
32
33
|
// Get keyword data
|
|
33
|
-
client.
|
|
34
|
+
client.getKeywordOverview({ phrase: "apple" });
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
## Contributing
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getDomainOverview } from "../
|
|
1
|
+
import { getDomainOverview } from "../domain/getDomainOverview";
|
|
2
2
|
import { getKeywordOverview } from "../keyword/getKeywordOverview";
|
|
3
3
|
import { getBacklinksOverview } from "../backlinks/backlinksOverview";
|
|
4
4
|
import { getRankDifference } from "../overview/getRankDifference";
|
|
5
|
-
import {
|
|
5
|
+
import { getDomainOrganicSearchKeywords } from "../domain/getDomainOrganicSearchKeywords";
|
|
6
6
|
import { getDomainPaidSearchKeywords } from "../domain/getDomainPaidSearchKeywords";
|
|
7
7
|
import { getAdsCopies } from "../domain/getAdsCopies";
|
|
8
8
|
import { getTrafficSummary } from "../trend/getTrafficSummary";
|
|
@@ -29,7 +29,7 @@ export declare class SemrushAPIClient {
|
|
|
29
29
|
getBacklinksOverview: typeof getBacklinksOverview;
|
|
30
30
|
getRankDifference: typeof getRankDifference;
|
|
31
31
|
getSemrushRank: typeof getSemrushRank;
|
|
32
|
-
|
|
32
|
+
getDomainOrganicSearchKeywords: typeof getDomainOrganicSearchKeywords;
|
|
33
33
|
getDomainPaidSearchKeywords: typeof getDomainPaidSearchKeywords;
|
|
34
34
|
getAdsCopies: typeof getAdsCopies;
|
|
35
35
|
getTrafficSummary: typeof getTrafficSummary;
|
package/dist/client/index.js
CHANGED
|
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SemrushAPIClient = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const getDomainOverview_1 = require("../
|
|
8
|
+
const getDomainOverview_1 = require("../domain/getDomainOverview");
|
|
9
9
|
const getKeywordOverview_1 = require("../keyword/getKeywordOverview");
|
|
10
10
|
const backlinksOverview_1 = require("../backlinks/backlinksOverview");
|
|
11
11
|
const getRankDifference_1 = require("../overview/getRankDifference");
|
|
12
|
-
const
|
|
12
|
+
const getDomainOrganicSearchKeywords_1 = require("../domain/getDomainOrganicSearchKeywords");
|
|
13
13
|
const getDomainPaidSearchKeywords_1 = require("../domain/getDomainPaidSearchKeywords");
|
|
14
14
|
const getAdsCopies_1 = require("../domain/getAdsCopies");
|
|
15
15
|
const getTrafficSummary_1 = require("../trend/getTrafficSummary");
|
|
@@ -71,7 +71,7 @@ class SemrushAPIClient {
|
|
|
71
71
|
getBacklinksOverview = backlinksOverview_1.getBacklinksOverview;
|
|
72
72
|
getRankDifference = getRankDifference_1.getRankDifference;
|
|
73
73
|
getSemrushRank = getSemrushRank_1.getSemrushRank;
|
|
74
|
-
|
|
74
|
+
getDomainOrganicSearchKeywords = getDomainOrganicSearchKeywords_1.getDomainOrganicSearchKeywords;
|
|
75
75
|
getDomainPaidSearchKeywords = getDomainPaidSearchKeywords_1.getDomainPaidSearchKeywords;
|
|
76
76
|
getAdsCopies = getAdsCopies_1.getAdsCopies;
|
|
77
77
|
getTrafficSummary = getTrafficSummary_1.getTrafficSummary;
|
|
@@ -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(","),
|
|
@@ -3,7 +3,7 @@ import { Database } from "../type/general/database";
|
|
|
3
3
|
type ExportColumns = "Ph" | "Po" | "Pp" | "Pd" | "Nq" | "Cp" | "Ur" | "Tr" | "Tg" | "Tc" | "Co" | "Nr" | "Td" | "Kd" | "Fp" | "Fk" | "Ts" | "In" | "Pt";
|
|
4
4
|
type displayPositions = "new" | "lost" | "rise" | "fall";
|
|
5
5
|
type displayPositionType = "organic" | "all" | "serp_features";
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getDomainOrganicSearchKeywords(this: SemrushAPIClient, { domain, export_columns, database, displayPosition, displayPositionsType, display_limit, outputObj, }: {
|
|
7
7
|
domain: string;
|
|
8
8
|
export_columns?: ExportColumns[];
|
|
9
9
|
displayPosition?: displayPositions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
async function
|
|
3
|
+
exports.getDomainOrganicSearchKeywords = getDomainOrganicSearchKeywords;
|
|
4
|
+
async function getDomainOrganicSearchKeywords({ domain, export_columns = [
|
|
5
5
|
"Ph",
|
|
6
6
|
"Po",
|
|
7
7
|
"Pp",
|
|
@@ -14,7 +14,7 @@ async function getDomainOrganic({ 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(","),
|
|
@@ -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(","),
|