semrush-api-client 0.1.12 → 0.1.13
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SemrushAPIClient } from "../client";
|
|
2
|
+
export type IndexedPageTargetType = "root_domain" | "domain" | "url";
|
|
3
|
+
export type ExportColumns = "source_url" | "source_title" | "response_code" | "backlinks_num" | "domains_num" | "last_seen" | "external_num" | "internal_num";
|
|
4
|
+
export type DisplaySort = "backlinks_num_asc" | "backlinks_num_desc" | "domains_num_asc" | "domains_num_desc" | "last_seen_asc" | "last_seen_desc";
|
|
5
|
+
export declare function getIndexedPages(this: SemrushAPIClient, { target, target_type, export_columns, displaySort, display_limit, outputObj, }: {
|
|
6
|
+
target: string;
|
|
7
|
+
target_type?: IndexedPageTargetType;
|
|
8
|
+
export_columns?: ExportColumns[];
|
|
9
|
+
displaySort?: DisplaySort;
|
|
10
|
+
outputObj?: boolean;
|
|
11
|
+
display_limit?: number;
|
|
12
|
+
}): Promise<string | Record<string, string>[]>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIndexedPages = getIndexedPages;
|
|
4
|
+
async function getIndexedPages({ target, target_type = "domain", export_columns = [
|
|
5
|
+
"source_url",
|
|
6
|
+
"source_title",
|
|
7
|
+
"response_code",
|
|
8
|
+
"backlinks_num",
|
|
9
|
+
"domains_num",
|
|
10
|
+
"last_seen",
|
|
11
|
+
"external_num",
|
|
12
|
+
"internal_num",
|
|
13
|
+
], displaySort = "backlinks_num_desc", display_limit = 1000, outputObj = true, }) {
|
|
14
|
+
const params = {
|
|
15
|
+
type: "backlinks_pages",
|
|
16
|
+
target,
|
|
17
|
+
target_type,
|
|
18
|
+
display_sort: displaySort,
|
|
19
|
+
display_limit,
|
|
20
|
+
export_columns: export_columns.join(","),
|
|
21
|
+
};
|
|
22
|
+
return this.get(this.ANALYTICS_URL + "v1/", params, outputObj);
|
|
23
|
+
}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { getSemrushRank } from "../overview/getSemrushRank";
|
|
|
10
10
|
import { getKeywordDifficulty } from "../keyword/getKeywordDifficulty";
|
|
11
11
|
import { getBacklinks } from "../backlinks/getBacklinks";
|
|
12
12
|
import { getAnchors } from "../backlinks/getAnchors";
|
|
13
|
+
import { getIndexedPages } from "../backlinks/getIndexedPages";
|
|
13
14
|
export declare class SemrushAPIClient {
|
|
14
15
|
private client;
|
|
15
16
|
private api_key;
|
|
@@ -32,4 +33,5 @@ export declare class SemrushAPIClient {
|
|
|
32
33
|
getKeywordDifficulty: typeof getKeywordDifficulty;
|
|
33
34
|
getBacklinks: typeof getBacklinks;
|
|
34
35
|
getAnchors: typeof getAnchors;
|
|
36
|
+
getIndexedPages: typeof getIndexedPages;
|
|
35
37
|
}
|
package/dist/client/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const getSemrushRank_1 = require("../overview/getSemrushRank");
|
|
|
17
17
|
const getKeywordDifficulty_1 = require("../keyword/getKeywordDifficulty");
|
|
18
18
|
const getBacklinks_1 = require("../backlinks/getBacklinks");
|
|
19
19
|
const getAnchors_1 = require("../backlinks/getAnchors");
|
|
20
|
+
const getIndexedPages_1 = require("../backlinks/getIndexedPages");
|
|
20
21
|
class SemrushAPIClient {
|
|
21
22
|
client;
|
|
22
23
|
api_key;
|
|
@@ -74,5 +75,6 @@ class SemrushAPIClient {
|
|
|
74
75
|
getKeywordDifficulty = getKeywordDifficulty_1.getKeywordDifficulty;
|
|
75
76
|
getBacklinks = getBacklinks_1.getBacklinks;
|
|
76
77
|
getAnchors = getAnchors_1.getAnchors;
|
|
78
|
+
getIndexedPages = getIndexedPages_1.getIndexedPages;
|
|
77
79
|
}
|
|
78
80
|
exports.SemrushAPIClient = SemrushAPIClient;
|