scrapebadger 0.54.0 → 0.57.0
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 +4 -4
- package/dist/index.d.cts +1407 -42
- package/dist/index.d.ts +1407 -42
- package/dist/index.js +909 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +891 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
10
10
|
|
|
11
11
|
// src/internal/version.ts
|
|
12
|
-
var SDK_VERSION = "0.
|
|
12
|
+
var SDK_VERSION = "0.57.0";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -2587,6 +2587,7 @@ var TwitterClient = class {
|
|
|
2587
2587
|
};
|
|
2588
2588
|
|
|
2589
2589
|
// src/web/client.ts
|
|
2590
|
+
var BATCH_GONE = "Batch jobs are not available: the API answers 501. Send concurrent scrape() calls instead; each one is billed and answered on its own.";
|
|
2590
2591
|
var WebClient = class {
|
|
2591
2592
|
_gen;
|
|
2592
2593
|
client;
|
|
@@ -2624,6 +2625,10 @@ var WebClient = class {
|
|
|
2624
2625
|
if (options.aiPrompt !== void 0) body.ai_prompt = options.aiPrompt;
|
|
2625
2626
|
if (options.rawContent !== void 0) body.raw_content = options.rawContent;
|
|
2626
2627
|
if (options.skipBotDetection !== void 0) body.skip_bot_detection = options.skipBotDetection;
|
|
2628
|
+
if (options.screenshotFullPage !== void 0)
|
|
2629
|
+
body.screenshot_full_page = options.screenshotFullPage;
|
|
2630
|
+
if (options.windowWidth !== void 0) body.window_width = options.windowWidth;
|
|
2631
|
+
if (options.windowHeight !== void 0) body.window_height = options.windowHeight;
|
|
2627
2632
|
if (options.rawContent) {
|
|
2628
2633
|
return this.scrapeRaw(body);
|
|
2629
2634
|
}
|
|
@@ -2676,7 +2681,8 @@ var WebClient = class {
|
|
|
2676
2681
|
* Extract structured data from a web page using AI.
|
|
2677
2682
|
*
|
|
2678
2683
|
* Convenience wrapper around {@link scrape} that enables AI extraction
|
|
2679
|
-
* with the given prompt and defaults to markdown format.
|
|
2684
|
+
* with the given prompt and defaults to markdown format. For CSS/XPath
|
|
2685
|
+
* selectors, or AI extraction by field, use {@link extractData}.
|
|
2680
2686
|
*
|
|
2681
2687
|
* @param url - The URL to extract data from
|
|
2682
2688
|
* @param prompt - Natural language prompt describing what to extract (max 2000 chars)
|
|
@@ -2707,15 +2713,79 @@ var WebClient = class {
|
|
|
2707
2713
|
body
|
|
2708
2714
|
});
|
|
2709
2715
|
}
|
|
2710
|
-
|
|
2711
|
-
|
|
2716
|
+
/**
|
|
2717
|
+
* Render a page in the browser engine and capture a PNG screenshot.
|
|
2718
|
+
*
|
|
2719
|
+
* Billed like a browser scrape plus the proxy tier. A page that loads
|
|
2720
|
+
* without a screenshot is a `502` and costs nothing.
|
|
2721
|
+
*
|
|
2722
|
+
* @param url - The URL to capture
|
|
2723
|
+
* @param options - Viewport, wait and proxy options
|
|
2724
|
+
* @returns The base64 PNG in `screenshot`, and the decoded bytes in `png`
|
|
2725
|
+
*/
|
|
2726
|
+
async screenshot(url, options = {}) {
|
|
2727
|
+
const body = { url };
|
|
2728
|
+
if (options.fullPage !== void 0) body.full_page = options.fullPage;
|
|
2729
|
+
if (options.width !== void 0) body.width = options.width;
|
|
2730
|
+
if (options.height !== void 0) body.height = options.height;
|
|
2731
|
+
if (options.waitFor !== void 0) body.wait_for = options.waitFor;
|
|
2732
|
+
if (options.country !== void 0) body.country = options.country;
|
|
2733
|
+
if (options.proxyTier !== void 0) body.proxy_tier = options.proxyTier;
|
|
2734
|
+
const result = await this.client.request("/v1/web/screenshot", {
|
|
2735
|
+
method: "POST",
|
|
2736
|
+
body
|
|
2737
|
+
});
|
|
2738
|
+
return { ...result, png: Buffer.from(result.screenshot ?? "", "base64") };
|
|
2739
|
+
}
|
|
2740
|
+
/**
|
|
2741
|
+
* Scrape a page and extract fields with CSS/XPath selectors, AI, or both.
|
|
2742
|
+
*
|
|
2743
|
+
* Billed like a scrape, plus the AI extraction credits when AI is asked for
|
|
2744
|
+
* and succeeds. Broken selectors are rejected with `422` before anything is
|
|
2745
|
+
* fetched.
|
|
2746
|
+
*
|
|
2747
|
+
* @param url - The URL to extract from
|
|
2748
|
+
* @param options - At least one of `extractRules`, `aiExtractRules` or `aiQuery`
|
|
2749
|
+
* @returns Selector results in `data` and the AI answer in `ai_extraction`
|
|
2750
|
+
*/
|
|
2751
|
+
async extractData(url, options) {
|
|
2752
|
+
if (!options.extractRules && !options.aiExtractRules && !options.aiQuery) {
|
|
2753
|
+
throw new Error("Provide at least one of extractRules, aiExtractRules or aiQuery");
|
|
2754
|
+
}
|
|
2755
|
+
const body = { url };
|
|
2756
|
+
if (options.extractRules !== void 0) body.extract_rules = options.extractRules;
|
|
2757
|
+
if (options.aiExtractRules !== void 0) body.ai_extract_rules = options.aiExtractRules;
|
|
2758
|
+
if (options.aiQuery !== void 0) body.ai_query = options.aiQuery;
|
|
2759
|
+
if (options.renderJs !== void 0) body.render_js = options.renderJs;
|
|
2760
|
+
if (options.waitFor !== void 0) body.wait_for = options.waitFor;
|
|
2761
|
+
if (options.country !== void 0) body.country = options.country;
|
|
2762
|
+
if (options.proxyTier !== void 0) body.proxy_tier = options.proxyTier;
|
|
2763
|
+
return this.client.request("/v1/web/extract", {
|
|
2764
|
+
method: "POST",
|
|
2765
|
+
body
|
|
2766
|
+
});
|
|
2767
|
+
}
|
|
2768
|
+
/**
|
|
2769
|
+
* Submit batch scraping job.
|
|
2770
|
+
*
|
|
2771
|
+
* @deprecated Batch jobs are not available: the API answers `501` (not
|
|
2772
|
+
* billed). Send concurrent {@link scrape} calls instead.
|
|
2773
|
+
*/
|
|
2712
2774
|
async submitBatchScrapingJob(body, params = {}) {
|
|
2775
|
+
process.emitWarning(BATCH_GONE, "DeprecationWarning");
|
|
2713
2776
|
return this._gen.request("/v1/web/batch", { method: "POST", params, body });
|
|
2714
2777
|
}
|
|
2715
|
-
/**
|
|
2778
|
+
/**
|
|
2779
|
+
* Get batch job status.
|
|
2780
|
+
*
|
|
2781
|
+
* @deprecated Batch jobs are not available: the API answers `501` (not
|
|
2782
|
+
* billed). Send concurrent {@link scrape} calls instead.
|
|
2783
|
+
*/
|
|
2716
2784
|
async getBatchJobStatus(jobId, params = {}) {
|
|
2785
|
+
process.emitWarning(BATCH_GONE, "DeprecationWarning");
|
|
2717
2786
|
return this._gen.request(`/v1/web/batch/${jobId}`, { params });
|
|
2718
2787
|
}
|
|
2788
|
+
// --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
2719
2789
|
/** Extract structured data. Generated from the OpenAPI spec; returns the raw response object. */
|
|
2720
2790
|
async extractStructuredData(body, params = {}) {
|
|
2721
2791
|
return this._gen.request("/v1/web/extract", { method: "POST", params, body });
|
|
@@ -3034,6 +3104,57 @@ var VintedClient = class {
|
|
|
3034
3104
|
// --- END generated by sdk/codegen/facade ---
|
|
3035
3105
|
};
|
|
3036
3106
|
|
|
3107
|
+
// src/google/ads.ts
|
|
3108
|
+
var AdsClient = class {
|
|
3109
|
+
constructor(client) {
|
|
3110
|
+
this.client = client;
|
|
3111
|
+
}
|
|
3112
|
+
/**
|
|
3113
|
+
* Search ad creatives by advertiser ID, verified domain or free text.
|
|
3114
|
+
*
|
|
3115
|
+
* `filters_applied` says which of the requested filters Google actually
|
|
3116
|
+
* honoured.
|
|
3117
|
+
*/
|
|
3118
|
+
async search(params) {
|
|
3119
|
+
return this.client.request("/v1/google/ads/search", {
|
|
3120
|
+
params: { ...params }
|
|
3121
|
+
});
|
|
3122
|
+
}
|
|
3123
|
+
/**
|
|
3124
|
+
* Resolve an advertiser name or domain to advertiser IDs.
|
|
3125
|
+
*
|
|
3126
|
+
* Google's own matching has no typo tolerance: names match by word prefix
|
|
3127
|
+
* and domains by substring. `fuzzy: true` also finds misspelled and
|
|
3128
|
+
* look-alike advertisers; each row then carries `similarity` and
|
|
3129
|
+
* `matched_query`, and the response lists the `variants` searched and
|
|
3130
|
+
* `variants_failed`. `next_page_token` pages the domain rows only.
|
|
3131
|
+
*/
|
|
3132
|
+
async searchAdvertisers(params) {
|
|
3133
|
+
return this.client.request("/v1/google/ads/advertisers", {
|
|
3134
|
+
params: { ...params }
|
|
3135
|
+
});
|
|
3136
|
+
}
|
|
3137
|
+
/**
|
|
3138
|
+
* Get an advertiser's identity plus disclosed spend, ad-format mix and
|
|
3139
|
+
* per-day spend for one region.
|
|
3140
|
+
*/
|
|
3141
|
+
async advertiser(params) {
|
|
3142
|
+
return this.client.request("/v1/google/ads/advertiser", {
|
|
3143
|
+
params: { ...params }
|
|
3144
|
+
});
|
|
3145
|
+
}
|
|
3146
|
+
/**
|
|
3147
|
+
* Get full detail for one creative: media, every rendered size in
|
|
3148
|
+
* `variations`, run dates and, with `political: true`, the advertiser's
|
|
3149
|
+
* political spend disclosure.
|
|
3150
|
+
*/
|
|
3151
|
+
async creative(params) {
|
|
3152
|
+
return this.client.request("/v1/google/ads/creative", {
|
|
3153
|
+
params: { ...params }
|
|
3154
|
+
});
|
|
3155
|
+
}
|
|
3156
|
+
};
|
|
3157
|
+
|
|
3037
3158
|
// src/google/ai-mode.ts
|
|
3038
3159
|
var AiModeClient = class {
|
|
3039
3160
|
constructor(client) {
|
|
@@ -3541,6 +3662,8 @@ var GoogleClient = class {
|
|
|
3541
3662
|
flights;
|
|
3542
3663
|
/** Google Products — immersive product detail. */
|
|
3543
3664
|
products;
|
|
3665
|
+
/** Google Ads Transparency Center — creatives, advertisers, disclosed spend. */
|
|
3666
|
+
ads;
|
|
3544
3667
|
constructor(client) {
|
|
3545
3668
|
this._gen = client;
|
|
3546
3669
|
this.search = new SearchClient2(client);
|
|
@@ -3561,6 +3684,7 @@ var GoogleClient = class {
|
|
|
3561
3684
|
this.shorts = new ShortsClient(client);
|
|
3562
3685
|
this.flights = new FlightsClient(client);
|
|
3563
3686
|
this.products = new ProductsClient(client);
|
|
3687
|
+
this.ads = new AdsClient(client);
|
|
3564
3688
|
}
|
|
3565
3689
|
// --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
3566
3690
|
/** Google AI Overview (inline SERP block). Generated from the OpenAPI spec; returns the raw response object. */
|
|
@@ -5657,7 +5781,7 @@ var TrendingClient = class {
|
|
|
5657
5781
|
};
|
|
5658
5782
|
|
|
5659
5783
|
// src/tiktok/ads.ts
|
|
5660
|
-
var
|
|
5784
|
+
var AdsClient2 = class {
|
|
5661
5785
|
client;
|
|
5662
5786
|
constructor(client) {
|
|
5663
5787
|
this.client = client;
|
|
@@ -5771,7 +5895,7 @@ var TikTokClient = class {
|
|
|
5771
5895
|
this.music = new MusicClient(client);
|
|
5772
5896
|
this.hashtags = new HashtagsClient2(client);
|
|
5773
5897
|
this.trending = new TrendingClient(client);
|
|
5774
|
-
this.ads = new
|
|
5898
|
+
this.ads = new AdsClient2(client);
|
|
5775
5899
|
this.reference = new ReferenceClient4(client);
|
|
5776
5900
|
}
|
|
5777
5901
|
// --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
@@ -6104,7 +6228,13 @@ var FacebookClient = class {
|
|
|
6104
6228
|
async getGroupDetail(groupId, params = {}) {
|
|
6105
6229
|
return this.client.request(`/v1/facebook/groups/${groupId}`, { params });
|
|
6106
6230
|
}
|
|
6107
|
-
/**
|
|
6231
|
+
/**
|
|
6232
|
+
* Get a public group's post feed, 3 posts per page. Generated from the OpenAPI spec; returns the raw response object.
|
|
6233
|
+
*
|
|
6234
|
+
* `params.sort` is `"newest"` (newest first by post time, the default) or `"relevance"`
|
|
6235
|
+
* (Facebook's top-posts ranking). Pass `end_cursor` back as `params.after` while
|
|
6236
|
+
* `has_next_page` for older posts, keeping the same sort.
|
|
6237
|
+
*/
|
|
6108
6238
|
async getGroupPosts(groupId, params = {}) {
|
|
6109
6239
|
return this.client.request(`/v1/facebook/groups/${groupId}/posts`, { params });
|
|
6110
6240
|
}
|
|
@@ -6794,8 +6924,741 @@ var BaiduClient = class {
|
|
|
6794
6924
|
}
|
|
6795
6925
|
};
|
|
6796
6926
|
|
|
6797
|
-
// src/
|
|
6927
|
+
// src/naver/search.ts
|
|
6798
6928
|
var SearchClient12 = class {
|
|
6929
|
+
constructor(client) {
|
|
6930
|
+
this.client = client;
|
|
6931
|
+
}
|
|
6932
|
+
/**
|
|
6933
|
+
* Search naver.com — Korea's top portal web SERP.
|
|
6934
|
+
*
|
|
6935
|
+
* @param query - Search keywords, e.g. `"커피머신"`.
|
|
6936
|
+
* @param params - Optional page (1..40) and `view`.
|
|
6937
|
+
*/
|
|
6938
|
+
async search(query, params = {}) {
|
|
6939
|
+
return this.client.request("/v1/naver/search", {
|
|
6940
|
+
params: { query, page: params.page, view: params.view }
|
|
6941
|
+
});
|
|
6942
|
+
}
|
|
6943
|
+
/**
|
|
6944
|
+
* Search the Naver news vertical.
|
|
6945
|
+
*
|
|
6946
|
+
* @param query - Search keywords.
|
|
6947
|
+
* @param params - Optional page (1..40) and sort.
|
|
6948
|
+
*/
|
|
6949
|
+
async news(query, params = {}) {
|
|
6950
|
+
return this.client.request("/v1/naver/news", {
|
|
6951
|
+
params: { query, page: params.page, sort: params.sort }
|
|
6952
|
+
});
|
|
6953
|
+
}
|
|
6954
|
+
/**
|
|
6955
|
+
* Search the Naver blog vertical.
|
|
6956
|
+
*
|
|
6957
|
+
* @param query - Search keywords.
|
|
6958
|
+
* @param params - Optional page (1..40).
|
|
6959
|
+
*/
|
|
6960
|
+
async blog(query, params = {}) {
|
|
6961
|
+
return this.client.request("/v1/naver/blog", {
|
|
6962
|
+
params: { query, page: params.page }
|
|
6963
|
+
});
|
|
6964
|
+
}
|
|
6965
|
+
/**
|
|
6966
|
+
* Naver search-box suggestions.
|
|
6967
|
+
*
|
|
6968
|
+
* @param query - Partial search term, e.g. `"커피"`.
|
|
6969
|
+
*/
|
|
6970
|
+
async autocomplete(query) {
|
|
6971
|
+
return this.client.request("/v1/naver/autocomplete", {
|
|
6972
|
+
params: { query }
|
|
6973
|
+
});
|
|
6974
|
+
}
|
|
6975
|
+
};
|
|
6976
|
+
|
|
6977
|
+
// src/naver/places.ts
|
|
6978
|
+
var PlacesClient = class {
|
|
6979
|
+
constructor(client) {
|
|
6980
|
+
this.client = client;
|
|
6981
|
+
}
|
|
6982
|
+
/**
|
|
6983
|
+
* Search Naver Place/Local for Korean businesses and venues.
|
|
6984
|
+
*
|
|
6985
|
+
* @param query - Search keywords, e.g. `"강남 카페"`.
|
|
6986
|
+
* @param params - Optional paging (`start`/`display`) and `x`/`y` centre.
|
|
6987
|
+
*
|
|
6988
|
+
* @remarks Passing `start` switches to the paged `placeList` lane.
|
|
6989
|
+
*/
|
|
6990
|
+
async local(query, params = {}) {
|
|
6991
|
+
return this.client.request("/v1/naver/local", {
|
|
6992
|
+
params: {
|
|
6993
|
+
query,
|
|
6994
|
+
start: params.start,
|
|
6995
|
+
display: params.display,
|
|
6996
|
+
x: params.x,
|
|
6997
|
+
y: params.y
|
|
6998
|
+
}
|
|
6999
|
+
});
|
|
7000
|
+
}
|
|
7001
|
+
/**
|
|
7002
|
+
* Get Place detail for a Korean business by its place id.
|
|
7003
|
+
*
|
|
7004
|
+
* @param placeId - Naver Place id (digits), from {@link local}.
|
|
7005
|
+
*/
|
|
7006
|
+
async get(placeId) {
|
|
7007
|
+
return this.client.request(`/v1/naver/place/${placeId}`);
|
|
7008
|
+
}
|
|
7009
|
+
/**
|
|
7010
|
+
* Get Place visitor reviews.
|
|
7011
|
+
*
|
|
7012
|
+
* @param placeId - Naver Place id.
|
|
7013
|
+
* @param params - Optional opaque `cursor` and page `size` (1..50).
|
|
7014
|
+
*/
|
|
7015
|
+
async reviews(placeId, params = {}) {
|
|
7016
|
+
return this.client.request(`/v1/naver/place/${placeId}/reviews`, {
|
|
7017
|
+
params: { cursor: params.cursor, size: params.size }
|
|
7018
|
+
});
|
|
7019
|
+
}
|
|
7020
|
+
/**
|
|
7021
|
+
* Get Place photos (visitor-review or owner/place photos).
|
|
7022
|
+
*
|
|
7023
|
+
* @param placeId - Naver Place id.
|
|
7024
|
+
* @param params - Optional `media_source` and opaque `cursor`.
|
|
7025
|
+
*/
|
|
7026
|
+
async photos(placeId, params = {}) {
|
|
7027
|
+
return this.client.request(`/v1/naver/place/${placeId}/photos`, {
|
|
7028
|
+
params: { media_source: params.media_source, cursor: params.cursor }
|
|
7029
|
+
});
|
|
7030
|
+
}
|
|
7031
|
+
};
|
|
7032
|
+
|
|
7033
|
+
// src/naver/shopping.ts
|
|
7034
|
+
var ShoppingClient2 = class {
|
|
7035
|
+
constructor(client) {
|
|
7036
|
+
this.client = client;
|
|
7037
|
+
}
|
|
7038
|
+
/**
|
|
7039
|
+
* Bestseller product ranking.
|
|
7040
|
+
*
|
|
7041
|
+
* @param params - Optional category, age bucket, sort and period.
|
|
7042
|
+
*/
|
|
7043
|
+
async bestsellers(params = {}) {
|
|
7044
|
+
return this.client.request("/v1/naver/shopping/bestsellers", {
|
|
7045
|
+
params: {
|
|
7046
|
+
category_id: params.category_id,
|
|
7047
|
+
age_type: params.age_type,
|
|
7048
|
+
sort_type: params.sort_type,
|
|
7049
|
+
period_type: params.period_type
|
|
7050
|
+
}
|
|
7051
|
+
});
|
|
7052
|
+
}
|
|
7053
|
+
/**
|
|
7054
|
+
* Trending shopping keyword ranking.
|
|
7055
|
+
*
|
|
7056
|
+
* @param categoryId - Category id (required; `ALL` returns empty).
|
|
7057
|
+
* @param params - Optional age bucket, sort and period.
|
|
7058
|
+
*/
|
|
7059
|
+
async keywords(categoryId, params = {}) {
|
|
7060
|
+
return this.client.request("/v1/naver/shopping/keywords", {
|
|
7061
|
+
params: {
|
|
7062
|
+
category_id: categoryId,
|
|
7063
|
+
age_type: params.age_type,
|
|
7064
|
+
sort_type: params.sort_type,
|
|
7065
|
+
period_type: params.period_type
|
|
7066
|
+
}
|
|
7067
|
+
});
|
|
7068
|
+
}
|
|
7069
|
+
/**
|
|
7070
|
+
* DataLab Shopping Insight — category keyword rank over a date range.
|
|
7071
|
+
*
|
|
7072
|
+
* @param categoryId - DataLab cid, e.g. `"50000000"`.
|
|
7073
|
+
* @param startDate - Range start, `YYYY-MM-DD`.
|
|
7074
|
+
* @param endDate - Range end, `YYYY-MM-DD`.
|
|
7075
|
+
* @param params - Optional time unit, demographics and count.
|
|
7076
|
+
*/
|
|
7077
|
+
async insight(categoryId, startDate, endDate, params = {}) {
|
|
7078
|
+
return this.client.request("/v1/naver/shopping/insight", {
|
|
7079
|
+
params: {
|
|
7080
|
+
category_id: categoryId,
|
|
7081
|
+
start_date: startDate,
|
|
7082
|
+
end_date: endDate,
|
|
7083
|
+
time_unit: params.time_unit,
|
|
7084
|
+
age: params.age,
|
|
7085
|
+
gender: params.gender,
|
|
7086
|
+
device: params.device,
|
|
7087
|
+
count: params.count
|
|
7088
|
+
}
|
|
7089
|
+
});
|
|
7090
|
+
}
|
|
7091
|
+
/**
|
|
7092
|
+
* Static top-level shopping taxonomy (11 cids). Costs 0 credits.
|
|
7093
|
+
*/
|
|
7094
|
+
async categories() {
|
|
7095
|
+
return this.client.request("/v1/naver/shopping/categories");
|
|
7096
|
+
}
|
|
7097
|
+
/**
|
|
7098
|
+
* Product search via the mobile integrated-search finder preview.
|
|
7099
|
+
*
|
|
7100
|
+
* @param query - Search keywords.
|
|
7101
|
+
* @param params - Optional `tab` (`m_view` | `m_shop`).
|
|
7102
|
+
*/
|
|
7103
|
+
async searchProducts(query, params = {}) {
|
|
7104
|
+
return this.client.request("/v1/naver/shopping/search-products", {
|
|
7105
|
+
params: { query, tab: params.tab }
|
|
7106
|
+
});
|
|
7107
|
+
}
|
|
7108
|
+
/**
|
|
7109
|
+
* Query-dependent filter facets (BRAND / ATTRIBUTE) for a search term.
|
|
7110
|
+
*
|
|
7111
|
+
* @param query - Search keywords.
|
|
7112
|
+
*/
|
|
7113
|
+
async searchFilters(query) {
|
|
7114
|
+
return this.client.request("/v1/naver/shopping/search-filters", {
|
|
7115
|
+
params: { query }
|
|
7116
|
+
});
|
|
7117
|
+
}
|
|
7118
|
+
/**
|
|
7119
|
+
* Curated deal products (snxbest), gender-scoped.
|
|
7120
|
+
*
|
|
7121
|
+
* @param gender - `"M"` or `"F"` (required; blank returns `[]` upstream).
|
|
7122
|
+
*/
|
|
7123
|
+
async deals(gender) {
|
|
7124
|
+
return this.client.request("/v1/naver/shopping/deals", {
|
|
7125
|
+
params: { gender }
|
|
7126
|
+
});
|
|
7127
|
+
}
|
|
7128
|
+
/**
|
|
7129
|
+
* Curated products for a snxbest vertical.
|
|
7130
|
+
*
|
|
7131
|
+
* @param vertical - `fashiontown`, `shoppinglive` or `logistics`.
|
|
7132
|
+
*/
|
|
7133
|
+
async vertical(vertical) {
|
|
7134
|
+
return this.client.request(`/v1/naver/shopping/verticals/${vertical}`);
|
|
7135
|
+
}
|
|
7136
|
+
/**
|
|
7137
|
+
* Curated IT item card list.
|
|
7138
|
+
*/
|
|
7139
|
+
async itItems() {
|
|
7140
|
+
return this.client.request("/v1/naver/shopping/it-items");
|
|
7141
|
+
}
|
|
7142
|
+
/**
|
|
7143
|
+
* Ranking category tree — DIV1 roots, or the DIV2 children of `parent_id`.
|
|
7144
|
+
*
|
|
7145
|
+
* @param params - Optional `parent_id`.
|
|
7146
|
+
*/
|
|
7147
|
+
async categoryTree(params = {}) {
|
|
7148
|
+
return this.client.request("/v1/naver/shopping/category-tree", {
|
|
7149
|
+
params: { parent_id: params.parent_id }
|
|
7150
|
+
});
|
|
7151
|
+
}
|
|
7152
|
+
/**
|
|
7153
|
+
* Filtered finder products via the ns-portal BFF (finite 10 pages x 8 slots).
|
|
7154
|
+
*
|
|
7155
|
+
* @param query - Search keywords.
|
|
7156
|
+
* @param params - Optional `brand_id` and `attribute_id` filters.
|
|
7157
|
+
*/
|
|
7158
|
+
async searchFiltered(query, params = {}) {
|
|
7159
|
+
return this.client.request("/v1/naver/shopping/search-filtered", {
|
|
7160
|
+
params: { query, brand_id: params.brand_id, attribute_id: params.attribute_id }
|
|
7161
|
+
});
|
|
7162
|
+
}
|
|
7163
|
+
/**
|
|
7164
|
+
* snxbest brand ranking (top 20 fixed list).
|
|
7165
|
+
*
|
|
7166
|
+
* @param params - Optional category, age bucket, sort and period.
|
|
7167
|
+
*/
|
|
7168
|
+
async brandRank(params = {}) {
|
|
7169
|
+
return this.client.request("/v1/naver/shopping/brand-rank", {
|
|
7170
|
+
params: {
|
|
7171
|
+
category_id: params.category_id,
|
|
7172
|
+
age_type: params.age_type,
|
|
7173
|
+
sort_type: params.sort_type,
|
|
7174
|
+
period_type: params.period_type
|
|
7175
|
+
}
|
|
7176
|
+
});
|
|
7177
|
+
}
|
|
7178
|
+
/**
|
|
7179
|
+
* snxbest brand-ranking category tree (DIV1, or DIV2 children).
|
|
7180
|
+
*
|
|
7181
|
+
* @param params - Optional `parent_id`.
|
|
7182
|
+
*/
|
|
7183
|
+
async brandCategories(params = {}) {
|
|
7184
|
+
return this.client.request("/v1/naver/shopping/brand-categories", {
|
|
7185
|
+
params: { parent_id: params.parent_id }
|
|
7186
|
+
});
|
|
7187
|
+
}
|
|
7188
|
+
/**
|
|
7189
|
+
* Available snxbest keyword-rank periods.
|
|
7190
|
+
*
|
|
7191
|
+
* @param params - Optional category, age bucket, sort and period.
|
|
7192
|
+
*/
|
|
7193
|
+
async keywordPeriods(params = {}) {
|
|
7194
|
+
return this.client.request("/v1/naver/shopping/keyword-periods", {
|
|
7195
|
+
params: {
|
|
7196
|
+
category_id: params.category_id,
|
|
7197
|
+
age_type: params.age_type,
|
|
7198
|
+
sort_type: params.sort_type,
|
|
7199
|
+
period_type: params.period_type
|
|
7200
|
+
}
|
|
7201
|
+
});
|
|
7202
|
+
}
|
|
7203
|
+
/**
|
|
7204
|
+
* Full-catalog shopping search (SSR page 1 + paged-composite-cards XHR).
|
|
7205
|
+
*
|
|
7206
|
+
* @param query - Search keywords (max 200 chars).
|
|
7207
|
+
* @param params - Optional `sort` and `page` (1..5).
|
|
7208
|
+
*/
|
|
7209
|
+
async searchCatalog(query, params = {}) {
|
|
7210
|
+
return this.client.request("/v1/naver/shopping/search-catalog", {
|
|
7211
|
+
params: { query, sort: params.sort, page: params.page }
|
|
7212
|
+
});
|
|
7213
|
+
}
|
|
7214
|
+
/**
|
|
7215
|
+
* Seller offers per catalog product from Naver's price-compare page.
|
|
7216
|
+
*
|
|
7217
|
+
* @param query - Search keywords (max 200 chars).
|
|
7218
|
+
*/
|
|
7219
|
+
async priceCompare(query) {
|
|
7220
|
+
return this.client.request("/v1/naver/shopping/price-compare", {
|
|
7221
|
+
params: { query }
|
|
7222
|
+
});
|
|
7223
|
+
}
|
|
7224
|
+
};
|
|
7225
|
+
|
|
7226
|
+
// src/naver/stores.ts
|
|
7227
|
+
var StoresClient2 = class {
|
|
7228
|
+
constructor(client) {
|
|
7229
|
+
this.client = client;
|
|
7230
|
+
}
|
|
7231
|
+
/**
|
|
7232
|
+
* Store / seller profile.
|
|
7233
|
+
*
|
|
7234
|
+
* @param storeUrl - Store URL slug, e.g. `"plusink"`.
|
|
7235
|
+
* @param params - Optional `host` (`smartstore` | `brand`).
|
|
7236
|
+
*/
|
|
7237
|
+
async get(storeUrl, params = {}) {
|
|
7238
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}`, {
|
|
7239
|
+
params: { host: params.host }
|
|
7240
|
+
});
|
|
7241
|
+
}
|
|
7242
|
+
/**
|
|
7243
|
+
* Store category tree (recursive display categories).
|
|
7244
|
+
*
|
|
7245
|
+
* @param storeUrl - Store URL slug.
|
|
7246
|
+
* @param params - Optional `host`.
|
|
7247
|
+
*/
|
|
7248
|
+
async categories(storeUrl, params = {}) {
|
|
7249
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}/categories`, {
|
|
7250
|
+
params: { host: params.host }
|
|
7251
|
+
});
|
|
7252
|
+
}
|
|
7253
|
+
/**
|
|
7254
|
+
* Store product listing (listing-card union, not full detail).
|
|
7255
|
+
*
|
|
7256
|
+
* @param storeUrl - Store URL slug.
|
|
7257
|
+
* @param params - Optional host, category, paging, sort and `channel_uid`.
|
|
7258
|
+
*/
|
|
7259
|
+
async products(storeUrl, params = {}) {
|
|
7260
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}/products`, {
|
|
7261
|
+
params: {
|
|
7262
|
+
host: params.host,
|
|
7263
|
+
category_id: params.category_id,
|
|
7264
|
+
page: params.page,
|
|
7265
|
+
size: params.size,
|
|
7266
|
+
sort: params.sort,
|
|
7267
|
+
channel_uid: params.channel_uid
|
|
7268
|
+
}
|
|
7269
|
+
});
|
|
7270
|
+
}
|
|
7271
|
+
/**
|
|
7272
|
+
* Store bestseller list.
|
|
7273
|
+
*
|
|
7274
|
+
* @param storeUrl - Store URL slug.
|
|
7275
|
+
* @param params - Optional host and `period`.
|
|
7276
|
+
*/
|
|
7277
|
+
async bestsellers(storeUrl, params = {}) {
|
|
7278
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}/bestsellers`, {
|
|
7279
|
+
params: { host: params.host, period: params.period }
|
|
7280
|
+
});
|
|
7281
|
+
}
|
|
7282
|
+
};
|
|
7283
|
+
|
|
7284
|
+
// src/naver/content.ts
|
|
7285
|
+
var ContentClient = class {
|
|
7286
|
+
constructor(client) {
|
|
7287
|
+
this.client = client;
|
|
7288
|
+
}
|
|
7289
|
+
/**
|
|
7290
|
+
* Web vertical SERP (15 docs/page).
|
|
7291
|
+
*
|
|
7292
|
+
* @param query - Search keywords.
|
|
7293
|
+
* @param params - Optional page (1-based).
|
|
7294
|
+
*/
|
|
7295
|
+
async searchWeb(query, params = {}) {
|
|
7296
|
+
return this.client.request("/v1/naver/search/web", {
|
|
7297
|
+
params: { query, page: params.page }
|
|
7298
|
+
});
|
|
7299
|
+
}
|
|
7300
|
+
/**
|
|
7301
|
+
* Cafe vertical SERP (30/page).
|
|
7302
|
+
*
|
|
7303
|
+
* @param query - Search keywords.
|
|
7304
|
+
* @param params - Optional page (1-based).
|
|
7305
|
+
*/
|
|
7306
|
+
async cafe(query, params = {}) {
|
|
7307
|
+
return this.client.request("/v1/naver/cafe", {
|
|
7308
|
+
params: { query, page: params.page }
|
|
7309
|
+
});
|
|
7310
|
+
}
|
|
7311
|
+
/**
|
|
7312
|
+
* Knowledge iN vertical SERP (10/page).
|
|
7313
|
+
*
|
|
7314
|
+
* @param query - Search keywords.
|
|
7315
|
+
* @param params - Optional page (1-based).
|
|
7316
|
+
*/
|
|
7317
|
+
async kin(query, params = {}) {
|
|
7318
|
+
return this.client.request("/v1/naver/kin", {
|
|
7319
|
+
params: { query, page: params.page }
|
|
7320
|
+
});
|
|
7321
|
+
}
|
|
7322
|
+
/**
|
|
7323
|
+
* Image vertical SERP (JSON API, 100/page).
|
|
7324
|
+
*
|
|
7325
|
+
* @param query - Search keywords.
|
|
7326
|
+
* @param params - Optional page (1-based).
|
|
7327
|
+
*/
|
|
7328
|
+
async image(query, params = {}) {
|
|
7329
|
+
return this.client.request("/v1/naver/image", {
|
|
7330
|
+
params: { query, page: params.page }
|
|
7331
|
+
});
|
|
7332
|
+
}
|
|
7333
|
+
/**
|
|
7334
|
+
* Video vertical SERP with `/more` pagination (step 48).
|
|
7335
|
+
*
|
|
7336
|
+
* @param query - Search keywords.
|
|
7337
|
+
* @param params - Optional page (1-based).
|
|
7338
|
+
*/
|
|
7339
|
+
async video(query, params = {}) {
|
|
7340
|
+
return this.client.request("/v1/naver/video", {
|
|
7341
|
+
params: { query, page: params.page }
|
|
7342
|
+
});
|
|
7343
|
+
}
|
|
7344
|
+
/**
|
|
7345
|
+
* Clip vertical SERP with `/more` pagination (step 24).
|
|
7346
|
+
*
|
|
7347
|
+
* @param query - Search keywords.
|
|
7348
|
+
* @param params - Optional page (1-based).
|
|
7349
|
+
*/
|
|
7350
|
+
async clip(query, params = {}) {
|
|
7351
|
+
return this.client.request("/v1/naver/clip", {
|
|
7352
|
+
params: { query, page: params.page }
|
|
7353
|
+
});
|
|
7354
|
+
}
|
|
7355
|
+
};
|
|
7356
|
+
|
|
7357
|
+
// src/naver/reviews.ts
|
|
7358
|
+
var ReviewsClient2 = class {
|
|
7359
|
+
constructor(client) {
|
|
7360
|
+
this.client = client;
|
|
7361
|
+
}
|
|
7362
|
+
/**
|
|
7363
|
+
* Commerce review detail by id.
|
|
7364
|
+
*
|
|
7365
|
+
* @param reviewId - Commerce review id.
|
|
7366
|
+
*/
|
|
7367
|
+
async get(reviewId) {
|
|
7368
|
+
return this.client.request(`/v1/naver/reviews/${reviewId}`);
|
|
7369
|
+
}
|
|
7370
|
+
/**
|
|
7371
|
+
* SSR page query recipes for a review (continuation helper).
|
|
7372
|
+
*
|
|
7373
|
+
* @param reviewId - Commerce review id.
|
|
7374
|
+
*/
|
|
7375
|
+
async ssrQueries(reviewId) {
|
|
7376
|
+
return this.client.request(`/v1/naver/reviews/${reviewId}/ssr-queries`);
|
|
7377
|
+
}
|
|
7378
|
+
/**
|
|
7379
|
+
* Video playback key minted from `attachVid` + `videoStamp`.
|
|
7380
|
+
*
|
|
7381
|
+
* @param attachVid - The `attachVid` from a review attachment.
|
|
7382
|
+
* @param stamp - The `videoStamp` from `reviewAttaches[]` type M.
|
|
7383
|
+
*/
|
|
7384
|
+
async videoInkey(attachVid, stamp) {
|
|
7385
|
+
return this.client.request("/v1/naver/reviews/video-inkey", {
|
|
7386
|
+
params: { attach_vid: attachVid, stamp }
|
|
7387
|
+
});
|
|
7388
|
+
}
|
|
7389
|
+
/**
|
|
7390
|
+
* Product rating summary (star distribution, media/type counts).
|
|
7391
|
+
*
|
|
7392
|
+
* @param originProductNo - Origin product no.
|
|
7393
|
+
* @param params - Optional `leaf_category_id` (derived from the product
|
|
7394
|
+
* detail category when omitted).
|
|
7395
|
+
*/
|
|
7396
|
+
async productReviewSummary(originProductNo, params = {}) {
|
|
7397
|
+
return this.client.request(
|
|
7398
|
+
`/v1/naver/products/${originProductNo}/review-summary`,
|
|
7399
|
+
{ params: { leaf_category_id: params.leaf_category_id } }
|
|
7400
|
+
);
|
|
7401
|
+
}
|
|
7402
|
+
/**
|
|
7403
|
+
* Paginated product review list.
|
|
7404
|
+
*
|
|
7405
|
+
* @param originProductNo - Origin product no.
|
|
7406
|
+
* @param params - `store_url` and `product_no` are required; host, cursor
|
|
7407
|
+
* fields, page and sort are optional.
|
|
7408
|
+
*/
|
|
7409
|
+
async productReviews(originProductNo, params) {
|
|
7410
|
+
return this.client.request(`/v1/naver/products/${originProductNo}/reviews`, {
|
|
7411
|
+
params: {
|
|
7412
|
+
store_url: params.store_url,
|
|
7413
|
+
product_no: params.product_no,
|
|
7414
|
+
host: params.host,
|
|
7415
|
+
channel_uid: params.channel_uid,
|
|
7416
|
+
checkout_merchant_no: params.checkout_merchant_no,
|
|
7417
|
+
page: params.page,
|
|
7418
|
+
sort: params.sort
|
|
7419
|
+
}
|
|
7420
|
+
});
|
|
7421
|
+
}
|
|
7422
|
+
/**
|
|
7423
|
+
* Paginated product Q&A list (the list payload carries no answer body).
|
|
7424
|
+
*
|
|
7425
|
+
* @param originProductNo - Origin product no.
|
|
7426
|
+
* @param params - `store_url` and `product_no` are required; `channel_uid`
|
|
7427
|
+
* is required for `host: "smartstore"`.
|
|
7428
|
+
*/
|
|
7429
|
+
async productQnas(originProductNo, params) {
|
|
7430
|
+
return this.client.request(`/v1/naver/products/${originProductNo}/qnas`, {
|
|
7431
|
+
params: {
|
|
7432
|
+
store_url: params.store_url,
|
|
7433
|
+
product_no: params.product_no,
|
|
7434
|
+
host: params.host,
|
|
7435
|
+
channel_uid: params.channel_uid,
|
|
7436
|
+
page: params.page
|
|
7437
|
+
}
|
|
7438
|
+
});
|
|
7439
|
+
}
|
|
7440
|
+
/**
|
|
7441
|
+
* Storefront variant-group graph (groupId + member originProductNos).
|
|
7442
|
+
*
|
|
7443
|
+
* @param originProductNo - Origin product no.
|
|
7444
|
+
*/
|
|
7445
|
+
async productGroup(originProductNo) {
|
|
7446
|
+
return this.client.request(`/v1/naver/products/${originProductNo}/group`);
|
|
7447
|
+
}
|
|
7448
|
+
/**
|
|
7449
|
+
* Group-level rating summary (same shape as the product review summary).
|
|
7450
|
+
*
|
|
7451
|
+
* @param groupProductNo - Group product no.
|
|
7452
|
+
* @param leafCategoryId - Leaf category id (required).
|
|
7453
|
+
*/
|
|
7454
|
+
async groupReviewSummary(groupProductNo, leafCategoryId) {
|
|
7455
|
+
return this.client.request(
|
|
7456
|
+
`/v1/naver/product-groups/${groupProductNo}/review-summary`,
|
|
7457
|
+
{ params: { leaf_category_id: leafCategoryId } }
|
|
7458
|
+
);
|
|
7459
|
+
}
|
|
7460
|
+
};
|
|
7461
|
+
|
|
7462
|
+
// src/naver/products.ts
|
|
7463
|
+
var ProductsClient5 = class {
|
|
7464
|
+
constructor(client) {
|
|
7465
|
+
this.client = client;
|
|
7466
|
+
}
|
|
7467
|
+
/**
|
|
7468
|
+
* Get commerce product detail.
|
|
7469
|
+
*
|
|
7470
|
+
* @param productNo - `channelProductNo` (the storefront `/products/{no}` id).
|
|
7471
|
+
* @param params - Optional host, `store_url` (required when `channel_uid` is
|
|
7472
|
+
* omitted), `channel_uid`, and SmartStore partial-enrich hints.
|
|
7473
|
+
*/
|
|
7474
|
+
async get(productNo, params = {}) {
|
|
7475
|
+
return this.client.request(`/v1/naver/products/${productNo}`, {
|
|
7476
|
+
params: {
|
|
7477
|
+
host: params.host,
|
|
7478
|
+
store_url: params.store_url,
|
|
7479
|
+
channel_uid: params.channel_uid,
|
|
7480
|
+
broadcast_id: params.broadcast_id,
|
|
7481
|
+
live_channel_id: params.live_channel_id,
|
|
7482
|
+
query: params.query
|
|
7483
|
+
}
|
|
7484
|
+
});
|
|
7485
|
+
}
|
|
7486
|
+
};
|
|
7487
|
+
|
|
7488
|
+
// src/naver/live.ts
|
|
7489
|
+
var ShoppingLiveClient = class {
|
|
7490
|
+
constructor(client) {
|
|
7491
|
+
this.client = client;
|
|
7492
|
+
}
|
|
7493
|
+
/**
|
|
7494
|
+
* Shopping Live search standby keyword ranking.
|
|
7495
|
+
*/
|
|
7496
|
+
async searchKeywords() {
|
|
7497
|
+
return this.client.request("/v1/naver/shopping/live/search/keywords");
|
|
7498
|
+
}
|
|
7499
|
+
/**
|
|
7500
|
+
* Broadcast detail by id, including embedded `shoppingProducts`.
|
|
7501
|
+
*
|
|
7502
|
+
* @param broadcastId - Broadcast id.
|
|
7503
|
+
*/
|
|
7504
|
+
async broadcast(broadcastId) {
|
|
7505
|
+
return this.client.request(`/v1/naver/shopping/live/broadcasts/${broadcastId}`);
|
|
7506
|
+
}
|
|
7507
|
+
/**
|
|
7508
|
+
* Paginated product list for one broadcast.
|
|
7509
|
+
*
|
|
7510
|
+
* @param broadcastId - Broadcast id.
|
|
7511
|
+
* @param params - Optional 0-based `page` and `size` (1..200).
|
|
7512
|
+
*/
|
|
7513
|
+
async broadcastProducts(broadcastId, params = {}) {
|
|
7514
|
+
return this.client.request(
|
|
7515
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/products`,
|
|
7516
|
+
{ params: { page: params.page, size: params.size } }
|
|
7517
|
+
);
|
|
7518
|
+
}
|
|
7519
|
+
/**
|
|
7520
|
+
* Broadcast viewer / like / comment counts.
|
|
7521
|
+
*
|
|
7522
|
+
* @param broadcastId - Broadcast id.
|
|
7523
|
+
*/
|
|
7524
|
+
async broadcastCounts(broadcastId) {
|
|
7525
|
+
return this.client.request(
|
|
7526
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/counts`
|
|
7527
|
+
);
|
|
7528
|
+
}
|
|
7529
|
+
/**
|
|
7530
|
+
* Shopping Live channel / store profile.
|
|
7531
|
+
*
|
|
7532
|
+
* @param channelId - Channel id.
|
|
7533
|
+
*/
|
|
7534
|
+
async channel(channelId) {
|
|
7535
|
+
return this.client.request(`/v1/naver/shopping/live/channels/${channelId}`);
|
|
7536
|
+
}
|
|
7537
|
+
/**
|
|
7538
|
+
* Channel product list.
|
|
7539
|
+
*
|
|
7540
|
+
* @param channelId - Channel id.
|
|
7541
|
+
* @param params - Optional `next` cursor and `size` (1..100).
|
|
7542
|
+
*/
|
|
7543
|
+
async channelProducts(channelId, params = {}) {
|
|
7544
|
+
return this.client.request(
|
|
7545
|
+
`/v1/naver/shopping/live/channels/${channelId}/products`,
|
|
7546
|
+
{ params: { next: params.next, size: params.size } }
|
|
7547
|
+
);
|
|
7548
|
+
}
|
|
7549
|
+
/**
|
|
7550
|
+
* Channel broadcast list, including upcoming STANDBY schedule cards.
|
|
7551
|
+
*
|
|
7552
|
+
* @param channelId - Channel id.
|
|
7553
|
+
*/
|
|
7554
|
+
async channelBroadcasts(channelId) {
|
|
7555
|
+
return this.client.request(
|
|
7556
|
+
`/v1/naver/shopping/live/channels/${channelId}/broadcasts`
|
|
7557
|
+
);
|
|
7558
|
+
}
|
|
7559
|
+
/**
|
|
7560
|
+
* Channel shorts / clips list.
|
|
7561
|
+
*
|
|
7562
|
+
* @param channelId - Channel id.
|
|
7563
|
+
* @param params - Optional `sort_type`, `next` cursor and `size` (1..100).
|
|
7564
|
+
*/
|
|
7565
|
+
async channelShortclips(channelId, params = {}) {
|
|
7566
|
+
return this.client.request(
|
|
7567
|
+
`/v1/naver/shopping/live/channels/${channelId}/shortclips`,
|
|
7568
|
+
{ params: { sort_type: params.sort_type, next: params.next, size: params.size } }
|
|
7569
|
+
);
|
|
7570
|
+
}
|
|
7571
|
+
/**
|
|
7572
|
+
* Shortclip detail with embedded products and categories.
|
|
7573
|
+
*
|
|
7574
|
+
* @param shortclipId - Shortclip id.
|
|
7575
|
+
*/
|
|
7576
|
+
async shortclip(shortclipId) {
|
|
7577
|
+
return this.client.request(`/v1/naver/shopping/live/shortclips/${shortclipId}`);
|
|
7578
|
+
}
|
|
7579
|
+
/**
|
|
7580
|
+
* Paginated shortclip product list.
|
|
7581
|
+
*
|
|
7582
|
+
* @param shortclipId - Shortclip id.
|
|
7583
|
+
* @param params - Optional `attachment_type`, 0-based `page`, `size` (1..100)
|
|
7584
|
+
* and `sort`.
|
|
7585
|
+
*/
|
|
7586
|
+
async shortclipProducts(shortclipId, params = {}) {
|
|
7587
|
+
return this.client.request(
|
|
7588
|
+
`/v1/naver/shopping/live/shortclips/${shortclipId}/products`,
|
|
7589
|
+
{
|
|
7590
|
+
params: {
|
|
7591
|
+
attachment_type: params.attachment_type,
|
|
7592
|
+
page: params.page,
|
|
7593
|
+
size: params.size,
|
|
7594
|
+
sort: params.sort
|
|
7595
|
+
}
|
|
7596
|
+
}
|
|
7597
|
+
);
|
|
7598
|
+
}
|
|
7599
|
+
/**
|
|
7600
|
+
* Replay product timeline of an ended broadcast.
|
|
7601
|
+
*
|
|
7602
|
+
* @param broadcastId - Broadcast id.
|
|
7603
|
+
* @param params - Optional `include_before` and `next` cursor (`0` = start).
|
|
7604
|
+
*/
|
|
7605
|
+
async replayProducts(broadcastId, params = {}) {
|
|
7606
|
+
return this.client.request(
|
|
7607
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/replay-products`,
|
|
7608
|
+
{ params: { include_before: params.include_before, next: params.next } }
|
|
7609
|
+
);
|
|
7610
|
+
}
|
|
7611
|
+
/**
|
|
7612
|
+
* Product categories present in a broadcast.
|
|
7613
|
+
*
|
|
7614
|
+
* @param broadcastId - Broadcast id.
|
|
7615
|
+
* @param params - Optional `attachment_type`.
|
|
7616
|
+
*/
|
|
7617
|
+
async broadcastProductCategories(broadcastId, params = {}) {
|
|
7618
|
+
return this.client.request(
|
|
7619
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/product-categories`,
|
|
7620
|
+
{ params: { attachment_type: params.attachment_type } }
|
|
7621
|
+
);
|
|
7622
|
+
}
|
|
7623
|
+
};
|
|
7624
|
+
|
|
7625
|
+
// src/naver/client.ts
|
|
7626
|
+
var NaverClient = class {
|
|
7627
|
+
/** Web / news / blog search and autocomplete */
|
|
7628
|
+
search;
|
|
7629
|
+
/** Local search, Place detail, reviews and photos */
|
|
7630
|
+
places;
|
|
7631
|
+
/** Shopping search, rankings, DataLab insight and category trees */
|
|
7632
|
+
shopping;
|
|
7633
|
+
/** SmartStore / brand-store profile, categories, products and bestsellers */
|
|
7634
|
+
stores;
|
|
7635
|
+
/** Web, cafe, kin, image, video and clip SERP verticals */
|
|
7636
|
+
content;
|
|
7637
|
+
/** Commerce reviews, Q&A, product-group graphs and summaries */
|
|
7638
|
+
reviews;
|
|
7639
|
+
/** Commerce product detail */
|
|
7640
|
+
products;
|
|
7641
|
+
/** Shopping Live broadcasts, channels and shortclips */
|
|
7642
|
+
live;
|
|
7643
|
+
/**
|
|
7644
|
+
* Create a new Naver client.
|
|
7645
|
+
*
|
|
7646
|
+
* @param client - The base HTTP client for making requests.
|
|
7647
|
+
*/
|
|
7648
|
+
constructor(client) {
|
|
7649
|
+
this.search = new SearchClient12(client);
|
|
7650
|
+
this.places = new PlacesClient(client);
|
|
7651
|
+
this.shopping = new ShoppingClient2(client);
|
|
7652
|
+
this.stores = new StoresClient2(client);
|
|
7653
|
+
this.content = new ContentClient(client);
|
|
7654
|
+
this.reviews = new ReviewsClient2(client);
|
|
7655
|
+
this.products = new ProductsClient5(client);
|
|
7656
|
+
this.live = new ShoppingLiveClient(client);
|
|
7657
|
+
}
|
|
7658
|
+
};
|
|
7659
|
+
|
|
7660
|
+
// src/yahoo/search.ts
|
|
7661
|
+
var SearchClient13 = class {
|
|
6799
7662
|
constructor(client) {
|
|
6800
7663
|
this.client = client;
|
|
6801
7664
|
}
|
|
@@ -6939,7 +7802,7 @@ var YahooClient = class {
|
|
|
6939
7802
|
* @param client - The base HTTP client for making requests.
|
|
6940
7803
|
*/
|
|
6941
7804
|
constructor(client) {
|
|
6942
|
-
this.search = new
|
|
7805
|
+
this.search = new SearchClient13(client);
|
|
6943
7806
|
this.media = new MediaClient4(client);
|
|
6944
7807
|
this.news = new NewsClient3(client);
|
|
6945
7808
|
this.reference = new ReferenceClient9(client);
|
|
@@ -6947,7 +7810,7 @@ var YahooClient = class {
|
|
|
6947
7810
|
};
|
|
6948
7811
|
|
|
6949
7812
|
// src/yandex/search.ts
|
|
6950
|
-
var
|
|
7813
|
+
var SearchClient14 = class {
|
|
6951
7814
|
constructor(client) {
|
|
6952
7815
|
this.client = client;
|
|
6953
7816
|
}
|
|
@@ -7034,14 +7897,14 @@ var YandexClient = class {
|
|
|
7034
7897
|
* @param client - The base HTTP client for making requests.
|
|
7035
7898
|
*/
|
|
7036
7899
|
constructor(client) {
|
|
7037
|
-
this.search = new
|
|
7900
|
+
this.search = new SearchClient14(client);
|
|
7038
7901
|
this.images = new ImagesClient2(client);
|
|
7039
7902
|
this.reference = new ReferenceClient10(client);
|
|
7040
7903
|
}
|
|
7041
7904
|
};
|
|
7042
7905
|
|
|
7043
7906
|
// src/youtube/search.ts
|
|
7044
|
-
var
|
|
7907
|
+
var SearchClient15 = class {
|
|
7045
7908
|
client;
|
|
7046
7909
|
constructor(client) {
|
|
7047
7910
|
this.client = client;
|
|
@@ -7612,7 +8475,7 @@ var YoutubeClient = class {
|
|
|
7612
8475
|
* @param client - The base HTTP client for making requests.
|
|
7613
8476
|
*/
|
|
7614
8477
|
constructor(client) {
|
|
7615
|
-
this.search = new
|
|
8478
|
+
this.search = new SearchClient15(client);
|
|
7616
8479
|
this.videos = new VideosClient3(client);
|
|
7617
8480
|
this.channels = new ChannelsClient(client);
|
|
7618
8481
|
this.playlists = new PlaylistsClient(client);
|
|
@@ -7625,7 +8488,7 @@ var YoutubeClient = class {
|
|
|
7625
8488
|
};
|
|
7626
8489
|
|
|
7627
8490
|
// src/realtor/search.ts
|
|
7628
|
-
var
|
|
8491
|
+
var SearchClient16 = class {
|
|
7629
8492
|
client;
|
|
7630
8493
|
constructor(client) {
|
|
7631
8494
|
this.client = client;
|
|
@@ -7728,14 +8591,14 @@ var RealtorClient = class {
|
|
|
7728
8591
|
* @param client - The base HTTP client for making requests.
|
|
7729
8592
|
*/
|
|
7730
8593
|
constructor(client) {
|
|
7731
|
-
this.search = new
|
|
8594
|
+
this.search = new SearchClient16(client);
|
|
7732
8595
|
this.properties = new PropertiesClient(client);
|
|
7733
8596
|
this.reference = new ReferenceClient12(client);
|
|
7734
8597
|
}
|
|
7735
8598
|
};
|
|
7736
8599
|
|
|
7737
8600
|
// src/leboncoin/search.ts
|
|
7738
|
-
var
|
|
8601
|
+
var SearchClient17 = class {
|
|
7739
8602
|
client;
|
|
7740
8603
|
constructor(client) {
|
|
7741
8604
|
this.client = client;
|
|
@@ -7773,7 +8636,7 @@ var SearchClient16 = class {
|
|
|
7773
8636
|
};
|
|
7774
8637
|
|
|
7775
8638
|
// src/leboncoin/ads.ts
|
|
7776
|
-
var
|
|
8639
|
+
var AdsClient3 = class {
|
|
7777
8640
|
client;
|
|
7778
8641
|
constructor(client) {
|
|
7779
8642
|
this.client = client;
|
|
@@ -7902,15 +8765,15 @@ var LeboncoinClient = class {
|
|
|
7902
8765
|
* @param client - The base HTTP client for making requests.
|
|
7903
8766
|
*/
|
|
7904
8767
|
constructor(client) {
|
|
7905
|
-
this.search = new
|
|
7906
|
-
this.ads = new
|
|
8768
|
+
this.search = new SearchClient17(client);
|
|
8769
|
+
this.ads = new AdsClient3(client);
|
|
7907
8770
|
this.sellers = new SellersClient4(client);
|
|
7908
8771
|
this.reference = new ReferenceClient13(client);
|
|
7909
8772
|
}
|
|
7910
8773
|
};
|
|
7911
8774
|
|
|
7912
8775
|
// src/zillow/search.ts
|
|
7913
|
-
var
|
|
8776
|
+
var SearchClient18 = class {
|
|
7914
8777
|
client;
|
|
7915
8778
|
constructor(client) {
|
|
7916
8779
|
this.client = client;
|
|
@@ -8068,7 +8931,7 @@ var ZillowClient = class {
|
|
|
8068
8931
|
*/
|
|
8069
8932
|
constructor(client) {
|
|
8070
8933
|
this._gen = client;
|
|
8071
|
-
this.search = new
|
|
8934
|
+
this.search = new SearchClient18(client);
|
|
8072
8935
|
this.properties = new PropertiesClient2(client);
|
|
8073
8936
|
this.agent = new AgentClient(client);
|
|
8074
8937
|
this.reference = new ReferenceClient14(client);
|
|
@@ -8216,7 +9079,7 @@ var ImmobiliareClient = class {
|
|
|
8216
9079
|
};
|
|
8217
9080
|
|
|
8218
9081
|
// src/loopnet/search.ts
|
|
8219
|
-
var
|
|
9082
|
+
var SearchClient19 = class {
|
|
8220
9083
|
client;
|
|
8221
9084
|
constructor(client) {
|
|
8222
9085
|
this.client = client;
|
|
@@ -8340,7 +9203,7 @@ var LoopNetClient = class {
|
|
|
8340
9203
|
* @param client - The base HTTP client for making requests.
|
|
8341
9204
|
*/
|
|
8342
9205
|
constructor(client) {
|
|
8343
|
-
this.search = new
|
|
9206
|
+
this.search = new SearchClient19(client);
|
|
8344
9207
|
this.listings = new ListingsClient2(client);
|
|
8345
9208
|
this.brokers = new BrokersClient(client);
|
|
8346
9209
|
this.reference = new ReferenceClient15(client);
|
|
@@ -8976,6 +9839,8 @@ var ScrapeBadger = class {
|
|
|
8976
9839
|
booking;
|
|
8977
9840
|
/** Baidu scraper API client — search, news, images, autocomplete (baidu.com, China's #1 search engine) */
|
|
8978
9841
|
baidu;
|
|
9842
|
+
/** Naver scraper API client — 55 endpoints (search, places, shopping, stores, content, reviews, products, shopping live; naver.com, South Korea) */
|
|
9843
|
+
naver;
|
|
8979
9844
|
/** Yahoo scraper API client — 6 endpoints (search, images, videos, news, autocomplete, markets) across 35 markets */
|
|
8980
9845
|
yahoo;
|
|
8981
9846
|
/** Yandex scraper API client — web search, image search, reverse-image (CBIR), markets (tr/com/ru/by/kz/uz) */
|
|
@@ -9059,6 +9924,7 @@ var ScrapeBadger = class {
|
|
|
9059
9924
|
this.bing = new BingClient(this.baseClient);
|
|
9060
9925
|
this.booking = new BookingClient(this.baseClient);
|
|
9061
9926
|
this.baidu = new BaiduClient(this.baseClient);
|
|
9927
|
+
this.naver = new NaverClient(this.baseClient);
|
|
9062
9928
|
this.yahoo = new YahooClient(this.baseClient);
|
|
9063
9929
|
this.yandex = new YandexClient(this.baseClient);
|
|
9064
9930
|
this.youtube = new YoutubeClient(this.baseClient);
|
|
@@ -9111,6 +9977,7 @@ exports.GeminiAskClient = AskClient2;
|
|
|
9111
9977
|
exports.GeminiBrandClient = BrandClient2;
|
|
9112
9978
|
exports.GeminiClient = GeminiClient;
|
|
9113
9979
|
exports.GeoClient = GeoClient;
|
|
9980
|
+
exports.GoogleAdsClient = AdsClient;
|
|
9114
9981
|
exports.GoogleAiModeClient = AiModeClient;
|
|
9115
9982
|
exports.GoogleAutocompleteClient = AutocompleteClient;
|
|
9116
9983
|
exports.GoogleClient = GoogleClient;
|
|
@@ -9140,10 +10007,10 @@ exports.InstagramMediaClient = MediaClient;
|
|
|
9140
10007
|
exports.InstagramSearchClient = SearchClient4;
|
|
9141
10008
|
exports.InstagramUsersClient = UsersClient4;
|
|
9142
10009
|
exports.InsufficientCreditsError = InsufficientCreditsError;
|
|
9143
|
-
exports.LeboncoinAdsClient =
|
|
10010
|
+
exports.LeboncoinAdsClient = AdsClient3;
|
|
9144
10011
|
exports.LeboncoinClient = LeboncoinClient;
|
|
9145
10012
|
exports.LeboncoinReferenceClient = ReferenceClient13;
|
|
9146
|
-
exports.LeboncoinSearchClient =
|
|
10013
|
+
exports.LeboncoinSearchClient = SearchClient17;
|
|
9147
10014
|
exports.LeboncoinSellersClient = SellersClient4;
|
|
9148
10015
|
exports.LinkedInClient = LinkedInClient;
|
|
9149
10016
|
exports.ListsClient = ListsClient;
|
|
@@ -9151,14 +10018,23 @@ exports.LoopNetBrokersClient = BrokersClient;
|
|
|
9151
10018
|
exports.LoopNetClient = LoopNetClient;
|
|
9152
10019
|
exports.LoopNetListingsClient = ListingsClient2;
|
|
9153
10020
|
exports.LoopNetReferenceClient = ReferenceClient15;
|
|
9154
|
-
exports.LoopNetSearchClient =
|
|
10021
|
+
exports.LoopNetSearchClient = SearchClient19;
|
|
10022
|
+
exports.NaverClient = NaverClient;
|
|
10023
|
+
exports.NaverContentClient = ContentClient;
|
|
10024
|
+
exports.NaverPlacesClient = PlacesClient;
|
|
10025
|
+
exports.NaverProductsClient = ProductsClient5;
|
|
10026
|
+
exports.NaverReviewsClient = ReviewsClient2;
|
|
10027
|
+
exports.NaverSearchClient = SearchClient12;
|
|
10028
|
+
exports.NaverShoppingClient = ShoppingClient2;
|
|
10029
|
+
exports.NaverShoppingLiveClient = ShoppingLiveClient;
|
|
10030
|
+
exports.NaverStoresClient = StoresClient2;
|
|
9155
10031
|
exports.NotFoundError = NotFoundError;
|
|
9156
10032
|
exports.PermissionDeniedError = PermissionDeniedError;
|
|
9157
10033
|
exports.RateLimitError = RateLimitError;
|
|
9158
10034
|
exports.RealtorClient = RealtorClient;
|
|
9159
10035
|
exports.RealtorPropertiesClient = PropertiesClient;
|
|
9160
10036
|
exports.RealtorReferenceClient = ReferenceClient12;
|
|
9161
|
-
exports.RealtorSearchClient =
|
|
10037
|
+
exports.RealtorSearchClient = SearchClient16;
|
|
9162
10038
|
exports.RedditClient = RedditClient;
|
|
9163
10039
|
exports.RedditPostsClient = PostsClient;
|
|
9164
10040
|
exports.RedditSearchClient = SearchClient3;
|
|
@@ -9175,7 +10051,7 @@ exports.ShopeeReviewsClient = ReviewsClient;
|
|
|
9175
10051
|
exports.ShopeeSearchClient = SearchClient6;
|
|
9176
10052
|
exports.SpacesClient = SpacesClient;
|
|
9177
10053
|
exports.StreamClient = StreamClient;
|
|
9178
|
-
exports.TikTokAdsClient =
|
|
10054
|
+
exports.TikTokAdsClient = AdsClient2;
|
|
9179
10055
|
exports.TikTokClient = TikTokClient;
|
|
9180
10056
|
exports.TikTokHashtagsClient = HashtagsClient2;
|
|
9181
10057
|
exports.TikTokMusicClient = MusicClient;
|
|
@@ -9207,18 +10083,18 @@ exports.YahooClient = YahooClient;
|
|
|
9207
10083
|
exports.YahooMediaClient = MediaClient4;
|
|
9208
10084
|
exports.YahooNewsClient = NewsClient3;
|
|
9209
10085
|
exports.YahooReferenceClient = ReferenceClient9;
|
|
9210
|
-
exports.YahooSearchClient =
|
|
10086
|
+
exports.YahooSearchClient = SearchClient13;
|
|
9211
10087
|
exports.YandexClient = YandexClient;
|
|
9212
10088
|
exports.YandexImagesClient = ImagesClient2;
|
|
9213
10089
|
exports.YandexReferenceClient = ReferenceClient10;
|
|
9214
|
-
exports.YandexSearchClient =
|
|
10090
|
+
exports.YandexSearchClient = SearchClient14;
|
|
9215
10091
|
exports.YoutubeChannelsClient = ChannelsClient;
|
|
9216
10092
|
exports.YoutubeClient = YoutubeClient;
|
|
9217
10093
|
exports.YoutubeCommunityClient = CommunityClient;
|
|
9218
10094
|
exports.YoutubeMusicClient = MusicClient2;
|
|
9219
10095
|
exports.YoutubePlaylistsClient = PlaylistsClient;
|
|
9220
10096
|
exports.YoutubeReferenceClient = ReferenceClient11;
|
|
9221
|
-
exports.YoutubeSearchClient =
|
|
10097
|
+
exports.YoutubeSearchClient = SearchClient15;
|
|
9222
10098
|
exports.YoutubeShortsClient = ShortsClient2;
|
|
9223
10099
|
exports.YoutubeTrendingClient = TrendingClient2;
|
|
9224
10100
|
exports.YoutubeVideosClient = VideosClient3;
|
|
@@ -9226,7 +10102,7 @@ exports.ZillowAgentClient = AgentClient;
|
|
|
9226
10102
|
exports.ZillowClient = ZillowClient;
|
|
9227
10103
|
exports.ZillowPropertiesClient = PropertiesClient2;
|
|
9228
10104
|
exports.ZillowReferenceClient = ReferenceClient14;
|
|
9229
|
-
exports.ZillowSearchClient =
|
|
10105
|
+
exports.ZillowSearchClient = SearchClient18;
|
|
9230
10106
|
exports.collectAll = collectAll;
|
|
9231
10107
|
exports.verifyWebhookSignature = verifyWebhookSignature;
|
|
9232
10108
|
//# sourceMappingURL=index.js.map
|