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.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { EventEmitter } from 'events';
|
|
|
3
3
|
import WebSocket from 'ws';
|
|
4
4
|
|
|
5
5
|
// src/internal/version.ts
|
|
6
|
-
var SDK_VERSION = "0.
|
|
6
|
+
var SDK_VERSION = "0.57.0";
|
|
7
7
|
|
|
8
8
|
// src/internal/exceptions.ts
|
|
9
9
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -2581,6 +2581,7 @@ var TwitterClient = class {
|
|
|
2581
2581
|
};
|
|
2582
2582
|
|
|
2583
2583
|
// src/web/client.ts
|
|
2584
|
+
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.";
|
|
2584
2585
|
var WebClient = class {
|
|
2585
2586
|
_gen;
|
|
2586
2587
|
client;
|
|
@@ -2618,6 +2619,10 @@ var WebClient = class {
|
|
|
2618
2619
|
if (options.aiPrompt !== void 0) body.ai_prompt = options.aiPrompt;
|
|
2619
2620
|
if (options.rawContent !== void 0) body.raw_content = options.rawContent;
|
|
2620
2621
|
if (options.skipBotDetection !== void 0) body.skip_bot_detection = options.skipBotDetection;
|
|
2622
|
+
if (options.screenshotFullPage !== void 0)
|
|
2623
|
+
body.screenshot_full_page = options.screenshotFullPage;
|
|
2624
|
+
if (options.windowWidth !== void 0) body.window_width = options.windowWidth;
|
|
2625
|
+
if (options.windowHeight !== void 0) body.window_height = options.windowHeight;
|
|
2621
2626
|
if (options.rawContent) {
|
|
2622
2627
|
return this.scrapeRaw(body);
|
|
2623
2628
|
}
|
|
@@ -2670,7 +2675,8 @@ var WebClient = class {
|
|
|
2670
2675
|
* Extract structured data from a web page using AI.
|
|
2671
2676
|
*
|
|
2672
2677
|
* Convenience wrapper around {@link scrape} that enables AI extraction
|
|
2673
|
-
* with the given prompt and defaults to markdown format.
|
|
2678
|
+
* with the given prompt and defaults to markdown format. For CSS/XPath
|
|
2679
|
+
* selectors, or AI extraction by field, use {@link extractData}.
|
|
2674
2680
|
*
|
|
2675
2681
|
* @param url - The URL to extract data from
|
|
2676
2682
|
* @param prompt - Natural language prompt describing what to extract (max 2000 chars)
|
|
@@ -2701,15 +2707,79 @@ var WebClient = class {
|
|
|
2701
2707
|
body
|
|
2702
2708
|
});
|
|
2703
2709
|
}
|
|
2704
|
-
|
|
2705
|
-
|
|
2710
|
+
/**
|
|
2711
|
+
* Render a page in the browser engine and capture a PNG screenshot.
|
|
2712
|
+
*
|
|
2713
|
+
* Billed like a browser scrape plus the proxy tier. A page that loads
|
|
2714
|
+
* without a screenshot is a `502` and costs nothing.
|
|
2715
|
+
*
|
|
2716
|
+
* @param url - The URL to capture
|
|
2717
|
+
* @param options - Viewport, wait and proxy options
|
|
2718
|
+
* @returns The base64 PNG in `screenshot`, and the decoded bytes in `png`
|
|
2719
|
+
*/
|
|
2720
|
+
async screenshot(url, options = {}) {
|
|
2721
|
+
const body = { url };
|
|
2722
|
+
if (options.fullPage !== void 0) body.full_page = options.fullPage;
|
|
2723
|
+
if (options.width !== void 0) body.width = options.width;
|
|
2724
|
+
if (options.height !== void 0) body.height = options.height;
|
|
2725
|
+
if (options.waitFor !== void 0) body.wait_for = options.waitFor;
|
|
2726
|
+
if (options.country !== void 0) body.country = options.country;
|
|
2727
|
+
if (options.proxyTier !== void 0) body.proxy_tier = options.proxyTier;
|
|
2728
|
+
const result = await this.client.request("/v1/web/screenshot", {
|
|
2729
|
+
method: "POST",
|
|
2730
|
+
body
|
|
2731
|
+
});
|
|
2732
|
+
return { ...result, png: Buffer.from(result.screenshot ?? "", "base64") };
|
|
2733
|
+
}
|
|
2734
|
+
/**
|
|
2735
|
+
* Scrape a page and extract fields with CSS/XPath selectors, AI, or both.
|
|
2736
|
+
*
|
|
2737
|
+
* Billed like a scrape, plus the AI extraction credits when AI is asked for
|
|
2738
|
+
* and succeeds. Broken selectors are rejected with `422` before anything is
|
|
2739
|
+
* fetched.
|
|
2740
|
+
*
|
|
2741
|
+
* @param url - The URL to extract from
|
|
2742
|
+
* @param options - At least one of `extractRules`, `aiExtractRules` or `aiQuery`
|
|
2743
|
+
* @returns Selector results in `data` and the AI answer in `ai_extraction`
|
|
2744
|
+
*/
|
|
2745
|
+
async extractData(url, options) {
|
|
2746
|
+
if (!options.extractRules && !options.aiExtractRules && !options.aiQuery) {
|
|
2747
|
+
throw new Error("Provide at least one of extractRules, aiExtractRules or aiQuery");
|
|
2748
|
+
}
|
|
2749
|
+
const body = { url };
|
|
2750
|
+
if (options.extractRules !== void 0) body.extract_rules = options.extractRules;
|
|
2751
|
+
if (options.aiExtractRules !== void 0) body.ai_extract_rules = options.aiExtractRules;
|
|
2752
|
+
if (options.aiQuery !== void 0) body.ai_query = options.aiQuery;
|
|
2753
|
+
if (options.renderJs !== void 0) body.render_js = options.renderJs;
|
|
2754
|
+
if (options.waitFor !== void 0) body.wait_for = options.waitFor;
|
|
2755
|
+
if (options.country !== void 0) body.country = options.country;
|
|
2756
|
+
if (options.proxyTier !== void 0) body.proxy_tier = options.proxyTier;
|
|
2757
|
+
return this.client.request("/v1/web/extract", {
|
|
2758
|
+
method: "POST",
|
|
2759
|
+
body
|
|
2760
|
+
});
|
|
2761
|
+
}
|
|
2762
|
+
/**
|
|
2763
|
+
* Submit batch scraping job.
|
|
2764
|
+
*
|
|
2765
|
+
* @deprecated Batch jobs are not available: the API answers `501` (not
|
|
2766
|
+
* billed). Send concurrent {@link scrape} calls instead.
|
|
2767
|
+
*/
|
|
2706
2768
|
async submitBatchScrapingJob(body, params = {}) {
|
|
2769
|
+
process.emitWarning(BATCH_GONE, "DeprecationWarning");
|
|
2707
2770
|
return this._gen.request("/v1/web/batch", { method: "POST", params, body });
|
|
2708
2771
|
}
|
|
2709
|
-
/**
|
|
2772
|
+
/**
|
|
2773
|
+
* Get batch job status.
|
|
2774
|
+
*
|
|
2775
|
+
* @deprecated Batch jobs are not available: the API answers `501` (not
|
|
2776
|
+
* billed). Send concurrent {@link scrape} calls instead.
|
|
2777
|
+
*/
|
|
2710
2778
|
async getBatchJobStatus(jobId, params = {}) {
|
|
2779
|
+
process.emitWarning(BATCH_GONE, "DeprecationWarning");
|
|
2711
2780
|
return this._gen.request(`/v1/web/batch/${jobId}`, { params });
|
|
2712
2781
|
}
|
|
2782
|
+
// --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
2713
2783
|
/** Extract structured data. Generated from the OpenAPI spec; returns the raw response object. */
|
|
2714
2784
|
async extractStructuredData(body, params = {}) {
|
|
2715
2785
|
return this._gen.request("/v1/web/extract", { method: "POST", params, body });
|
|
@@ -3028,6 +3098,57 @@ var VintedClient = class {
|
|
|
3028
3098
|
// --- END generated by sdk/codegen/facade ---
|
|
3029
3099
|
};
|
|
3030
3100
|
|
|
3101
|
+
// src/google/ads.ts
|
|
3102
|
+
var AdsClient = class {
|
|
3103
|
+
constructor(client) {
|
|
3104
|
+
this.client = client;
|
|
3105
|
+
}
|
|
3106
|
+
/**
|
|
3107
|
+
* Search ad creatives by advertiser ID, verified domain or free text.
|
|
3108
|
+
*
|
|
3109
|
+
* `filters_applied` says which of the requested filters Google actually
|
|
3110
|
+
* honoured.
|
|
3111
|
+
*/
|
|
3112
|
+
async search(params) {
|
|
3113
|
+
return this.client.request("/v1/google/ads/search", {
|
|
3114
|
+
params: { ...params }
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
/**
|
|
3118
|
+
* Resolve an advertiser name or domain to advertiser IDs.
|
|
3119
|
+
*
|
|
3120
|
+
* Google's own matching has no typo tolerance: names match by word prefix
|
|
3121
|
+
* and domains by substring. `fuzzy: true` also finds misspelled and
|
|
3122
|
+
* look-alike advertisers; each row then carries `similarity` and
|
|
3123
|
+
* `matched_query`, and the response lists the `variants` searched and
|
|
3124
|
+
* `variants_failed`. `next_page_token` pages the domain rows only.
|
|
3125
|
+
*/
|
|
3126
|
+
async searchAdvertisers(params) {
|
|
3127
|
+
return this.client.request("/v1/google/ads/advertisers", {
|
|
3128
|
+
params: { ...params }
|
|
3129
|
+
});
|
|
3130
|
+
}
|
|
3131
|
+
/**
|
|
3132
|
+
* Get an advertiser's identity plus disclosed spend, ad-format mix and
|
|
3133
|
+
* per-day spend for one region.
|
|
3134
|
+
*/
|
|
3135
|
+
async advertiser(params) {
|
|
3136
|
+
return this.client.request("/v1/google/ads/advertiser", {
|
|
3137
|
+
params: { ...params }
|
|
3138
|
+
});
|
|
3139
|
+
}
|
|
3140
|
+
/**
|
|
3141
|
+
* Get full detail for one creative: media, every rendered size in
|
|
3142
|
+
* `variations`, run dates and, with `political: true`, the advertiser's
|
|
3143
|
+
* political spend disclosure.
|
|
3144
|
+
*/
|
|
3145
|
+
async creative(params) {
|
|
3146
|
+
return this.client.request("/v1/google/ads/creative", {
|
|
3147
|
+
params: { ...params }
|
|
3148
|
+
});
|
|
3149
|
+
}
|
|
3150
|
+
};
|
|
3151
|
+
|
|
3031
3152
|
// src/google/ai-mode.ts
|
|
3032
3153
|
var AiModeClient = class {
|
|
3033
3154
|
constructor(client) {
|
|
@@ -3535,6 +3656,8 @@ var GoogleClient = class {
|
|
|
3535
3656
|
flights;
|
|
3536
3657
|
/** Google Products — immersive product detail. */
|
|
3537
3658
|
products;
|
|
3659
|
+
/** Google Ads Transparency Center — creatives, advertisers, disclosed spend. */
|
|
3660
|
+
ads;
|
|
3538
3661
|
constructor(client) {
|
|
3539
3662
|
this._gen = client;
|
|
3540
3663
|
this.search = new SearchClient2(client);
|
|
@@ -3555,6 +3678,7 @@ var GoogleClient = class {
|
|
|
3555
3678
|
this.shorts = new ShortsClient(client);
|
|
3556
3679
|
this.flights = new FlightsClient(client);
|
|
3557
3680
|
this.products = new ProductsClient(client);
|
|
3681
|
+
this.ads = new AdsClient(client);
|
|
3558
3682
|
}
|
|
3559
3683
|
// --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
3560
3684
|
/** Google AI Overview (inline SERP block). Generated from the OpenAPI spec; returns the raw response object. */
|
|
@@ -5651,7 +5775,7 @@ var TrendingClient = class {
|
|
|
5651
5775
|
};
|
|
5652
5776
|
|
|
5653
5777
|
// src/tiktok/ads.ts
|
|
5654
|
-
var
|
|
5778
|
+
var AdsClient2 = class {
|
|
5655
5779
|
client;
|
|
5656
5780
|
constructor(client) {
|
|
5657
5781
|
this.client = client;
|
|
@@ -5765,7 +5889,7 @@ var TikTokClient = class {
|
|
|
5765
5889
|
this.music = new MusicClient(client);
|
|
5766
5890
|
this.hashtags = new HashtagsClient2(client);
|
|
5767
5891
|
this.trending = new TrendingClient(client);
|
|
5768
|
-
this.ads = new
|
|
5892
|
+
this.ads = new AdsClient2(client);
|
|
5769
5893
|
this.reference = new ReferenceClient4(client);
|
|
5770
5894
|
}
|
|
5771
5895
|
// --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
@@ -6098,7 +6222,13 @@ var FacebookClient = class {
|
|
|
6098
6222
|
async getGroupDetail(groupId, params = {}) {
|
|
6099
6223
|
return this.client.request(`/v1/facebook/groups/${groupId}`, { params });
|
|
6100
6224
|
}
|
|
6101
|
-
/**
|
|
6225
|
+
/**
|
|
6226
|
+
* Get a public group's post feed, 3 posts per page. Generated from the OpenAPI spec; returns the raw response object.
|
|
6227
|
+
*
|
|
6228
|
+
* `params.sort` is `"newest"` (newest first by post time, the default) or `"relevance"`
|
|
6229
|
+
* (Facebook's top-posts ranking). Pass `end_cursor` back as `params.after` while
|
|
6230
|
+
* `has_next_page` for older posts, keeping the same sort.
|
|
6231
|
+
*/
|
|
6102
6232
|
async getGroupPosts(groupId, params = {}) {
|
|
6103
6233
|
return this.client.request(`/v1/facebook/groups/${groupId}/posts`, { params });
|
|
6104
6234
|
}
|
|
@@ -6788,8 +6918,741 @@ var BaiduClient = class {
|
|
|
6788
6918
|
}
|
|
6789
6919
|
};
|
|
6790
6920
|
|
|
6791
|
-
// src/
|
|
6921
|
+
// src/naver/search.ts
|
|
6792
6922
|
var SearchClient12 = class {
|
|
6923
|
+
constructor(client) {
|
|
6924
|
+
this.client = client;
|
|
6925
|
+
}
|
|
6926
|
+
/**
|
|
6927
|
+
* Search naver.com — Korea's top portal web SERP.
|
|
6928
|
+
*
|
|
6929
|
+
* @param query - Search keywords, e.g. `"커피머신"`.
|
|
6930
|
+
* @param params - Optional page (1..40) and `view`.
|
|
6931
|
+
*/
|
|
6932
|
+
async search(query, params = {}) {
|
|
6933
|
+
return this.client.request("/v1/naver/search", {
|
|
6934
|
+
params: { query, page: params.page, view: params.view }
|
|
6935
|
+
});
|
|
6936
|
+
}
|
|
6937
|
+
/**
|
|
6938
|
+
* Search the Naver news vertical.
|
|
6939
|
+
*
|
|
6940
|
+
* @param query - Search keywords.
|
|
6941
|
+
* @param params - Optional page (1..40) and sort.
|
|
6942
|
+
*/
|
|
6943
|
+
async news(query, params = {}) {
|
|
6944
|
+
return this.client.request("/v1/naver/news", {
|
|
6945
|
+
params: { query, page: params.page, sort: params.sort }
|
|
6946
|
+
});
|
|
6947
|
+
}
|
|
6948
|
+
/**
|
|
6949
|
+
* Search the Naver blog vertical.
|
|
6950
|
+
*
|
|
6951
|
+
* @param query - Search keywords.
|
|
6952
|
+
* @param params - Optional page (1..40).
|
|
6953
|
+
*/
|
|
6954
|
+
async blog(query, params = {}) {
|
|
6955
|
+
return this.client.request("/v1/naver/blog", {
|
|
6956
|
+
params: { query, page: params.page }
|
|
6957
|
+
});
|
|
6958
|
+
}
|
|
6959
|
+
/**
|
|
6960
|
+
* Naver search-box suggestions.
|
|
6961
|
+
*
|
|
6962
|
+
* @param query - Partial search term, e.g. `"커피"`.
|
|
6963
|
+
*/
|
|
6964
|
+
async autocomplete(query) {
|
|
6965
|
+
return this.client.request("/v1/naver/autocomplete", {
|
|
6966
|
+
params: { query }
|
|
6967
|
+
});
|
|
6968
|
+
}
|
|
6969
|
+
};
|
|
6970
|
+
|
|
6971
|
+
// src/naver/places.ts
|
|
6972
|
+
var PlacesClient = class {
|
|
6973
|
+
constructor(client) {
|
|
6974
|
+
this.client = client;
|
|
6975
|
+
}
|
|
6976
|
+
/**
|
|
6977
|
+
* Search Naver Place/Local for Korean businesses and venues.
|
|
6978
|
+
*
|
|
6979
|
+
* @param query - Search keywords, e.g. `"강남 카페"`.
|
|
6980
|
+
* @param params - Optional paging (`start`/`display`) and `x`/`y` centre.
|
|
6981
|
+
*
|
|
6982
|
+
* @remarks Passing `start` switches to the paged `placeList` lane.
|
|
6983
|
+
*/
|
|
6984
|
+
async local(query, params = {}) {
|
|
6985
|
+
return this.client.request("/v1/naver/local", {
|
|
6986
|
+
params: {
|
|
6987
|
+
query,
|
|
6988
|
+
start: params.start,
|
|
6989
|
+
display: params.display,
|
|
6990
|
+
x: params.x,
|
|
6991
|
+
y: params.y
|
|
6992
|
+
}
|
|
6993
|
+
});
|
|
6994
|
+
}
|
|
6995
|
+
/**
|
|
6996
|
+
* Get Place detail for a Korean business by its place id.
|
|
6997
|
+
*
|
|
6998
|
+
* @param placeId - Naver Place id (digits), from {@link local}.
|
|
6999
|
+
*/
|
|
7000
|
+
async get(placeId) {
|
|
7001
|
+
return this.client.request(`/v1/naver/place/${placeId}`);
|
|
7002
|
+
}
|
|
7003
|
+
/**
|
|
7004
|
+
* Get Place visitor reviews.
|
|
7005
|
+
*
|
|
7006
|
+
* @param placeId - Naver Place id.
|
|
7007
|
+
* @param params - Optional opaque `cursor` and page `size` (1..50).
|
|
7008
|
+
*/
|
|
7009
|
+
async reviews(placeId, params = {}) {
|
|
7010
|
+
return this.client.request(`/v1/naver/place/${placeId}/reviews`, {
|
|
7011
|
+
params: { cursor: params.cursor, size: params.size }
|
|
7012
|
+
});
|
|
7013
|
+
}
|
|
7014
|
+
/**
|
|
7015
|
+
* Get Place photos (visitor-review or owner/place photos).
|
|
7016
|
+
*
|
|
7017
|
+
* @param placeId - Naver Place id.
|
|
7018
|
+
* @param params - Optional `media_source` and opaque `cursor`.
|
|
7019
|
+
*/
|
|
7020
|
+
async photos(placeId, params = {}) {
|
|
7021
|
+
return this.client.request(`/v1/naver/place/${placeId}/photos`, {
|
|
7022
|
+
params: { media_source: params.media_source, cursor: params.cursor }
|
|
7023
|
+
});
|
|
7024
|
+
}
|
|
7025
|
+
};
|
|
7026
|
+
|
|
7027
|
+
// src/naver/shopping.ts
|
|
7028
|
+
var ShoppingClient2 = class {
|
|
7029
|
+
constructor(client) {
|
|
7030
|
+
this.client = client;
|
|
7031
|
+
}
|
|
7032
|
+
/**
|
|
7033
|
+
* Bestseller product ranking.
|
|
7034
|
+
*
|
|
7035
|
+
* @param params - Optional category, age bucket, sort and period.
|
|
7036
|
+
*/
|
|
7037
|
+
async bestsellers(params = {}) {
|
|
7038
|
+
return this.client.request("/v1/naver/shopping/bestsellers", {
|
|
7039
|
+
params: {
|
|
7040
|
+
category_id: params.category_id,
|
|
7041
|
+
age_type: params.age_type,
|
|
7042
|
+
sort_type: params.sort_type,
|
|
7043
|
+
period_type: params.period_type
|
|
7044
|
+
}
|
|
7045
|
+
});
|
|
7046
|
+
}
|
|
7047
|
+
/**
|
|
7048
|
+
* Trending shopping keyword ranking.
|
|
7049
|
+
*
|
|
7050
|
+
* @param categoryId - Category id (required; `ALL` returns empty).
|
|
7051
|
+
* @param params - Optional age bucket, sort and period.
|
|
7052
|
+
*/
|
|
7053
|
+
async keywords(categoryId, params = {}) {
|
|
7054
|
+
return this.client.request("/v1/naver/shopping/keywords", {
|
|
7055
|
+
params: {
|
|
7056
|
+
category_id: categoryId,
|
|
7057
|
+
age_type: params.age_type,
|
|
7058
|
+
sort_type: params.sort_type,
|
|
7059
|
+
period_type: params.period_type
|
|
7060
|
+
}
|
|
7061
|
+
});
|
|
7062
|
+
}
|
|
7063
|
+
/**
|
|
7064
|
+
* DataLab Shopping Insight — category keyword rank over a date range.
|
|
7065
|
+
*
|
|
7066
|
+
* @param categoryId - DataLab cid, e.g. `"50000000"`.
|
|
7067
|
+
* @param startDate - Range start, `YYYY-MM-DD`.
|
|
7068
|
+
* @param endDate - Range end, `YYYY-MM-DD`.
|
|
7069
|
+
* @param params - Optional time unit, demographics and count.
|
|
7070
|
+
*/
|
|
7071
|
+
async insight(categoryId, startDate, endDate, params = {}) {
|
|
7072
|
+
return this.client.request("/v1/naver/shopping/insight", {
|
|
7073
|
+
params: {
|
|
7074
|
+
category_id: categoryId,
|
|
7075
|
+
start_date: startDate,
|
|
7076
|
+
end_date: endDate,
|
|
7077
|
+
time_unit: params.time_unit,
|
|
7078
|
+
age: params.age,
|
|
7079
|
+
gender: params.gender,
|
|
7080
|
+
device: params.device,
|
|
7081
|
+
count: params.count
|
|
7082
|
+
}
|
|
7083
|
+
});
|
|
7084
|
+
}
|
|
7085
|
+
/**
|
|
7086
|
+
* Static top-level shopping taxonomy (11 cids). Costs 0 credits.
|
|
7087
|
+
*/
|
|
7088
|
+
async categories() {
|
|
7089
|
+
return this.client.request("/v1/naver/shopping/categories");
|
|
7090
|
+
}
|
|
7091
|
+
/**
|
|
7092
|
+
* Product search via the mobile integrated-search finder preview.
|
|
7093
|
+
*
|
|
7094
|
+
* @param query - Search keywords.
|
|
7095
|
+
* @param params - Optional `tab` (`m_view` | `m_shop`).
|
|
7096
|
+
*/
|
|
7097
|
+
async searchProducts(query, params = {}) {
|
|
7098
|
+
return this.client.request("/v1/naver/shopping/search-products", {
|
|
7099
|
+
params: { query, tab: params.tab }
|
|
7100
|
+
});
|
|
7101
|
+
}
|
|
7102
|
+
/**
|
|
7103
|
+
* Query-dependent filter facets (BRAND / ATTRIBUTE) for a search term.
|
|
7104
|
+
*
|
|
7105
|
+
* @param query - Search keywords.
|
|
7106
|
+
*/
|
|
7107
|
+
async searchFilters(query) {
|
|
7108
|
+
return this.client.request("/v1/naver/shopping/search-filters", {
|
|
7109
|
+
params: { query }
|
|
7110
|
+
});
|
|
7111
|
+
}
|
|
7112
|
+
/**
|
|
7113
|
+
* Curated deal products (snxbest), gender-scoped.
|
|
7114
|
+
*
|
|
7115
|
+
* @param gender - `"M"` or `"F"` (required; blank returns `[]` upstream).
|
|
7116
|
+
*/
|
|
7117
|
+
async deals(gender) {
|
|
7118
|
+
return this.client.request("/v1/naver/shopping/deals", {
|
|
7119
|
+
params: { gender }
|
|
7120
|
+
});
|
|
7121
|
+
}
|
|
7122
|
+
/**
|
|
7123
|
+
* Curated products for a snxbest vertical.
|
|
7124
|
+
*
|
|
7125
|
+
* @param vertical - `fashiontown`, `shoppinglive` or `logistics`.
|
|
7126
|
+
*/
|
|
7127
|
+
async vertical(vertical) {
|
|
7128
|
+
return this.client.request(`/v1/naver/shopping/verticals/${vertical}`);
|
|
7129
|
+
}
|
|
7130
|
+
/**
|
|
7131
|
+
* Curated IT item card list.
|
|
7132
|
+
*/
|
|
7133
|
+
async itItems() {
|
|
7134
|
+
return this.client.request("/v1/naver/shopping/it-items");
|
|
7135
|
+
}
|
|
7136
|
+
/**
|
|
7137
|
+
* Ranking category tree — DIV1 roots, or the DIV2 children of `parent_id`.
|
|
7138
|
+
*
|
|
7139
|
+
* @param params - Optional `parent_id`.
|
|
7140
|
+
*/
|
|
7141
|
+
async categoryTree(params = {}) {
|
|
7142
|
+
return this.client.request("/v1/naver/shopping/category-tree", {
|
|
7143
|
+
params: { parent_id: params.parent_id }
|
|
7144
|
+
});
|
|
7145
|
+
}
|
|
7146
|
+
/**
|
|
7147
|
+
* Filtered finder products via the ns-portal BFF (finite 10 pages x 8 slots).
|
|
7148
|
+
*
|
|
7149
|
+
* @param query - Search keywords.
|
|
7150
|
+
* @param params - Optional `brand_id` and `attribute_id` filters.
|
|
7151
|
+
*/
|
|
7152
|
+
async searchFiltered(query, params = {}) {
|
|
7153
|
+
return this.client.request("/v1/naver/shopping/search-filtered", {
|
|
7154
|
+
params: { query, brand_id: params.brand_id, attribute_id: params.attribute_id }
|
|
7155
|
+
});
|
|
7156
|
+
}
|
|
7157
|
+
/**
|
|
7158
|
+
* snxbest brand ranking (top 20 fixed list).
|
|
7159
|
+
*
|
|
7160
|
+
* @param params - Optional category, age bucket, sort and period.
|
|
7161
|
+
*/
|
|
7162
|
+
async brandRank(params = {}) {
|
|
7163
|
+
return this.client.request("/v1/naver/shopping/brand-rank", {
|
|
7164
|
+
params: {
|
|
7165
|
+
category_id: params.category_id,
|
|
7166
|
+
age_type: params.age_type,
|
|
7167
|
+
sort_type: params.sort_type,
|
|
7168
|
+
period_type: params.period_type
|
|
7169
|
+
}
|
|
7170
|
+
});
|
|
7171
|
+
}
|
|
7172
|
+
/**
|
|
7173
|
+
* snxbest brand-ranking category tree (DIV1, or DIV2 children).
|
|
7174
|
+
*
|
|
7175
|
+
* @param params - Optional `parent_id`.
|
|
7176
|
+
*/
|
|
7177
|
+
async brandCategories(params = {}) {
|
|
7178
|
+
return this.client.request("/v1/naver/shopping/brand-categories", {
|
|
7179
|
+
params: { parent_id: params.parent_id }
|
|
7180
|
+
});
|
|
7181
|
+
}
|
|
7182
|
+
/**
|
|
7183
|
+
* Available snxbest keyword-rank periods.
|
|
7184
|
+
*
|
|
7185
|
+
* @param params - Optional category, age bucket, sort and period.
|
|
7186
|
+
*/
|
|
7187
|
+
async keywordPeriods(params = {}) {
|
|
7188
|
+
return this.client.request("/v1/naver/shopping/keyword-periods", {
|
|
7189
|
+
params: {
|
|
7190
|
+
category_id: params.category_id,
|
|
7191
|
+
age_type: params.age_type,
|
|
7192
|
+
sort_type: params.sort_type,
|
|
7193
|
+
period_type: params.period_type
|
|
7194
|
+
}
|
|
7195
|
+
});
|
|
7196
|
+
}
|
|
7197
|
+
/**
|
|
7198
|
+
* Full-catalog shopping search (SSR page 1 + paged-composite-cards XHR).
|
|
7199
|
+
*
|
|
7200
|
+
* @param query - Search keywords (max 200 chars).
|
|
7201
|
+
* @param params - Optional `sort` and `page` (1..5).
|
|
7202
|
+
*/
|
|
7203
|
+
async searchCatalog(query, params = {}) {
|
|
7204
|
+
return this.client.request("/v1/naver/shopping/search-catalog", {
|
|
7205
|
+
params: { query, sort: params.sort, page: params.page }
|
|
7206
|
+
});
|
|
7207
|
+
}
|
|
7208
|
+
/**
|
|
7209
|
+
* Seller offers per catalog product from Naver's price-compare page.
|
|
7210
|
+
*
|
|
7211
|
+
* @param query - Search keywords (max 200 chars).
|
|
7212
|
+
*/
|
|
7213
|
+
async priceCompare(query) {
|
|
7214
|
+
return this.client.request("/v1/naver/shopping/price-compare", {
|
|
7215
|
+
params: { query }
|
|
7216
|
+
});
|
|
7217
|
+
}
|
|
7218
|
+
};
|
|
7219
|
+
|
|
7220
|
+
// src/naver/stores.ts
|
|
7221
|
+
var StoresClient2 = class {
|
|
7222
|
+
constructor(client) {
|
|
7223
|
+
this.client = client;
|
|
7224
|
+
}
|
|
7225
|
+
/**
|
|
7226
|
+
* Store / seller profile.
|
|
7227
|
+
*
|
|
7228
|
+
* @param storeUrl - Store URL slug, e.g. `"plusink"`.
|
|
7229
|
+
* @param params - Optional `host` (`smartstore` | `brand`).
|
|
7230
|
+
*/
|
|
7231
|
+
async get(storeUrl, params = {}) {
|
|
7232
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}`, {
|
|
7233
|
+
params: { host: params.host }
|
|
7234
|
+
});
|
|
7235
|
+
}
|
|
7236
|
+
/**
|
|
7237
|
+
* Store category tree (recursive display categories).
|
|
7238
|
+
*
|
|
7239
|
+
* @param storeUrl - Store URL slug.
|
|
7240
|
+
* @param params - Optional `host`.
|
|
7241
|
+
*/
|
|
7242
|
+
async categories(storeUrl, params = {}) {
|
|
7243
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}/categories`, {
|
|
7244
|
+
params: { host: params.host }
|
|
7245
|
+
});
|
|
7246
|
+
}
|
|
7247
|
+
/**
|
|
7248
|
+
* Store product listing (listing-card union, not full detail).
|
|
7249
|
+
*
|
|
7250
|
+
* @param storeUrl - Store URL slug.
|
|
7251
|
+
* @param params - Optional host, category, paging, sort and `channel_uid`.
|
|
7252
|
+
*/
|
|
7253
|
+
async products(storeUrl, params = {}) {
|
|
7254
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}/products`, {
|
|
7255
|
+
params: {
|
|
7256
|
+
host: params.host,
|
|
7257
|
+
category_id: params.category_id,
|
|
7258
|
+
page: params.page,
|
|
7259
|
+
size: params.size,
|
|
7260
|
+
sort: params.sort,
|
|
7261
|
+
channel_uid: params.channel_uid
|
|
7262
|
+
}
|
|
7263
|
+
});
|
|
7264
|
+
}
|
|
7265
|
+
/**
|
|
7266
|
+
* Store bestseller list.
|
|
7267
|
+
*
|
|
7268
|
+
* @param storeUrl - Store URL slug.
|
|
7269
|
+
* @param params - Optional host and `period`.
|
|
7270
|
+
*/
|
|
7271
|
+
async bestsellers(storeUrl, params = {}) {
|
|
7272
|
+
return this.client.request(`/v1/naver/stores/${storeUrl}/bestsellers`, {
|
|
7273
|
+
params: { host: params.host, period: params.period }
|
|
7274
|
+
});
|
|
7275
|
+
}
|
|
7276
|
+
};
|
|
7277
|
+
|
|
7278
|
+
// src/naver/content.ts
|
|
7279
|
+
var ContentClient = class {
|
|
7280
|
+
constructor(client) {
|
|
7281
|
+
this.client = client;
|
|
7282
|
+
}
|
|
7283
|
+
/**
|
|
7284
|
+
* Web vertical SERP (15 docs/page).
|
|
7285
|
+
*
|
|
7286
|
+
* @param query - Search keywords.
|
|
7287
|
+
* @param params - Optional page (1-based).
|
|
7288
|
+
*/
|
|
7289
|
+
async searchWeb(query, params = {}) {
|
|
7290
|
+
return this.client.request("/v1/naver/search/web", {
|
|
7291
|
+
params: { query, page: params.page }
|
|
7292
|
+
});
|
|
7293
|
+
}
|
|
7294
|
+
/**
|
|
7295
|
+
* Cafe vertical SERP (30/page).
|
|
7296
|
+
*
|
|
7297
|
+
* @param query - Search keywords.
|
|
7298
|
+
* @param params - Optional page (1-based).
|
|
7299
|
+
*/
|
|
7300
|
+
async cafe(query, params = {}) {
|
|
7301
|
+
return this.client.request("/v1/naver/cafe", {
|
|
7302
|
+
params: { query, page: params.page }
|
|
7303
|
+
});
|
|
7304
|
+
}
|
|
7305
|
+
/**
|
|
7306
|
+
* Knowledge iN vertical SERP (10/page).
|
|
7307
|
+
*
|
|
7308
|
+
* @param query - Search keywords.
|
|
7309
|
+
* @param params - Optional page (1-based).
|
|
7310
|
+
*/
|
|
7311
|
+
async kin(query, params = {}) {
|
|
7312
|
+
return this.client.request("/v1/naver/kin", {
|
|
7313
|
+
params: { query, page: params.page }
|
|
7314
|
+
});
|
|
7315
|
+
}
|
|
7316
|
+
/**
|
|
7317
|
+
* Image vertical SERP (JSON API, 100/page).
|
|
7318
|
+
*
|
|
7319
|
+
* @param query - Search keywords.
|
|
7320
|
+
* @param params - Optional page (1-based).
|
|
7321
|
+
*/
|
|
7322
|
+
async image(query, params = {}) {
|
|
7323
|
+
return this.client.request("/v1/naver/image", {
|
|
7324
|
+
params: { query, page: params.page }
|
|
7325
|
+
});
|
|
7326
|
+
}
|
|
7327
|
+
/**
|
|
7328
|
+
* Video vertical SERP with `/more` pagination (step 48).
|
|
7329
|
+
*
|
|
7330
|
+
* @param query - Search keywords.
|
|
7331
|
+
* @param params - Optional page (1-based).
|
|
7332
|
+
*/
|
|
7333
|
+
async video(query, params = {}) {
|
|
7334
|
+
return this.client.request("/v1/naver/video", {
|
|
7335
|
+
params: { query, page: params.page }
|
|
7336
|
+
});
|
|
7337
|
+
}
|
|
7338
|
+
/**
|
|
7339
|
+
* Clip vertical SERP with `/more` pagination (step 24).
|
|
7340
|
+
*
|
|
7341
|
+
* @param query - Search keywords.
|
|
7342
|
+
* @param params - Optional page (1-based).
|
|
7343
|
+
*/
|
|
7344
|
+
async clip(query, params = {}) {
|
|
7345
|
+
return this.client.request("/v1/naver/clip", {
|
|
7346
|
+
params: { query, page: params.page }
|
|
7347
|
+
});
|
|
7348
|
+
}
|
|
7349
|
+
};
|
|
7350
|
+
|
|
7351
|
+
// src/naver/reviews.ts
|
|
7352
|
+
var ReviewsClient2 = class {
|
|
7353
|
+
constructor(client) {
|
|
7354
|
+
this.client = client;
|
|
7355
|
+
}
|
|
7356
|
+
/**
|
|
7357
|
+
* Commerce review detail by id.
|
|
7358
|
+
*
|
|
7359
|
+
* @param reviewId - Commerce review id.
|
|
7360
|
+
*/
|
|
7361
|
+
async get(reviewId) {
|
|
7362
|
+
return this.client.request(`/v1/naver/reviews/${reviewId}`);
|
|
7363
|
+
}
|
|
7364
|
+
/**
|
|
7365
|
+
* SSR page query recipes for a review (continuation helper).
|
|
7366
|
+
*
|
|
7367
|
+
* @param reviewId - Commerce review id.
|
|
7368
|
+
*/
|
|
7369
|
+
async ssrQueries(reviewId) {
|
|
7370
|
+
return this.client.request(`/v1/naver/reviews/${reviewId}/ssr-queries`);
|
|
7371
|
+
}
|
|
7372
|
+
/**
|
|
7373
|
+
* Video playback key minted from `attachVid` + `videoStamp`.
|
|
7374
|
+
*
|
|
7375
|
+
* @param attachVid - The `attachVid` from a review attachment.
|
|
7376
|
+
* @param stamp - The `videoStamp` from `reviewAttaches[]` type M.
|
|
7377
|
+
*/
|
|
7378
|
+
async videoInkey(attachVid, stamp) {
|
|
7379
|
+
return this.client.request("/v1/naver/reviews/video-inkey", {
|
|
7380
|
+
params: { attach_vid: attachVid, stamp }
|
|
7381
|
+
});
|
|
7382
|
+
}
|
|
7383
|
+
/**
|
|
7384
|
+
* Product rating summary (star distribution, media/type counts).
|
|
7385
|
+
*
|
|
7386
|
+
* @param originProductNo - Origin product no.
|
|
7387
|
+
* @param params - Optional `leaf_category_id` (derived from the product
|
|
7388
|
+
* detail category when omitted).
|
|
7389
|
+
*/
|
|
7390
|
+
async productReviewSummary(originProductNo, params = {}) {
|
|
7391
|
+
return this.client.request(
|
|
7392
|
+
`/v1/naver/products/${originProductNo}/review-summary`,
|
|
7393
|
+
{ params: { leaf_category_id: params.leaf_category_id } }
|
|
7394
|
+
);
|
|
7395
|
+
}
|
|
7396
|
+
/**
|
|
7397
|
+
* Paginated product review list.
|
|
7398
|
+
*
|
|
7399
|
+
* @param originProductNo - Origin product no.
|
|
7400
|
+
* @param params - `store_url` and `product_no` are required; host, cursor
|
|
7401
|
+
* fields, page and sort are optional.
|
|
7402
|
+
*/
|
|
7403
|
+
async productReviews(originProductNo, params) {
|
|
7404
|
+
return this.client.request(`/v1/naver/products/${originProductNo}/reviews`, {
|
|
7405
|
+
params: {
|
|
7406
|
+
store_url: params.store_url,
|
|
7407
|
+
product_no: params.product_no,
|
|
7408
|
+
host: params.host,
|
|
7409
|
+
channel_uid: params.channel_uid,
|
|
7410
|
+
checkout_merchant_no: params.checkout_merchant_no,
|
|
7411
|
+
page: params.page,
|
|
7412
|
+
sort: params.sort
|
|
7413
|
+
}
|
|
7414
|
+
});
|
|
7415
|
+
}
|
|
7416
|
+
/**
|
|
7417
|
+
* Paginated product Q&A list (the list payload carries no answer body).
|
|
7418
|
+
*
|
|
7419
|
+
* @param originProductNo - Origin product no.
|
|
7420
|
+
* @param params - `store_url` and `product_no` are required; `channel_uid`
|
|
7421
|
+
* is required for `host: "smartstore"`.
|
|
7422
|
+
*/
|
|
7423
|
+
async productQnas(originProductNo, params) {
|
|
7424
|
+
return this.client.request(`/v1/naver/products/${originProductNo}/qnas`, {
|
|
7425
|
+
params: {
|
|
7426
|
+
store_url: params.store_url,
|
|
7427
|
+
product_no: params.product_no,
|
|
7428
|
+
host: params.host,
|
|
7429
|
+
channel_uid: params.channel_uid,
|
|
7430
|
+
page: params.page
|
|
7431
|
+
}
|
|
7432
|
+
});
|
|
7433
|
+
}
|
|
7434
|
+
/**
|
|
7435
|
+
* Storefront variant-group graph (groupId + member originProductNos).
|
|
7436
|
+
*
|
|
7437
|
+
* @param originProductNo - Origin product no.
|
|
7438
|
+
*/
|
|
7439
|
+
async productGroup(originProductNo) {
|
|
7440
|
+
return this.client.request(`/v1/naver/products/${originProductNo}/group`);
|
|
7441
|
+
}
|
|
7442
|
+
/**
|
|
7443
|
+
* Group-level rating summary (same shape as the product review summary).
|
|
7444
|
+
*
|
|
7445
|
+
* @param groupProductNo - Group product no.
|
|
7446
|
+
* @param leafCategoryId - Leaf category id (required).
|
|
7447
|
+
*/
|
|
7448
|
+
async groupReviewSummary(groupProductNo, leafCategoryId) {
|
|
7449
|
+
return this.client.request(
|
|
7450
|
+
`/v1/naver/product-groups/${groupProductNo}/review-summary`,
|
|
7451
|
+
{ params: { leaf_category_id: leafCategoryId } }
|
|
7452
|
+
);
|
|
7453
|
+
}
|
|
7454
|
+
};
|
|
7455
|
+
|
|
7456
|
+
// src/naver/products.ts
|
|
7457
|
+
var ProductsClient5 = class {
|
|
7458
|
+
constructor(client) {
|
|
7459
|
+
this.client = client;
|
|
7460
|
+
}
|
|
7461
|
+
/**
|
|
7462
|
+
* Get commerce product detail.
|
|
7463
|
+
*
|
|
7464
|
+
* @param productNo - `channelProductNo` (the storefront `/products/{no}` id).
|
|
7465
|
+
* @param params - Optional host, `store_url` (required when `channel_uid` is
|
|
7466
|
+
* omitted), `channel_uid`, and SmartStore partial-enrich hints.
|
|
7467
|
+
*/
|
|
7468
|
+
async get(productNo, params = {}) {
|
|
7469
|
+
return this.client.request(`/v1/naver/products/${productNo}`, {
|
|
7470
|
+
params: {
|
|
7471
|
+
host: params.host,
|
|
7472
|
+
store_url: params.store_url,
|
|
7473
|
+
channel_uid: params.channel_uid,
|
|
7474
|
+
broadcast_id: params.broadcast_id,
|
|
7475
|
+
live_channel_id: params.live_channel_id,
|
|
7476
|
+
query: params.query
|
|
7477
|
+
}
|
|
7478
|
+
});
|
|
7479
|
+
}
|
|
7480
|
+
};
|
|
7481
|
+
|
|
7482
|
+
// src/naver/live.ts
|
|
7483
|
+
var ShoppingLiveClient = class {
|
|
7484
|
+
constructor(client) {
|
|
7485
|
+
this.client = client;
|
|
7486
|
+
}
|
|
7487
|
+
/**
|
|
7488
|
+
* Shopping Live search standby keyword ranking.
|
|
7489
|
+
*/
|
|
7490
|
+
async searchKeywords() {
|
|
7491
|
+
return this.client.request("/v1/naver/shopping/live/search/keywords");
|
|
7492
|
+
}
|
|
7493
|
+
/**
|
|
7494
|
+
* Broadcast detail by id, including embedded `shoppingProducts`.
|
|
7495
|
+
*
|
|
7496
|
+
* @param broadcastId - Broadcast id.
|
|
7497
|
+
*/
|
|
7498
|
+
async broadcast(broadcastId) {
|
|
7499
|
+
return this.client.request(`/v1/naver/shopping/live/broadcasts/${broadcastId}`);
|
|
7500
|
+
}
|
|
7501
|
+
/**
|
|
7502
|
+
* Paginated product list for one broadcast.
|
|
7503
|
+
*
|
|
7504
|
+
* @param broadcastId - Broadcast id.
|
|
7505
|
+
* @param params - Optional 0-based `page` and `size` (1..200).
|
|
7506
|
+
*/
|
|
7507
|
+
async broadcastProducts(broadcastId, params = {}) {
|
|
7508
|
+
return this.client.request(
|
|
7509
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/products`,
|
|
7510
|
+
{ params: { page: params.page, size: params.size } }
|
|
7511
|
+
);
|
|
7512
|
+
}
|
|
7513
|
+
/**
|
|
7514
|
+
* Broadcast viewer / like / comment counts.
|
|
7515
|
+
*
|
|
7516
|
+
* @param broadcastId - Broadcast id.
|
|
7517
|
+
*/
|
|
7518
|
+
async broadcastCounts(broadcastId) {
|
|
7519
|
+
return this.client.request(
|
|
7520
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/counts`
|
|
7521
|
+
);
|
|
7522
|
+
}
|
|
7523
|
+
/**
|
|
7524
|
+
* Shopping Live channel / store profile.
|
|
7525
|
+
*
|
|
7526
|
+
* @param channelId - Channel id.
|
|
7527
|
+
*/
|
|
7528
|
+
async channel(channelId) {
|
|
7529
|
+
return this.client.request(`/v1/naver/shopping/live/channels/${channelId}`);
|
|
7530
|
+
}
|
|
7531
|
+
/**
|
|
7532
|
+
* Channel product list.
|
|
7533
|
+
*
|
|
7534
|
+
* @param channelId - Channel id.
|
|
7535
|
+
* @param params - Optional `next` cursor and `size` (1..100).
|
|
7536
|
+
*/
|
|
7537
|
+
async channelProducts(channelId, params = {}) {
|
|
7538
|
+
return this.client.request(
|
|
7539
|
+
`/v1/naver/shopping/live/channels/${channelId}/products`,
|
|
7540
|
+
{ params: { next: params.next, size: params.size } }
|
|
7541
|
+
);
|
|
7542
|
+
}
|
|
7543
|
+
/**
|
|
7544
|
+
* Channel broadcast list, including upcoming STANDBY schedule cards.
|
|
7545
|
+
*
|
|
7546
|
+
* @param channelId - Channel id.
|
|
7547
|
+
*/
|
|
7548
|
+
async channelBroadcasts(channelId) {
|
|
7549
|
+
return this.client.request(
|
|
7550
|
+
`/v1/naver/shopping/live/channels/${channelId}/broadcasts`
|
|
7551
|
+
);
|
|
7552
|
+
}
|
|
7553
|
+
/**
|
|
7554
|
+
* Channel shorts / clips list.
|
|
7555
|
+
*
|
|
7556
|
+
* @param channelId - Channel id.
|
|
7557
|
+
* @param params - Optional `sort_type`, `next` cursor and `size` (1..100).
|
|
7558
|
+
*/
|
|
7559
|
+
async channelShortclips(channelId, params = {}) {
|
|
7560
|
+
return this.client.request(
|
|
7561
|
+
`/v1/naver/shopping/live/channels/${channelId}/shortclips`,
|
|
7562
|
+
{ params: { sort_type: params.sort_type, next: params.next, size: params.size } }
|
|
7563
|
+
);
|
|
7564
|
+
}
|
|
7565
|
+
/**
|
|
7566
|
+
* Shortclip detail with embedded products and categories.
|
|
7567
|
+
*
|
|
7568
|
+
* @param shortclipId - Shortclip id.
|
|
7569
|
+
*/
|
|
7570
|
+
async shortclip(shortclipId) {
|
|
7571
|
+
return this.client.request(`/v1/naver/shopping/live/shortclips/${shortclipId}`);
|
|
7572
|
+
}
|
|
7573
|
+
/**
|
|
7574
|
+
* Paginated shortclip product list.
|
|
7575
|
+
*
|
|
7576
|
+
* @param shortclipId - Shortclip id.
|
|
7577
|
+
* @param params - Optional `attachment_type`, 0-based `page`, `size` (1..100)
|
|
7578
|
+
* and `sort`.
|
|
7579
|
+
*/
|
|
7580
|
+
async shortclipProducts(shortclipId, params = {}) {
|
|
7581
|
+
return this.client.request(
|
|
7582
|
+
`/v1/naver/shopping/live/shortclips/${shortclipId}/products`,
|
|
7583
|
+
{
|
|
7584
|
+
params: {
|
|
7585
|
+
attachment_type: params.attachment_type,
|
|
7586
|
+
page: params.page,
|
|
7587
|
+
size: params.size,
|
|
7588
|
+
sort: params.sort
|
|
7589
|
+
}
|
|
7590
|
+
}
|
|
7591
|
+
);
|
|
7592
|
+
}
|
|
7593
|
+
/**
|
|
7594
|
+
* Replay product timeline of an ended broadcast.
|
|
7595
|
+
*
|
|
7596
|
+
* @param broadcastId - Broadcast id.
|
|
7597
|
+
* @param params - Optional `include_before` and `next` cursor (`0` = start).
|
|
7598
|
+
*/
|
|
7599
|
+
async replayProducts(broadcastId, params = {}) {
|
|
7600
|
+
return this.client.request(
|
|
7601
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/replay-products`,
|
|
7602
|
+
{ params: { include_before: params.include_before, next: params.next } }
|
|
7603
|
+
);
|
|
7604
|
+
}
|
|
7605
|
+
/**
|
|
7606
|
+
* Product categories present in a broadcast.
|
|
7607
|
+
*
|
|
7608
|
+
* @param broadcastId - Broadcast id.
|
|
7609
|
+
* @param params - Optional `attachment_type`.
|
|
7610
|
+
*/
|
|
7611
|
+
async broadcastProductCategories(broadcastId, params = {}) {
|
|
7612
|
+
return this.client.request(
|
|
7613
|
+
`/v1/naver/shopping/live/broadcasts/${broadcastId}/product-categories`,
|
|
7614
|
+
{ params: { attachment_type: params.attachment_type } }
|
|
7615
|
+
);
|
|
7616
|
+
}
|
|
7617
|
+
};
|
|
7618
|
+
|
|
7619
|
+
// src/naver/client.ts
|
|
7620
|
+
var NaverClient = class {
|
|
7621
|
+
/** Web / news / blog search and autocomplete */
|
|
7622
|
+
search;
|
|
7623
|
+
/** Local search, Place detail, reviews and photos */
|
|
7624
|
+
places;
|
|
7625
|
+
/** Shopping search, rankings, DataLab insight and category trees */
|
|
7626
|
+
shopping;
|
|
7627
|
+
/** SmartStore / brand-store profile, categories, products and bestsellers */
|
|
7628
|
+
stores;
|
|
7629
|
+
/** Web, cafe, kin, image, video and clip SERP verticals */
|
|
7630
|
+
content;
|
|
7631
|
+
/** Commerce reviews, Q&A, product-group graphs and summaries */
|
|
7632
|
+
reviews;
|
|
7633
|
+
/** Commerce product detail */
|
|
7634
|
+
products;
|
|
7635
|
+
/** Shopping Live broadcasts, channels and shortclips */
|
|
7636
|
+
live;
|
|
7637
|
+
/**
|
|
7638
|
+
* Create a new Naver client.
|
|
7639
|
+
*
|
|
7640
|
+
* @param client - The base HTTP client for making requests.
|
|
7641
|
+
*/
|
|
7642
|
+
constructor(client) {
|
|
7643
|
+
this.search = new SearchClient12(client);
|
|
7644
|
+
this.places = new PlacesClient(client);
|
|
7645
|
+
this.shopping = new ShoppingClient2(client);
|
|
7646
|
+
this.stores = new StoresClient2(client);
|
|
7647
|
+
this.content = new ContentClient(client);
|
|
7648
|
+
this.reviews = new ReviewsClient2(client);
|
|
7649
|
+
this.products = new ProductsClient5(client);
|
|
7650
|
+
this.live = new ShoppingLiveClient(client);
|
|
7651
|
+
}
|
|
7652
|
+
};
|
|
7653
|
+
|
|
7654
|
+
// src/yahoo/search.ts
|
|
7655
|
+
var SearchClient13 = class {
|
|
6793
7656
|
constructor(client) {
|
|
6794
7657
|
this.client = client;
|
|
6795
7658
|
}
|
|
@@ -6933,7 +7796,7 @@ var YahooClient = class {
|
|
|
6933
7796
|
* @param client - The base HTTP client for making requests.
|
|
6934
7797
|
*/
|
|
6935
7798
|
constructor(client) {
|
|
6936
|
-
this.search = new
|
|
7799
|
+
this.search = new SearchClient13(client);
|
|
6937
7800
|
this.media = new MediaClient4(client);
|
|
6938
7801
|
this.news = new NewsClient3(client);
|
|
6939
7802
|
this.reference = new ReferenceClient9(client);
|
|
@@ -6941,7 +7804,7 @@ var YahooClient = class {
|
|
|
6941
7804
|
};
|
|
6942
7805
|
|
|
6943
7806
|
// src/yandex/search.ts
|
|
6944
|
-
var
|
|
7807
|
+
var SearchClient14 = class {
|
|
6945
7808
|
constructor(client) {
|
|
6946
7809
|
this.client = client;
|
|
6947
7810
|
}
|
|
@@ -7028,14 +7891,14 @@ var YandexClient = class {
|
|
|
7028
7891
|
* @param client - The base HTTP client for making requests.
|
|
7029
7892
|
*/
|
|
7030
7893
|
constructor(client) {
|
|
7031
|
-
this.search = new
|
|
7894
|
+
this.search = new SearchClient14(client);
|
|
7032
7895
|
this.images = new ImagesClient2(client);
|
|
7033
7896
|
this.reference = new ReferenceClient10(client);
|
|
7034
7897
|
}
|
|
7035
7898
|
};
|
|
7036
7899
|
|
|
7037
7900
|
// src/youtube/search.ts
|
|
7038
|
-
var
|
|
7901
|
+
var SearchClient15 = class {
|
|
7039
7902
|
client;
|
|
7040
7903
|
constructor(client) {
|
|
7041
7904
|
this.client = client;
|
|
@@ -7606,7 +8469,7 @@ var YoutubeClient = class {
|
|
|
7606
8469
|
* @param client - The base HTTP client for making requests.
|
|
7607
8470
|
*/
|
|
7608
8471
|
constructor(client) {
|
|
7609
|
-
this.search = new
|
|
8472
|
+
this.search = new SearchClient15(client);
|
|
7610
8473
|
this.videos = new VideosClient3(client);
|
|
7611
8474
|
this.channels = new ChannelsClient(client);
|
|
7612
8475
|
this.playlists = new PlaylistsClient(client);
|
|
@@ -7619,7 +8482,7 @@ var YoutubeClient = class {
|
|
|
7619
8482
|
};
|
|
7620
8483
|
|
|
7621
8484
|
// src/realtor/search.ts
|
|
7622
|
-
var
|
|
8485
|
+
var SearchClient16 = class {
|
|
7623
8486
|
client;
|
|
7624
8487
|
constructor(client) {
|
|
7625
8488
|
this.client = client;
|
|
@@ -7722,14 +8585,14 @@ var RealtorClient = class {
|
|
|
7722
8585
|
* @param client - The base HTTP client for making requests.
|
|
7723
8586
|
*/
|
|
7724
8587
|
constructor(client) {
|
|
7725
|
-
this.search = new
|
|
8588
|
+
this.search = new SearchClient16(client);
|
|
7726
8589
|
this.properties = new PropertiesClient(client);
|
|
7727
8590
|
this.reference = new ReferenceClient12(client);
|
|
7728
8591
|
}
|
|
7729
8592
|
};
|
|
7730
8593
|
|
|
7731
8594
|
// src/leboncoin/search.ts
|
|
7732
|
-
var
|
|
8595
|
+
var SearchClient17 = class {
|
|
7733
8596
|
client;
|
|
7734
8597
|
constructor(client) {
|
|
7735
8598
|
this.client = client;
|
|
@@ -7767,7 +8630,7 @@ var SearchClient16 = class {
|
|
|
7767
8630
|
};
|
|
7768
8631
|
|
|
7769
8632
|
// src/leboncoin/ads.ts
|
|
7770
|
-
var
|
|
8633
|
+
var AdsClient3 = class {
|
|
7771
8634
|
client;
|
|
7772
8635
|
constructor(client) {
|
|
7773
8636
|
this.client = client;
|
|
@@ -7896,15 +8759,15 @@ var LeboncoinClient = class {
|
|
|
7896
8759
|
* @param client - The base HTTP client for making requests.
|
|
7897
8760
|
*/
|
|
7898
8761
|
constructor(client) {
|
|
7899
|
-
this.search = new
|
|
7900
|
-
this.ads = new
|
|
8762
|
+
this.search = new SearchClient17(client);
|
|
8763
|
+
this.ads = new AdsClient3(client);
|
|
7901
8764
|
this.sellers = new SellersClient4(client);
|
|
7902
8765
|
this.reference = new ReferenceClient13(client);
|
|
7903
8766
|
}
|
|
7904
8767
|
};
|
|
7905
8768
|
|
|
7906
8769
|
// src/zillow/search.ts
|
|
7907
|
-
var
|
|
8770
|
+
var SearchClient18 = class {
|
|
7908
8771
|
client;
|
|
7909
8772
|
constructor(client) {
|
|
7910
8773
|
this.client = client;
|
|
@@ -8062,7 +8925,7 @@ var ZillowClient = class {
|
|
|
8062
8925
|
*/
|
|
8063
8926
|
constructor(client) {
|
|
8064
8927
|
this._gen = client;
|
|
8065
|
-
this.search = new
|
|
8928
|
+
this.search = new SearchClient18(client);
|
|
8066
8929
|
this.properties = new PropertiesClient2(client);
|
|
8067
8930
|
this.agent = new AgentClient(client);
|
|
8068
8931
|
this.reference = new ReferenceClient14(client);
|
|
@@ -8210,7 +9073,7 @@ var ImmobiliareClient = class {
|
|
|
8210
9073
|
};
|
|
8211
9074
|
|
|
8212
9075
|
// src/loopnet/search.ts
|
|
8213
|
-
var
|
|
9076
|
+
var SearchClient19 = class {
|
|
8214
9077
|
client;
|
|
8215
9078
|
constructor(client) {
|
|
8216
9079
|
this.client = client;
|
|
@@ -8334,7 +9197,7 @@ var LoopNetClient = class {
|
|
|
8334
9197
|
* @param client - The base HTTP client for making requests.
|
|
8335
9198
|
*/
|
|
8336
9199
|
constructor(client) {
|
|
8337
|
-
this.search = new
|
|
9200
|
+
this.search = new SearchClient19(client);
|
|
8338
9201
|
this.listings = new ListingsClient2(client);
|
|
8339
9202
|
this.brokers = new BrokersClient(client);
|
|
8340
9203
|
this.reference = new ReferenceClient15(client);
|
|
@@ -8970,6 +9833,8 @@ var ScrapeBadger = class {
|
|
|
8970
9833
|
booking;
|
|
8971
9834
|
/** Baidu scraper API client — search, news, images, autocomplete (baidu.com, China's #1 search engine) */
|
|
8972
9835
|
baidu;
|
|
9836
|
+
/** Naver scraper API client — 55 endpoints (search, places, shopping, stores, content, reviews, products, shopping live; naver.com, South Korea) */
|
|
9837
|
+
naver;
|
|
8973
9838
|
/** Yahoo scraper API client — 6 endpoints (search, images, videos, news, autocomplete, markets) across 35 markets */
|
|
8974
9839
|
yahoo;
|
|
8975
9840
|
/** Yandex scraper API client — web search, image search, reverse-image (CBIR), markets (tr/com/ru/by/kz/uz) */
|
|
@@ -9053,6 +9918,7 @@ var ScrapeBadger = class {
|
|
|
9053
9918
|
this.bing = new BingClient(this.baseClient);
|
|
9054
9919
|
this.booking = new BookingClient(this.baseClient);
|
|
9055
9920
|
this.baidu = new BaiduClient(this.baseClient);
|
|
9921
|
+
this.naver = new NaverClient(this.baseClient);
|
|
9056
9922
|
this.yahoo = new YahooClient(this.baseClient);
|
|
9057
9923
|
this.yandex = new YandexClient(this.baseClient);
|
|
9058
9924
|
this.youtube = new YoutubeClient(this.baseClient);
|
|
@@ -9069,6 +9935,6 @@ var ScrapeBadger = class {
|
|
|
9069
9935
|
}
|
|
9070
9936
|
};
|
|
9071
9937
|
|
|
9072
|
-
export { AccountRestrictedError, AmazonClient, ListingsClient as AmazonListingsClient, ProductsClient2 as AmazonProductsClient, ReferenceClient2 as AmazonReferenceClient, SearchClient5 as AmazonSearchClient, SellersClient as AmazonSellersClient, ApartmentsClient, AuthenticationError, BaiduClient, BingClient, MediaClient3 as BingMediaClient, NewsClient2 as BingNewsClient, ReferenceClient8 as BingReferenceClient, SearchClient11 as BingSearchClient, AskClient as ChatGPTAskClient, BrandClient as ChatGPTBrandClient, ChatGPTClient, ReferenceClient16 as ChatGPTReferenceClient, CommunitiesClient, ConflictError, DepopClient, DuckDuckGoClient, MediaClient2 as DuckDuckGoMediaClient, ReferenceClient7 as DuckDuckGoReferenceClient, SearchClient10 as DuckDuckGoSearchClient, CategoriesClient as EbayCategoriesClient, EbayClient, ItemsClient2 as EbayItemsClient, ReferenceClient5 as EbayReferenceClient, SearchClient8 as EbaySearchClient, SellersClient2 as EbaySellersClient, AskClient2 as GeminiAskClient, BrandClient2 as GeminiBrandClient, GeminiClient, GeoClient, AiModeClient as GoogleAiModeClient, AutocompleteClient as GoogleAutocompleteClient, GoogleClient, FinanceClient as GoogleFinanceClient, FlightsClient as GoogleFlightsClient, HotelsClient as GoogleHotelsClient, ImagesClient as GoogleImagesClient, JobsClient as GoogleJobsClient, LensClient as GoogleLensClient, MapsClient as GoogleMapsClient, NewsClient as GoogleNewsClient, PatentsClient as GooglePatentsClient, ProductsClient as GoogleProductsClient, ScholarClient as GoogleScholarClient, SearchClient2 as GoogleSearchClient, ShoppingClient as GoogleShoppingClient, ShortsClient as GoogleShortsClient, TrendsClient2 as GoogleTrendsClient, VideosClient as GoogleVideosClient, IPNotAllowedError, ImmobiliareClient, AudioClient as InstagramAudioClient, InstagramClient, HashtagsClient as InstagramHashtagsClient, LocationsClient as InstagramLocationsClient, MediaClient as InstagramMediaClient, SearchClient4 as InstagramSearchClient, UsersClient4 as InstagramUsersClient, InsufficientCreditsError,
|
|
9938
|
+
export { AccountRestrictedError, AmazonClient, ListingsClient as AmazonListingsClient, ProductsClient2 as AmazonProductsClient, ReferenceClient2 as AmazonReferenceClient, SearchClient5 as AmazonSearchClient, SellersClient as AmazonSellersClient, ApartmentsClient, AuthenticationError, BaiduClient, BingClient, MediaClient3 as BingMediaClient, NewsClient2 as BingNewsClient, ReferenceClient8 as BingReferenceClient, SearchClient11 as BingSearchClient, AskClient as ChatGPTAskClient, BrandClient as ChatGPTBrandClient, ChatGPTClient, ReferenceClient16 as ChatGPTReferenceClient, CommunitiesClient, ConflictError, DepopClient, DuckDuckGoClient, MediaClient2 as DuckDuckGoMediaClient, ReferenceClient7 as DuckDuckGoReferenceClient, SearchClient10 as DuckDuckGoSearchClient, CategoriesClient as EbayCategoriesClient, EbayClient, ItemsClient2 as EbayItemsClient, ReferenceClient5 as EbayReferenceClient, SearchClient8 as EbaySearchClient, SellersClient2 as EbaySellersClient, AskClient2 as GeminiAskClient, BrandClient2 as GeminiBrandClient, GeminiClient, GeoClient, AdsClient as GoogleAdsClient, AiModeClient as GoogleAiModeClient, AutocompleteClient as GoogleAutocompleteClient, GoogleClient, FinanceClient as GoogleFinanceClient, FlightsClient as GoogleFlightsClient, HotelsClient as GoogleHotelsClient, ImagesClient as GoogleImagesClient, JobsClient as GoogleJobsClient, LensClient as GoogleLensClient, MapsClient as GoogleMapsClient, NewsClient as GoogleNewsClient, PatentsClient as GooglePatentsClient, ProductsClient as GoogleProductsClient, ScholarClient as GoogleScholarClient, SearchClient2 as GoogleSearchClient, ShoppingClient as GoogleShoppingClient, ShortsClient as GoogleShortsClient, TrendsClient2 as GoogleTrendsClient, VideosClient as GoogleVideosClient, IPNotAllowedError, ImmobiliareClient, AudioClient as InstagramAudioClient, InstagramClient, HashtagsClient as InstagramHashtagsClient, LocationsClient as InstagramLocationsClient, MediaClient as InstagramMediaClient, SearchClient4 as InstagramSearchClient, UsersClient4 as InstagramUsersClient, InsufficientCreditsError, AdsClient3 as LeboncoinAdsClient, LeboncoinClient, ReferenceClient13 as LeboncoinReferenceClient, SearchClient17 as LeboncoinSearchClient, SellersClient4 as LeboncoinSellersClient, LinkedInClient, ListsClient, BrokersClient as LoopNetBrokersClient, LoopNetClient, ListingsClient2 as LoopNetListingsClient, ReferenceClient15 as LoopNetReferenceClient, SearchClient19 as LoopNetSearchClient, NaverClient, ContentClient as NaverContentClient, PlacesClient as NaverPlacesClient, ProductsClient5 as NaverProductsClient, ReviewsClient2 as NaverReviewsClient, SearchClient12 as NaverSearchClient, ShoppingClient2 as NaverShoppingClient, ShoppingLiveClient as NaverShoppingLiveClient, StoresClient2 as NaverStoresClient, NotFoundError, PermissionDeniedError, RateLimitError, RealtorClient, PropertiesClient as RealtorPropertiesClient, ReferenceClient12 as RealtorReferenceClient, SearchClient16 as RealtorSearchClient, RedditClient, PostsClient as RedditPostsClient, SearchClient3 as RedditSearchClient, SubredditsClient as RedditSubredditsClient, UsersClient3 as RedditUsersClient, RedfinClient, ScrapeBadger, ScrapeBadgerError, ServerError, ShopeeClient, ProductsClient3 as ShopeeProductsClient, ReferenceClient3 as ShopeeReferenceClient, ReviewsClient as ShopeeReviewsClient, SearchClient6 as ShopeeSearchClient, SpacesClient, StreamClient, AdsClient2 as TikTokAdsClient, TikTokClient, HashtagsClient2 as TikTokHashtagsClient, MusicClient as TikTokMusicClient, ReferenceClient4 as TikTokReferenceClient, SearchClient7 as TikTokSearchClient, TrendingClient as TikTokTrendingClient, UsersClient5 as TikTokUsersClient, VideosClient2 as TikTokVideosClient, TimeoutError, TrendsClient, TweetsClient, TwitterClient, UsersClient, ValidationError, VintedClient, ItemsClient as VintedItemsClient, ReferenceClient as VintedReferenceClient, SearchClient as VintedSearchClient, UsersClient2 as VintedUsersClient, WalmartClient, ProductsClient4 as WalmartProductsClient, ReferenceClient6 as WalmartReferenceClient, SearchClient9 as WalmartSearchClient, SellersClient3 as WalmartSellersClient, StoresClient as WalmartStoresClient, WebClient, WebSocketStreamError, YahooClient, MediaClient4 as YahooMediaClient, NewsClient3 as YahooNewsClient, ReferenceClient9 as YahooReferenceClient, SearchClient13 as YahooSearchClient, YandexClient, ImagesClient2 as YandexImagesClient, ReferenceClient10 as YandexReferenceClient, SearchClient14 as YandexSearchClient, ChannelsClient as YoutubeChannelsClient, YoutubeClient, CommunityClient as YoutubeCommunityClient, MusicClient2 as YoutubeMusicClient, PlaylistsClient as YoutubePlaylistsClient, ReferenceClient11 as YoutubeReferenceClient, SearchClient15 as YoutubeSearchClient, ShortsClient2 as YoutubeShortsClient, TrendingClient2 as YoutubeTrendingClient, VideosClient3 as YoutubeVideosClient, AgentClient as ZillowAgentClient, ZillowClient, PropertiesClient2 as ZillowPropertiesClient, ReferenceClient14 as ZillowReferenceClient, SearchClient18 as ZillowSearchClient, collectAll, verifyWebhookSignature };
|
|
9073
9939
|
//# sourceMappingURL=index.mjs.map
|
|
9074
9940
|
//# sourceMappingURL=index.mjs.map
|