scrapebadger 0.9.0 → 0.11.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 +1 -0
- package/dist/index.d.cts +1280 -27
- package/dist/index.d.ts +1280 -27
- package/dist/index.js +282 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +277 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -406,7 +406,7 @@ interface VintedPagination {
|
|
|
406
406
|
/**
|
|
407
407
|
* Response from the search endpoint.
|
|
408
408
|
*/
|
|
409
|
-
interface SearchResponse {
|
|
409
|
+
interface SearchResponse$1 {
|
|
410
410
|
/** List of matching items */
|
|
411
411
|
items: VintedItemSummary[];
|
|
412
412
|
/** Pagination metadata */
|
|
@@ -469,7 +469,7 @@ interface StatusesResponse {
|
|
|
469
469
|
/**
|
|
470
470
|
* Response from the markets endpoint.
|
|
471
471
|
*/
|
|
472
|
-
interface MarketsResponse {
|
|
472
|
+
interface MarketsResponse$1 {
|
|
473
473
|
/** List of available markets */
|
|
474
474
|
markets: VintedMarket[];
|
|
475
475
|
}
|
|
@@ -528,7 +528,7 @@ interface VintedSearchParams {
|
|
|
528
528
|
* });
|
|
529
529
|
* ```
|
|
530
530
|
*/
|
|
531
|
-
declare class SearchClient$
|
|
531
|
+
declare class SearchClient$3 {
|
|
532
532
|
private readonly client;
|
|
533
533
|
constructor(client: BaseClient);
|
|
534
534
|
/**
|
|
@@ -551,7 +551,7 @@ declare class SearchClient$2 {
|
|
|
551
551
|
* console.log(`Found ${results.pagination.total_entries} items`);
|
|
552
552
|
* ```
|
|
553
553
|
*/
|
|
554
|
-
search(params: VintedSearchParams): Promise<SearchResponse>;
|
|
554
|
+
search(params: VintedSearchParams): Promise<SearchResponse$1>;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
/**
|
|
@@ -706,7 +706,7 @@ declare class UsersClient$1 {
|
|
|
706
706
|
* }
|
|
707
707
|
* ```
|
|
708
708
|
*/
|
|
709
|
-
declare class ReferenceClient {
|
|
709
|
+
declare class ReferenceClient$1 {
|
|
710
710
|
private readonly client;
|
|
711
711
|
constructor(client: BaseClient);
|
|
712
712
|
/**
|
|
@@ -784,7 +784,7 @@ declare class ReferenceClient {
|
|
|
784
784
|
* }
|
|
785
785
|
* ```
|
|
786
786
|
*/
|
|
787
|
-
markets(): Promise<MarketsResponse>;
|
|
787
|
+
markets(): Promise<MarketsResponse$1>;
|
|
788
788
|
}
|
|
789
789
|
|
|
790
790
|
/**
|
|
@@ -821,13 +821,13 @@ declare class ReferenceClient {
|
|
|
821
821
|
*/
|
|
822
822
|
declare class VintedClient {
|
|
823
823
|
/** Client for item search operations */
|
|
824
|
-
readonly search: SearchClient$
|
|
824
|
+
readonly search: SearchClient$3;
|
|
825
825
|
/** Client for individual item operations */
|
|
826
826
|
readonly items: ItemsClient;
|
|
827
827
|
/** Client for user operations */
|
|
828
828
|
readonly users: UsersClient$1;
|
|
829
829
|
/** Client for reference data (brands, colors, statuses, markets) */
|
|
830
|
-
readonly reference: ReferenceClient;
|
|
830
|
+
readonly reference: ReferenceClient$1;
|
|
831
831
|
/**
|
|
832
832
|
* Create a new Vinted client.
|
|
833
833
|
*
|
|
@@ -1668,7 +1668,7 @@ declare class PatentsClient {
|
|
|
1668
1668
|
/**
|
|
1669
1669
|
* Client for Google's immersive product detail endpoint.
|
|
1670
1670
|
*/
|
|
1671
|
-
declare class ProductsClient {
|
|
1671
|
+
declare class ProductsClient$1 {
|
|
1672
1672
|
private readonly client;
|
|
1673
1673
|
constructor(client: BaseClient);
|
|
1674
1674
|
detail(params: ProductsDetailParams): Promise<GoogleResponse>;
|
|
@@ -1746,7 +1746,7 @@ declare class ScholarClient {
|
|
|
1746
1746
|
* }
|
|
1747
1747
|
* ```
|
|
1748
1748
|
*/
|
|
1749
|
-
declare class SearchClient$
|
|
1749
|
+
declare class SearchClient$2 {
|
|
1750
1750
|
private readonly client;
|
|
1751
1751
|
constructor(client: BaseClient);
|
|
1752
1752
|
/**
|
|
@@ -1942,7 +1942,7 @@ declare class VideosClient {
|
|
|
1942
1942
|
*/
|
|
1943
1943
|
declare class GoogleClient {
|
|
1944
1944
|
/** Google Web Search (SERP) — with optional deferred AI Overview follow-up. */
|
|
1945
|
-
readonly search: SearchClient$
|
|
1945
|
+
readonly search: SearchClient$2;
|
|
1946
1946
|
/** Google Maps — places, reviews, photos, posts. */
|
|
1947
1947
|
readonly maps: MapsClient;
|
|
1948
1948
|
/** Google News — articles, topics, trending. */
|
|
@@ -1976,7 +1976,7 @@ declare class GoogleClient {
|
|
|
1976
1976
|
/** Google Flights — one-way, round-trip, and multi-city itineraries. */
|
|
1977
1977
|
readonly flights: FlightsClient;
|
|
1978
1978
|
/** Google Products — immersive product detail. */
|
|
1979
|
-
readonly products: ProductsClient;
|
|
1979
|
+
readonly products: ProductsClient$1;
|
|
1980
1980
|
constructor(client: BaseClient);
|
|
1981
1981
|
}
|
|
1982
1982
|
|
|
@@ -1984,7 +1984,33 @@ declare class GoogleClient {
|
|
|
1984
1984
|
* TypeScript types for Reddit API responses.
|
|
1985
1985
|
*
|
|
1986
1986
|
* This module contains all the data types used by the Reddit API client.
|
|
1987
|
+
*
|
|
1988
|
+
* Fields mirror what Reddit's authenticated `.json` API returns for each entity.
|
|
1989
|
+
* Per-viewer-session fields (tied to the scraping account) and moderator-only
|
|
1990
|
+
* fields are deliberately omitted, as are flair richtext arrays (in favour of
|
|
1991
|
+
* the resolved scalar flair fields).
|
|
1987
1992
|
*/
|
|
1993
|
+
/**
|
|
1994
|
+
* An award attached to a post/comment (element of `all_awardings`).
|
|
1995
|
+
*/
|
|
1996
|
+
interface RedditAward {
|
|
1997
|
+
/** Award identifier */
|
|
1998
|
+
id: string | null;
|
|
1999
|
+
/** Award name */
|
|
2000
|
+
name: string;
|
|
2001
|
+
/** Number of times this award was given */
|
|
2002
|
+
count: number;
|
|
2003
|
+
/** Coin price of the award */
|
|
2004
|
+
coin_price: number;
|
|
2005
|
+
/** Coin reward granted by the award */
|
|
2006
|
+
coin_reward: number;
|
|
2007
|
+
/** Award description */
|
|
2008
|
+
description: string | null;
|
|
2009
|
+
/** Award icon URL */
|
|
2010
|
+
icon_url: string | null;
|
|
2011
|
+
/** Award type */
|
|
2012
|
+
award_type: string | null;
|
|
2013
|
+
}
|
|
1988
2014
|
/**
|
|
1989
2015
|
* A Reddit post (link or self post).
|
|
1990
2016
|
*/
|
|
@@ -1995,6 +2021,10 @@ interface RedditPost {
|
|
|
1995
2021
|
fullname: string;
|
|
1996
2022
|
/** Post title */
|
|
1997
2023
|
title: string;
|
|
2024
|
+
/** Author username */
|
|
2025
|
+
author: string;
|
|
2026
|
+
/** Author fullname (t2_ prefixed) */
|
|
2027
|
+
author_fullname: string | null;
|
|
1998
2028
|
/** Self post text body */
|
|
1999
2029
|
selftext: string;
|
|
2000
2030
|
/** Self post text as HTML */
|
|
@@ -2005,10 +2035,6 @@ interface RedditPost {
|
|
|
2005
2035
|
permalink: string;
|
|
2006
2036
|
/** Post domain */
|
|
2007
2037
|
domain: string;
|
|
2008
|
-
/** Author username */
|
|
2009
|
-
author: string;
|
|
2010
|
-
/** Author fullname (t2_ prefixed) */
|
|
2011
|
-
author_fullname: string | null;
|
|
2012
2038
|
/** Subreddit name (without r/ prefix) */
|
|
2013
2039
|
subreddit: string;
|
|
2014
2040
|
/** Subreddit fullname (t5_ prefixed) */
|
|
@@ -2017,32 +2043,128 @@ interface RedditPost {
|
|
|
2017
2043
|
subreddit_name_prefixed: string | null;
|
|
2018
2044
|
/** Subreddit type (public, private, restricted, etc.) */
|
|
2019
2045
|
subreddit_type: string | null;
|
|
2046
|
+
/** Subreddit subscriber count */
|
|
2047
|
+
subreddit_subscribers: number;
|
|
2020
2048
|
/** Post score (upvotes minus downvotes) */
|
|
2021
2049
|
score: number;
|
|
2050
|
+
/** Number of upvotes */
|
|
2051
|
+
ups: number;
|
|
2052
|
+
/** Number of downvotes */
|
|
2053
|
+
downs: number;
|
|
2054
|
+
/** Ratio of upvotes to total votes */
|
|
2055
|
+
upvote_ratio: number;
|
|
2022
2056
|
/** Number of comments */
|
|
2023
2057
|
num_comments: number;
|
|
2024
2058
|
/** Number of crossposts */
|
|
2025
2059
|
num_crossposts: number;
|
|
2060
|
+
/** Total number of awards received */
|
|
2061
|
+
total_awards_received: number;
|
|
2062
|
+
/** View count (null if unavailable) */
|
|
2063
|
+
view_count: number | null;
|
|
2064
|
+
/** Number of gildings */
|
|
2065
|
+
gilded: number;
|
|
2026
2066
|
/** Post creation timestamp (Unix) */
|
|
2027
2067
|
created_utc: number;
|
|
2028
2068
|
/** Post creation time as ISO 8601 UTC string */
|
|
2029
2069
|
created_at: string | null;
|
|
2070
|
+
/** Edit timestamp (Unix) if edited, otherwise false */
|
|
2071
|
+
edited: boolean | number;
|
|
2030
2072
|
/** Whether the post is a self (text) post */
|
|
2031
2073
|
is_self: boolean;
|
|
2074
|
+
/** Whether the post is a video */
|
|
2075
|
+
is_video: boolean;
|
|
2032
2076
|
/** Whether the post is a gallery */
|
|
2033
2077
|
is_gallery: boolean;
|
|
2078
|
+
/** Whether the post is a meta post */
|
|
2079
|
+
is_meta: boolean;
|
|
2080
|
+
/** Whether the post is original content */
|
|
2081
|
+
is_original_content: boolean;
|
|
2082
|
+
/** Whether the post is indexable by robots */
|
|
2083
|
+
is_robot_indexable: boolean;
|
|
2084
|
+
/** Whether the post can be crossposted */
|
|
2085
|
+
is_crosspostable: boolean;
|
|
2086
|
+
/** Whether the post links to a Reddit media domain */
|
|
2087
|
+
is_reddit_media_domain: boolean;
|
|
2088
|
+
/** Whether the post is media only */
|
|
2089
|
+
media_only: boolean;
|
|
2034
2090
|
/** Whether the post is marked NSFW */
|
|
2035
2091
|
is_nsfw: boolean;
|
|
2036
2092
|
/** Whether the post is marked as a spoiler */
|
|
2037
2093
|
is_spoiler: boolean;
|
|
2038
2094
|
/** Whether the post is stickied */
|
|
2039
2095
|
is_stickied: boolean;
|
|
2040
|
-
/** Whether the post is
|
|
2041
|
-
|
|
2096
|
+
/** Whether the post is locked */
|
|
2097
|
+
locked: boolean;
|
|
2098
|
+
/** Whether the post is archived */
|
|
2099
|
+
archived: boolean;
|
|
2100
|
+
/** Whether the post is pinned */
|
|
2101
|
+
pinned: boolean;
|
|
2102
|
+
/** Whether the post is quarantined */
|
|
2103
|
+
quarantine: boolean;
|
|
2104
|
+
/** Whether the score is hidden */
|
|
2105
|
+
hide_score: boolean;
|
|
2106
|
+
/** Whether the post is in contest mode */
|
|
2107
|
+
contest_mode: boolean;
|
|
2108
|
+
/** Whether live comments are allowed */
|
|
2109
|
+
allow_live_comments: boolean;
|
|
2110
|
+
/** Whether reply notifications are enabled */
|
|
2111
|
+
send_replies: boolean;
|
|
2112
|
+
/** Distinguished status (moderator, admin, etc.) */
|
|
2113
|
+
distinguished: string | null;
|
|
2114
|
+
/** Category the post was removed by, if any */
|
|
2115
|
+
removed_by_category: string | null;
|
|
2116
|
+
/** Suggested sort for comments */
|
|
2117
|
+
suggested_sort: string | null;
|
|
2118
|
+
/** Discussion type */
|
|
2119
|
+
discussion_type: string | null;
|
|
2120
|
+
/** Top awarded type */
|
|
2121
|
+
top_awarded_type: string | null;
|
|
2042
2122
|
/** Post flair text (null if no flair) */
|
|
2043
2123
|
link_flair_text: string | null;
|
|
2044
|
-
/**
|
|
2045
|
-
|
|
2124
|
+
/** Post flair type */
|
|
2125
|
+
link_flair_type: string | null;
|
|
2126
|
+
/** Post flair CSS class */
|
|
2127
|
+
link_flair_css_class: string | null;
|
|
2128
|
+
/** Post flair template ID */
|
|
2129
|
+
link_flair_template_id: string | null;
|
|
2130
|
+
/** Post flair background color */
|
|
2131
|
+
link_flair_background_color: string | null;
|
|
2132
|
+
/** Post flair text color */
|
|
2133
|
+
link_flair_text_color: string | null;
|
|
2134
|
+
/** Author flair text */
|
|
2135
|
+
author_flair_text: string | null;
|
|
2136
|
+
/** Author flair type */
|
|
2137
|
+
author_flair_type: string | null;
|
|
2138
|
+
/** Author flair CSS class */
|
|
2139
|
+
author_flair_css_class: string | null;
|
|
2140
|
+
/** Author flair template ID */
|
|
2141
|
+
author_flair_template_id: string | null;
|
|
2142
|
+
/** Author flair background color */
|
|
2143
|
+
author_flair_background_color: string | null;
|
|
2144
|
+
/** Author flair text color */
|
|
2145
|
+
author_flair_text_color: string | null;
|
|
2146
|
+
/** Whether the author has Reddit Premium */
|
|
2147
|
+
author_premium: boolean;
|
|
2148
|
+
/** Whether the author has Patreon flair */
|
|
2149
|
+
author_patreon_flair: boolean;
|
|
2150
|
+
/** Thumbnail URL */
|
|
2151
|
+
thumbnail: string | null;
|
|
2152
|
+
/** Thumbnail width in pixels */
|
|
2153
|
+
thumbnail_width: number | null;
|
|
2154
|
+
/** Thumbnail height in pixels */
|
|
2155
|
+
thumbnail_height: number | null;
|
|
2156
|
+
/** Media metadata */
|
|
2157
|
+
media: Record<string, unknown> | null;
|
|
2158
|
+
/** Media embed metadata */
|
|
2159
|
+
media_embed: Record<string, unknown> | null;
|
|
2160
|
+
/** Secure media metadata */
|
|
2161
|
+
secure_media: Record<string, unknown> | null;
|
|
2162
|
+
/** Secure media embed metadata */
|
|
2163
|
+
secure_media_embed: Record<string, unknown> | null;
|
|
2164
|
+
/** All awards received by the post */
|
|
2165
|
+
all_awardings: RedditAward[];
|
|
2166
|
+
/** Gildings metadata */
|
|
2167
|
+
gildings: Record<string, unknown>;
|
|
2046
2168
|
}
|
|
2047
2169
|
/**
|
|
2048
2170
|
* A Reddit comment.
|
|
@@ -2066,20 +2188,72 @@ interface RedditComment {
|
|
|
2066
2188
|
subreddit_id: string | null;
|
|
2067
2189
|
/** Subreddit with r/ prefix */
|
|
2068
2190
|
subreddit_name_prefixed: string | null;
|
|
2069
|
-
/**
|
|
2191
|
+
/** Subreddit type (public, private, restricted, etc.) */
|
|
2192
|
+
subreddit_type: string | null;
|
|
2193
|
+
/** Post ID this comment belongs to (link_id) */
|
|
2070
2194
|
post_id: string | null;
|
|
2195
|
+
/** Parent fullname this comment replies to */
|
|
2196
|
+
parent_id: string | null;
|
|
2071
2197
|
/** Permalink to comment */
|
|
2072
2198
|
permalink: string;
|
|
2073
2199
|
/** Comment score (upvotes minus downvotes) */
|
|
2074
2200
|
score: number;
|
|
2201
|
+
/** Number of upvotes */
|
|
2202
|
+
ups: number;
|
|
2203
|
+
/** Number of downvotes */
|
|
2204
|
+
downs: number;
|
|
2205
|
+
/** Controversiality score */
|
|
2206
|
+
controversiality: number;
|
|
2207
|
+
/** Total number of awards received */
|
|
2208
|
+
total_awards_received: number;
|
|
2209
|
+
/** Number of gildings */
|
|
2210
|
+
gilded: number;
|
|
2211
|
+
/** Whether the score is hidden */
|
|
2212
|
+
score_hidden: boolean;
|
|
2075
2213
|
/** Depth level (0 for top-level comments) */
|
|
2076
2214
|
depth: number;
|
|
2077
2215
|
/** Comment creation timestamp (Unix) */
|
|
2078
2216
|
created_utc: number;
|
|
2079
2217
|
/** Comment creation time as ISO 8601 UTC string */
|
|
2080
2218
|
created_at: string | null;
|
|
2219
|
+
/** Edit timestamp (Unix) if edited, otherwise false */
|
|
2220
|
+
edited: boolean | number;
|
|
2221
|
+
/** Whether the comment author is the post submitter */
|
|
2222
|
+
is_submitter: boolean;
|
|
2081
2223
|
/** Whether the comment is stickied */
|
|
2082
2224
|
is_stickied: boolean;
|
|
2225
|
+
/** Whether the comment is locked */
|
|
2226
|
+
locked: boolean;
|
|
2227
|
+
/** Whether the comment is archived */
|
|
2228
|
+
archived: boolean;
|
|
2229
|
+
/** Whether the comment is collapsed */
|
|
2230
|
+
collapsed: boolean;
|
|
2231
|
+
/** Reason the comment was collapsed */
|
|
2232
|
+
collapsed_reason: string | null;
|
|
2233
|
+
/** Whether reply notifications are enabled */
|
|
2234
|
+
send_replies: boolean;
|
|
2235
|
+
/** Distinguished status (moderator, admin, etc.) */
|
|
2236
|
+
distinguished: string | null;
|
|
2237
|
+
/** Comment type */
|
|
2238
|
+
comment_type: string | null;
|
|
2239
|
+
/** Author flair text */
|
|
2240
|
+
author_flair_text: string | null;
|
|
2241
|
+
/** Author flair type */
|
|
2242
|
+
author_flair_type: string | null;
|
|
2243
|
+
/** Author flair CSS class */
|
|
2244
|
+
author_flair_css_class: string | null;
|
|
2245
|
+
/** Author flair template ID */
|
|
2246
|
+
author_flair_template_id: string | null;
|
|
2247
|
+
/** Author flair background color */
|
|
2248
|
+
author_flair_background_color: string | null;
|
|
2249
|
+
/** Author flair text color */
|
|
2250
|
+
author_flair_text_color: string | null;
|
|
2251
|
+
/** Whether the author has Reddit Premium */
|
|
2252
|
+
author_premium: boolean;
|
|
2253
|
+
/** All awards received by the comment */
|
|
2254
|
+
all_awardings: RedditAward[];
|
|
2255
|
+
/** Gildings metadata */
|
|
2256
|
+
gildings: Record<string, unknown>;
|
|
2083
2257
|
/** Nested replies (empty array if none) */
|
|
2084
2258
|
replies: RedditComment[];
|
|
2085
2259
|
}
|
|
@@ -2091,7 +2265,7 @@ interface RedditSubreddit {
|
|
|
2091
2265
|
id: string;
|
|
2092
2266
|
/** Fullname with t5_ prefix */
|
|
2093
2267
|
fullname: string;
|
|
2094
|
-
/** Subreddit name (without r/ prefix) */
|
|
2268
|
+
/** Subreddit name (display_name, without r/ prefix) */
|
|
2095
2269
|
name: string;
|
|
2096
2270
|
/** Subreddit with r/ prefix */
|
|
2097
2271
|
display_name_prefixed: string | null;
|
|
@@ -2099,21 +2273,130 @@ interface RedditSubreddit {
|
|
|
2099
2273
|
title: string;
|
|
2100
2274
|
/** Full sidebar description (markdown) */
|
|
2101
2275
|
description: string;
|
|
2276
|
+
/** Full sidebar description as HTML */
|
|
2277
|
+
description_html: string | null;
|
|
2102
2278
|
/** Short public description */
|
|
2103
2279
|
public_description: string;
|
|
2280
|
+
/** Short public description as HTML */
|
|
2281
|
+
public_description_html: string | null;
|
|
2104
2282
|
/** Subreddit URL path */
|
|
2105
2283
|
url: string;
|
|
2284
|
+
/** Subscriber count */
|
|
2285
|
+
subscribers: number;
|
|
2106
2286
|
/** Creation timestamp (Unix) */
|
|
2107
2287
|
created_utc: number;
|
|
2108
2288
|
/** Creation time as ISO 8601 UTC string */
|
|
2109
2289
|
created_at: string | null;
|
|
2290
|
+
/** Subreddit type (public, private, restricted, etc.) */
|
|
2291
|
+
subreddit_type: string | null;
|
|
2292
|
+
/** Primary language */
|
|
2293
|
+
lang: string | null;
|
|
2110
2294
|
/** Whether the subreddit is marked NSFW */
|
|
2111
2295
|
is_nsfw: boolean;
|
|
2296
|
+
/** Whether the subreddit is quarantined */
|
|
2297
|
+
quarantine: boolean;
|
|
2298
|
+
/** Whether the wiki is enabled */
|
|
2299
|
+
wiki_enabled: boolean;
|
|
2300
|
+
/** Whether the subreddit is over 18 */
|
|
2301
|
+
over18: boolean;
|
|
2302
|
+
/** Allowed submission type */
|
|
2303
|
+
submission_type: string | null;
|
|
2304
|
+
/** Submission guidelines text */
|
|
2305
|
+
submit_text: string;
|
|
2306
|
+
/** Submission guidelines text as HTML */
|
|
2307
|
+
submit_text_html: string | null;
|
|
2308
|
+
/** Label for the submit text button */
|
|
2309
|
+
submit_text_label: string | null;
|
|
2310
|
+
/** Label for the submit link button */
|
|
2311
|
+
submit_link_label: string | null;
|
|
2312
|
+
/** Whether image submissions are allowed */
|
|
2313
|
+
allow_images: boolean;
|
|
2314
|
+
/** Whether video submissions are allowed */
|
|
2315
|
+
allow_videos: boolean;
|
|
2316
|
+
/** Whether gallery submissions are allowed */
|
|
2317
|
+
allow_galleries: boolean;
|
|
2318
|
+
/** Whether poll submissions are allowed */
|
|
2319
|
+
allow_polls: boolean;
|
|
2320
|
+
/** Whether spoiler tagging is enabled */
|
|
2321
|
+
spoilers_enabled: boolean;
|
|
2322
|
+
/** Whether the original content tag is enabled */
|
|
2323
|
+
original_content_tag_enabled: boolean;
|
|
2324
|
+
/** Whether all content is original content */
|
|
2325
|
+
all_original_content: boolean;
|
|
2326
|
+
/** Whether posting is restricted */
|
|
2327
|
+
restrict_posting: boolean;
|
|
2328
|
+
/** Whether commenting is restricted */
|
|
2329
|
+
restrict_commenting: boolean;
|
|
2330
|
+
/** Whether free-form reports are allowed */
|
|
2331
|
+
free_form_reports: boolean;
|
|
2332
|
+
/** Whether media is shown */
|
|
2333
|
+
show_media: boolean;
|
|
2334
|
+
/** Whether followers are accepted */
|
|
2335
|
+
accept_followers: boolean;
|
|
2336
|
+
/** Whether link flair is enabled */
|
|
2337
|
+
link_flair_enabled: boolean;
|
|
2338
|
+
/** Link flair position */
|
|
2339
|
+
link_flair_position: string | null;
|
|
2340
|
+
/** Minutes for which comment scores are hidden */
|
|
2341
|
+
comment_score_hide_mins: number;
|
|
2342
|
+
/** Suggested comment sort */
|
|
2343
|
+
suggested_comment_sort: string | null;
|
|
2344
|
+
/** Advertiser category */
|
|
2345
|
+
advertiser_category: string | null;
|
|
2346
|
+
/** Community icon URL */
|
|
2347
|
+
community_icon: string | null;
|
|
2348
|
+
/** Icon image URL */
|
|
2349
|
+
icon_img: string | null;
|
|
2350
|
+
/** Banner image URL */
|
|
2351
|
+
banner_img: string | null;
|
|
2352
|
+
/** Banner background image URL */
|
|
2353
|
+
banner_background_image: string | null;
|
|
2354
|
+
/** Header image URL */
|
|
2355
|
+
header_img: string | null;
|
|
2356
|
+
/** Header title */
|
|
2357
|
+
header_title: string | null;
|
|
2358
|
+
/** Primary color */
|
|
2359
|
+
primary_color: string | null;
|
|
2360
|
+
/** Key color */
|
|
2361
|
+
key_color: string | null;
|
|
2362
|
+
/** Banner background color */
|
|
2363
|
+
banner_background_color: string | null;
|
|
2364
|
+
}
|
|
2365
|
+
/**
|
|
2366
|
+
* The profile subreddit (u/<name>) embedded in a user's `about` payload.
|
|
2367
|
+
*/
|
|
2368
|
+
interface RedditUserSubreddit {
|
|
2369
|
+
/** Display name */
|
|
2370
|
+
display_name: string;
|
|
2371
|
+
/** Display name with prefix */
|
|
2372
|
+
display_name_prefixed: string | null;
|
|
2373
|
+
/** Title */
|
|
2374
|
+
title: string;
|
|
2375
|
+
/** Short public description */
|
|
2376
|
+
public_description: string;
|
|
2377
|
+
/** Subscriber count */
|
|
2378
|
+
subscribers: number;
|
|
2379
|
+
/** URL path */
|
|
2380
|
+
url: string;
|
|
2381
|
+
/** Subreddit type */
|
|
2382
|
+
subreddit_type: string | null;
|
|
2383
|
+
/** Whether the profile subreddit is over 18 */
|
|
2384
|
+
over_18: boolean;
|
|
2385
|
+
/** Icon image URL */
|
|
2386
|
+
icon_img: string | null;
|
|
2387
|
+
/** Banner image URL */
|
|
2388
|
+
banner_img: string | null;
|
|
2389
|
+
/** Community icon URL */
|
|
2390
|
+
community_icon: string | null;
|
|
2391
|
+
/** Primary color */
|
|
2392
|
+
primary_color: string | null;
|
|
2112
2393
|
}
|
|
2113
2394
|
/**
|
|
2114
2395
|
* A Reddit user profile.
|
|
2115
2396
|
*/
|
|
2116
2397
|
interface RedditUser {
|
|
2398
|
+
/** User identifier (without t2_ prefix) */
|
|
2399
|
+
id: string | null;
|
|
2117
2400
|
/** Username (without u/ prefix) */
|
|
2118
2401
|
name: string;
|
|
2119
2402
|
/** Username with u/ prefix */
|
|
@@ -2122,6 +2405,10 @@ interface RedditUser {
|
|
|
2122
2405
|
link_karma: number;
|
|
2123
2406
|
/** Comment karma */
|
|
2124
2407
|
comment_karma: number;
|
|
2408
|
+
/** Awardee karma */
|
|
2409
|
+
awardee_karma: number;
|
|
2410
|
+
/** Awarder karma */
|
|
2411
|
+
awarder_karma: number;
|
|
2125
2412
|
/** Combined total karma */
|
|
2126
2413
|
total_karma: number;
|
|
2127
2414
|
/** Account creation timestamp (Unix) */
|
|
@@ -2130,6 +2417,26 @@ interface RedditUser {
|
|
|
2130
2417
|
created_at: string | null;
|
|
2131
2418
|
/** Whether the account has Reddit Premium */
|
|
2132
2419
|
is_gold: boolean;
|
|
2420
|
+
/** Whether the user is a Reddit employee */
|
|
2421
|
+
is_employee: boolean;
|
|
2422
|
+
/** Whether the user is a moderator */
|
|
2423
|
+
is_mod: boolean;
|
|
2424
|
+
/** Whether the user is a friend */
|
|
2425
|
+
is_friend: boolean;
|
|
2426
|
+
/** Whether the account is verified */
|
|
2427
|
+
verified: boolean;
|
|
2428
|
+
/** Whether the account has a verified email */
|
|
2429
|
+
has_verified_email: boolean;
|
|
2430
|
+
/** Whether the profile is hidden from robots */
|
|
2431
|
+
hide_from_robots: boolean;
|
|
2432
|
+
/** Whether the user accepts followers */
|
|
2433
|
+
accept_followers: boolean;
|
|
2434
|
+
/** Avatar icon URL */
|
|
2435
|
+
icon_img: string | null;
|
|
2436
|
+
/** Snoovatar image URL */
|
|
2437
|
+
snoovatar_img: string | null;
|
|
2438
|
+
/** The user's profile subreddit */
|
|
2439
|
+
subreddit: RedditUserSubreddit | null;
|
|
2133
2440
|
}
|
|
2134
2441
|
/**
|
|
2135
2442
|
* A subreddit rule.
|
|
@@ -2141,6 +2448,14 @@ interface RedditRule {
|
|
|
2141
2448
|
short_name: string;
|
|
2142
2449
|
/** Full rule description (markdown) */
|
|
2143
2450
|
description: string;
|
|
2451
|
+
/** Full rule description as HTML */
|
|
2452
|
+
description_html: string | null;
|
|
2453
|
+
/** Violation reason */
|
|
2454
|
+
violation_reason: string | null;
|
|
2455
|
+
/** Rule creation timestamp (Unix) */
|
|
2456
|
+
created_utc: number;
|
|
2457
|
+
/** Rule kind */
|
|
2458
|
+
kind: string | null;
|
|
2144
2459
|
}
|
|
2145
2460
|
/**
|
|
2146
2461
|
* A subreddit wiki page.
|
|
@@ -2156,19 +2471,76 @@ interface RedditWikiPage {
|
|
|
2156
2471
|
revision_by: string | null;
|
|
2157
2472
|
/** Revision timestamp (Unix), null if unknown */
|
|
2158
2473
|
revision_date: number | null;
|
|
2474
|
+
/** Revision identifier */
|
|
2475
|
+
revision_id: string | null;
|
|
2476
|
+
/** Whether the page may be revised */
|
|
2477
|
+
may_revise: boolean;
|
|
2478
|
+
/** Reason associated with the page */
|
|
2479
|
+
reason: string | null;
|
|
2159
2480
|
}
|
|
2160
2481
|
/**
|
|
2161
2482
|
* A Reddit user trophy.
|
|
2162
2483
|
*/
|
|
2163
2484
|
interface RedditTrophy {
|
|
2485
|
+
/** Trophy identifier */
|
|
2486
|
+
id: string | null;
|
|
2487
|
+
/** Award identifier */
|
|
2488
|
+
award_id: string | null;
|
|
2164
2489
|
/** Trophy name */
|
|
2165
2490
|
name: string;
|
|
2166
2491
|
/** Trophy description */
|
|
2167
2492
|
description: string | null;
|
|
2168
|
-
/** Trophy icon URL */
|
|
2493
|
+
/** Trophy icon URL (icon_70) */
|
|
2169
2494
|
icon_url: string | null;
|
|
2495
|
+
/** 40px icon URL */
|
|
2496
|
+
icon_40: string | null;
|
|
2497
|
+
/** 70px icon URL */
|
|
2498
|
+
icon_70: string | null;
|
|
2170
2499
|
/** URL associated with the trophy */
|
|
2171
2500
|
url: string | null;
|
|
2501
|
+
/** Timestamp the trophy was granted (Unix) */
|
|
2502
|
+
granted_at: number | null;
|
|
2503
|
+
}
|
|
2504
|
+
/**
|
|
2505
|
+
* A subreddit a user moderates (from `/user/{u}/moderated_subreddits`).
|
|
2506
|
+
*/
|
|
2507
|
+
interface RedditModeratedSubreddit {
|
|
2508
|
+
/** Subreddit fullname (t5_ prefixed) */
|
|
2509
|
+
fullname: string | null;
|
|
2510
|
+
/** Subreddit id */
|
|
2511
|
+
sr: string | null;
|
|
2512
|
+
/** Subreddit display name */
|
|
2513
|
+
name: string;
|
|
2514
|
+
/** Subreddit with r/ prefix */
|
|
2515
|
+
display_name_prefixed: string | null;
|
|
2516
|
+
/** Subreddit display name with r/ prefix (from sr field) */
|
|
2517
|
+
sr_display_name_prefixed: string | null;
|
|
2518
|
+
/** Subreddit title */
|
|
2519
|
+
title: string;
|
|
2520
|
+
/** Subreddit URL path */
|
|
2521
|
+
url: string;
|
|
2522
|
+
/** Subscriber count */
|
|
2523
|
+
subscribers: number;
|
|
2524
|
+
/** Subreddit type */
|
|
2525
|
+
subreddit_type: string | null;
|
|
2526
|
+
/** Whether the subreddit is over 18 */
|
|
2527
|
+
over_18: boolean;
|
|
2528
|
+
/** Community icon URL */
|
|
2529
|
+
community_icon: string | null;
|
|
2530
|
+
/** Icon image URL */
|
|
2531
|
+
icon_img: string | null;
|
|
2532
|
+
/** Banner image URL */
|
|
2533
|
+
banner_img: string | null;
|
|
2534
|
+
/** Primary color */
|
|
2535
|
+
primary_color: string | null;
|
|
2536
|
+
/** Key color */
|
|
2537
|
+
key_color: string | null;
|
|
2538
|
+
/** Creation timestamp (Unix) */
|
|
2539
|
+
created_utc: number;
|
|
2540
|
+
/** Creation time as ISO 8601 UTC string */
|
|
2541
|
+
created_at: string | null;
|
|
2542
|
+
/** Moderator permissions held by the user */
|
|
2543
|
+
mod_permissions: string[];
|
|
2172
2544
|
}
|
|
2173
2545
|
/**
|
|
2174
2546
|
* Pagination metadata for list responses.
|
|
@@ -2253,6 +2625,8 @@ interface SubredditRulesResponse {
|
|
|
2253
2625
|
rules: RedditRule[];
|
|
2254
2626
|
/** Subreddit name */
|
|
2255
2627
|
subreddit: string;
|
|
2628
|
+
/** Site-wide rules */
|
|
2629
|
+
site_rules: string[];
|
|
2256
2630
|
}
|
|
2257
2631
|
/**
|
|
2258
2632
|
* Response from the subreddit wiki pages list endpoint.
|
|
@@ -2306,7 +2680,7 @@ interface UserCommentsResponse {
|
|
|
2306
2680
|
*/
|
|
2307
2681
|
interface UserModeratedResponse {
|
|
2308
2682
|
/** Subreddits moderated by the user */
|
|
2309
|
-
subreddits:
|
|
2683
|
+
subreddits: RedditModeratedSubreddit[];
|
|
2310
2684
|
/** Username */
|
|
2311
2685
|
username: string;
|
|
2312
2686
|
}
|
|
@@ -2399,7 +2773,7 @@ interface DomainPostsResponse {
|
|
|
2399
2773
|
* const domainPosts = await client.reddit.search.domainPosts({ domain: "github.com" });
|
|
2400
2774
|
* ```
|
|
2401
2775
|
*/
|
|
2402
|
-
declare class SearchClient {
|
|
2776
|
+
declare class SearchClient$1 {
|
|
2403
2777
|
private readonly client;
|
|
2404
2778
|
constructor(client: BaseClient);
|
|
2405
2779
|
/**
|
|
@@ -3008,7 +3382,7 @@ declare class UsersClient {
|
|
|
3008
3382
|
*/
|
|
3009
3383
|
declare class RedditClient {
|
|
3010
3384
|
/** Client for search operations (posts, subreddits, users, domain posts) */
|
|
3011
|
-
readonly search: SearchClient;
|
|
3385
|
+
readonly search: SearchClient$1;
|
|
3012
3386
|
/** Client for post operations (trending, details, comments, duplicates) */
|
|
3013
3387
|
readonly posts: PostsClient;
|
|
3014
3388
|
/** Client for subreddit operations (details, posts, rules, moderators, wiki) */
|
|
@@ -3023,6 +3397,883 @@ declare class RedditClient {
|
|
|
3023
3397
|
constructor(client: BaseClient);
|
|
3024
3398
|
}
|
|
3025
3399
|
|
|
3400
|
+
/**
|
|
3401
|
+
* TypeScript types for Amazon API responses.
|
|
3402
|
+
*
|
|
3403
|
+
* These interfaces mirror the backend `amazon_scraper` response schema
|
|
3404
|
+
* field-for-field. Optional / nullable backend fields are typed as
|
|
3405
|
+
* `Type | null`; backend list fields default to `[]` and are typed as arrays.
|
|
3406
|
+
* Every datetime field ships in BOTH `*_utc` (number) and `*_at` (string) form.
|
|
3407
|
+
*/
|
|
3408
|
+
/**
|
|
3409
|
+
* A parsed price with both the numeric value and its raw rendering.
|
|
3410
|
+
*/
|
|
3411
|
+
interface AmazonPrice {
|
|
3412
|
+
/** Numeric price value */
|
|
3413
|
+
value: number | null;
|
|
3414
|
+
/** ISO currency code (e.g. "USD") */
|
|
3415
|
+
currency: string | null;
|
|
3416
|
+
/** Currency symbol (e.g. "$") */
|
|
3417
|
+
symbol: string | null;
|
|
3418
|
+
/** Raw rendered price string (e.g. "$29.99") */
|
|
3419
|
+
raw: string | null;
|
|
3420
|
+
}
|
|
3421
|
+
/**
|
|
3422
|
+
* Page-number pagination (Amazon listings use 1-based page numbers).
|
|
3423
|
+
*/
|
|
3424
|
+
interface Pagination {
|
|
3425
|
+
/** Current page number (1-indexed) */
|
|
3426
|
+
current_page: number;
|
|
3427
|
+
/** Total number of pages, if known */
|
|
3428
|
+
total_pages: number | null;
|
|
3429
|
+
/** Total number of results, if known */
|
|
3430
|
+
total_results: number | null;
|
|
3431
|
+
}
|
|
3432
|
+
/**
|
|
3433
|
+
* A single supported marketplace (for /markets).
|
|
3434
|
+
*/
|
|
3435
|
+
interface MarketInfo {
|
|
3436
|
+
/** Market code (e.g. "US", "UK", "DE") */
|
|
3437
|
+
code: string;
|
|
3438
|
+
/** Amazon domain suffix (e.g. "com", "co.uk") */
|
|
3439
|
+
domain: string;
|
|
3440
|
+
/** Country name */
|
|
3441
|
+
country: string;
|
|
3442
|
+
/** Currency code (e.g. "USD") */
|
|
3443
|
+
currency: string;
|
|
3444
|
+
/** Locale (e.g. "en-US") */
|
|
3445
|
+
locale: string;
|
|
3446
|
+
/** Market display name */
|
|
3447
|
+
name: string;
|
|
3448
|
+
}
|
|
3449
|
+
/**
|
|
3450
|
+
* A reference category / department alias (for /categories).
|
|
3451
|
+
*/
|
|
3452
|
+
interface CategoryInfo {
|
|
3453
|
+
/** Category display name */
|
|
3454
|
+
name: string;
|
|
3455
|
+
/** Category alias */
|
|
3456
|
+
alias: string;
|
|
3457
|
+
/** Search alias used in /search `category` param */
|
|
3458
|
+
search_alias: string | null;
|
|
3459
|
+
/** Bestsellers browse-node ID */
|
|
3460
|
+
bestseller_node: string | null;
|
|
3461
|
+
}
|
|
3462
|
+
/**
|
|
3463
|
+
* Per-star rating distribution (percentages 0-100).
|
|
3464
|
+
*/
|
|
3465
|
+
interface RatingBreakdown {
|
|
3466
|
+
five_star: number | null;
|
|
3467
|
+
four_star: number | null;
|
|
3468
|
+
three_star: number | null;
|
|
3469
|
+
two_star: number | null;
|
|
3470
|
+
one_star: number | null;
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
* A single bestsellers-rank entry for a product.
|
|
3474
|
+
*/
|
|
3475
|
+
interface BestsellersRankEntry {
|
|
3476
|
+
rank: number | null;
|
|
3477
|
+
category: string | null;
|
|
3478
|
+
link: string | null;
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3481
|
+
* A buying option / variation of a product.
|
|
3482
|
+
*/
|
|
3483
|
+
interface ProductVariant {
|
|
3484
|
+
asin: string;
|
|
3485
|
+
attributes: Record<string, string>;
|
|
3486
|
+
price: AmazonPrice | null;
|
|
3487
|
+
is_current: boolean;
|
|
3488
|
+
}
|
|
3489
|
+
/**
|
|
3490
|
+
* The featured-offer (buybox) winner shown on the product page.
|
|
3491
|
+
*/
|
|
3492
|
+
interface Buybox {
|
|
3493
|
+
seller_name: string | null;
|
|
3494
|
+
seller_id: string | null;
|
|
3495
|
+
price: AmazonPrice | null;
|
|
3496
|
+
fulfillment: string | null;
|
|
3497
|
+
}
|
|
3498
|
+
/**
|
|
3499
|
+
* Promotional badges attached to a product.
|
|
3500
|
+
*/
|
|
3501
|
+
interface ProductBadges {
|
|
3502
|
+
amazons_choice: boolean;
|
|
3503
|
+
amazons_choice_keyword: string | null;
|
|
3504
|
+
best_seller: boolean;
|
|
3505
|
+
prime: boolean;
|
|
3506
|
+
climate_pledge_friendly: boolean;
|
|
3507
|
+
}
|
|
3508
|
+
/**
|
|
3509
|
+
* A clippable coupon on the product page.
|
|
3510
|
+
*/
|
|
3511
|
+
interface Coupon {
|
|
3512
|
+
text: string | null;
|
|
3513
|
+
discount: string | null;
|
|
3514
|
+
}
|
|
3515
|
+
/**
|
|
3516
|
+
* A deal active on the product page.
|
|
3517
|
+
*/
|
|
3518
|
+
interface ProductDeal {
|
|
3519
|
+
type: string | null;
|
|
3520
|
+
price: AmazonPrice | null;
|
|
3521
|
+
ends_at: string | null;
|
|
3522
|
+
}
|
|
3523
|
+
/**
|
|
3524
|
+
* Delivery information shown on the product page.
|
|
3525
|
+
*/
|
|
3526
|
+
interface Delivery {
|
|
3527
|
+
message: string | null;
|
|
3528
|
+
date: string | null;
|
|
3529
|
+
is_free: boolean | null;
|
|
3530
|
+
}
|
|
3531
|
+
/**
|
|
3532
|
+
* A related product (frequently-bought-together / also-bought).
|
|
3533
|
+
*/
|
|
3534
|
+
interface RelatedProduct {
|
|
3535
|
+
asin: string;
|
|
3536
|
+
title: string | null;
|
|
3537
|
+
link: string | null;
|
|
3538
|
+
image: string | null;
|
|
3539
|
+
price: AmazonPrice | null;
|
|
3540
|
+
}
|
|
3541
|
+
/**
|
|
3542
|
+
* Full product detail (PDP).
|
|
3543
|
+
*/
|
|
3544
|
+
interface Product {
|
|
3545
|
+
asin: string;
|
|
3546
|
+
parent_asin: string | null;
|
|
3547
|
+
title: string | null;
|
|
3548
|
+
link: string | null;
|
|
3549
|
+
brand: string | null;
|
|
3550
|
+
brand_url: string | null;
|
|
3551
|
+
manufacturer: string | null;
|
|
3552
|
+
model_number: string | null;
|
|
3553
|
+
price: AmazonPrice | null;
|
|
3554
|
+
list_price: AmazonPrice | null;
|
|
3555
|
+
savings_amount: AmazonPrice | null;
|
|
3556
|
+
discount_percent: number | null;
|
|
3557
|
+
rating: number | null;
|
|
3558
|
+
ratings_total: number | null;
|
|
3559
|
+
rating_breakdown: RatingBreakdown | null;
|
|
3560
|
+
bought_past_month: string | null;
|
|
3561
|
+
in_stock: boolean | null;
|
|
3562
|
+
availability: string | null;
|
|
3563
|
+
feature_bullets: string[];
|
|
3564
|
+
description: string | null;
|
|
3565
|
+
main_image: string | null;
|
|
3566
|
+
images: string[];
|
|
3567
|
+
images_count: number;
|
|
3568
|
+
videos: string[];
|
|
3569
|
+
videos_count: number;
|
|
3570
|
+
has_aplus_content: boolean;
|
|
3571
|
+
variants: ProductVariant[];
|
|
3572
|
+
variant_asins: string[];
|
|
3573
|
+
categories: string[];
|
|
3574
|
+
bestsellers_rank: BestsellersRankEntry[];
|
|
3575
|
+
attributes: Record<string, string>;
|
|
3576
|
+
specifications: Record<string, string>;
|
|
3577
|
+
dimensions: string | null;
|
|
3578
|
+
weight: string | null;
|
|
3579
|
+
first_available: string | null;
|
|
3580
|
+
country_of_origin: string | null;
|
|
3581
|
+
buybox: Buybox | null;
|
|
3582
|
+
sold_by: string | null;
|
|
3583
|
+
ships_from: string | null;
|
|
3584
|
+
fulfilled_by: string | null;
|
|
3585
|
+
is_amazon_seller: boolean | null;
|
|
3586
|
+
badges: ProductBadges;
|
|
3587
|
+
coupon: Coupon | null;
|
|
3588
|
+
deal: ProductDeal | null;
|
|
3589
|
+
delivery: Delivery | null;
|
|
3590
|
+
frequently_bought_together: RelatedProduct[];
|
|
3591
|
+
also_bought: RelatedProduct[];
|
|
3592
|
+
answered_questions: number | null;
|
|
3593
|
+
/** The product page's embedded featured reviews (max 8). */
|
|
3594
|
+
top_reviews: Review[];
|
|
3595
|
+
scraped_utc: number | null;
|
|
3596
|
+
scraped_at: string | null;
|
|
3597
|
+
}
|
|
3598
|
+
/**
|
|
3599
|
+
* A single search / category-browse result row.
|
|
3600
|
+
*/
|
|
3601
|
+
interface SearchResult {
|
|
3602
|
+
position: number;
|
|
3603
|
+
asin: string;
|
|
3604
|
+
title: string | null;
|
|
3605
|
+
link: string | null;
|
|
3606
|
+
image: string | null;
|
|
3607
|
+
price: AmazonPrice | null;
|
|
3608
|
+
list_price: AmazonPrice | null;
|
|
3609
|
+
unit_price: string | null;
|
|
3610
|
+
rating: number | null;
|
|
3611
|
+
ratings_total: number | null;
|
|
3612
|
+
is_prime: boolean;
|
|
3613
|
+
is_sponsored: boolean;
|
|
3614
|
+
is_amazons_choice: boolean;
|
|
3615
|
+
is_best_seller: boolean;
|
|
3616
|
+
bought_past_month: string | null;
|
|
3617
|
+
coupon: string | null;
|
|
3618
|
+
availability: string | null;
|
|
3619
|
+
}
|
|
3620
|
+
/**
|
|
3621
|
+
* The seller behind a specific offer.
|
|
3622
|
+
*/
|
|
3623
|
+
interface OfferSeller {
|
|
3624
|
+
name: string | null;
|
|
3625
|
+
id: string | null;
|
|
3626
|
+
link: string | null;
|
|
3627
|
+
rating: number | null;
|
|
3628
|
+
ratings_total: number | null;
|
|
3629
|
+
ratings_percentage_positive: number | null;
|
|
3630
|
+
}
|
|
3631
|
+
/**
|
|
3632
|
+
* The condition of an offered item.
|
|
3633
|
+
*/
|
|
3634
|
+
interface OfferCondition {
|
|
3635
|
+
is_new: boolean | null;
|
|
3636
|
+
title: string | null;
|
|
3637
|
+
comments: string | null;
|
|
3638
|
+
}
|
|
3639
|
+
/**
|
|
3640
|
+
* Delivery terms for a specific offer.
|
|
3641
|
+
*/
|
|
3642
|
+
interface OfferDelivery {
|
|
3643
|
+
is_free: boolean | null;
|
|
3644
|
+
fulfilled_by_amazon: boolean | null;
|
|
3645
|
+
date: string | null;
|
|
3646
|
+
price: AmazonPrice | null;
|
|
3647
|
+
}
|
|
3648
|
+
/**
|
|
3649
|
+
* A single seller offer for a product.
|
|
3650
|
+
*/
|
|
3651
|
+
interface Offer {
|
|
3652
|
+
position: number;
|
|
3653
|
+
seller: OfferSeller | null;
|
|
3654
|
+
price: AmazonPrice | null;
|
|
3655
|
+
condition: OfferCondition | null;
|
|
3656
|
+
delivery: OfferDelivery | null;
|
|
3657
|
+
buybox_winner: boolean;
|
|
3658
|
+
is_prime: boolean;
|
|
3659
|
+
minimum_order_quantity: number | null;
|
|
3660
|
+
maximum_order_quantity: number | null;
|
|
3661
|
+
}
|
|
3662
|
+
/**
|
|
3663
|
+
* The reviewer's public profile.
|
|
3664
|
+
*/
|
|
3665
|
+
interface ReviewProfile {
|
|
3666
|
+
name: string | null;
|
|
3667
|
+
link: string | null;
|
|
3668
|
+
id: string | null;
|
|
3669
|
+
image: string | null;
|
|
3670
|
+
}
|
|
3671
|
+
/**
|
|
3672
|
+
* A single product review.
|
|
3673
|
+
*/
|
|
3674
|
+
interface Review {
|
|
3675
|
+
id: string | null;
|
|
3676
|
+
title: string | null;
|
|
3677
|
+
body: string | null;
|
|
3678
|
+
rating: number | null;
|
|
3679
|
+
date_raw: string | null;
|
|
3680
|
+
date_utc: number | null;
|
|
3681
|
+
date_at: string | null;
|
|
3682
|
+
review_country: string | null;
|
|
3683
|
+
is_global_review: boolean;
|
|
3684
|
+
profile: ReviewProfile | null;
|
|
3685
|
+
verified_purchase: boolean;
|
|
3686
|
+
vine_program: boolean;
|
|
3687
|
+
helpful_votes: number | null;
|
|
3688
|
+
variant: string | null;
|
|
3689
|
+
images: string[];
|
|
3690
|
+
}
|
|
3691
|
+
/**
|
|
3692
|
+
* A single bestseller / new-release row.
|
|
3693
|
+
*/
|
|
3694
|
+
interface Bestseller {
|
|
3695
|
+
rank: number | null;
|
|
3696
|
+
position: number;
|
|
3697
|
+
asin: string;
|
|
3698
|
+
title: string | null;
|
|
3699
|
+
link: string | null;
|
|
3700
|
+
image: string | null;
|
|
3701
|
+
rating: number | null;
|
|
3702
|
+
ratings_total: number | null;
|
|
3703
|
+
price: AmazonPrice | null;
|
|
3704
|
+
}
|
|
3705
|
+
/**
|
|
3706
|
+
* A single deal row.
|
|
3707
|
+
*/
|
|
3708
|
+
interface Deal {
|
|
3709
|
+
position: number;
|
|
3710
|
+
asin: string;
|
|
3711
|
+
title: string | null;
|
|
3712
|
+
link: string | null;
|
|
3713
|
+
image: string | null;
|
|
3714
|
+
deal_price: AmazonPrice | null;
|
|
3715
|
+
list_price: AmazonPrice | null;
|
|
3716
|
+
discount_percent: number | null;
|
|
3717
|
+
deal_type: string | null;
|
|
3718
|
+
is_lightning_deal: boolean;
|
|
3719
|
+
badge: string | null;
|
|
3720
|
+
ends_at_utc: number | null;
|
|
3721
|
+
ends_at: string | null;
|
|
3722
|
+
}
|
|
3723
|
+
/**
|
|
3724
|
+
* Feedback counts for a single rolling window.
|
|
3725
|
+
*/
|
|
3726
|
+
interface FeedbackWindow {
|
|
3727
|
+
positive: number | null;
|
|
3728
|
+
neutral: number | null;
|
|
3729
|
+
negative: number | null;
|
|
3730
|
+
count: number | null;
|
|
3731
|
+
}
|
|
3732
|
+
/**
|
|
3733
|
+
* Seller feedback summary across rolling windows.
|
|
3734
|
+
*
|
|
3735
|
+
* Note: the 12-month / 90-day / 30-day windows ship on the wire under the
|
|
3736
|
+
* keys `12mo`, `90d` and `30d`.
|
|
3737
|
+
*/
|
|
3738
|
+
interface SellerFeedbackSummary {
|
|
3739
|
+
lifetime: FeedbackWindow | null;
|
|
3740
|
+
/** 12-month feedback window */
|
|
3741
|
+
"12mo": FeedbackWindow | null;
|
|
3742
|
+
/** 90-day feedback window */
|
|
3743
|
+
"90d": FeedbackWindow | null;
|
|
3744
|
+
/** 30-day feedback window */
|
|
3745
|
+
"30d": FeedbackWindow | null;
|
|
3746
|
+
}
|
|
3747
|
+
/**
|
|
3748
|
+
* A seller profile.
|
|
3749
|
+
*/
|
|
3750
|
+
interface Seller {
|
|
3751
|
+
seller_id: string;
|
|
3752
|
+
name: string | null;
|
|
3753
|
+
link: string | null;
|
|
3754
|
+
rating: number | null;
|
|
3755
|
+
ratings_total: number | null;
|
|
3756
|
+
ratings_percentage_positive: number | null;
|
|
3757
|
+
feedback: SellerFeedbackSummary | null;
|
|
3758
|
+
business_name: string | null;
|
|
3759
|
+
business_address: string | null;
|
|
3760
|
+
member_since: string | null;
|
|
3761
|
+
}
|
|
3762
|
+
/**
|
|
3763
|
+
* A single buyer-feedback entry for a seller.
|
|
3764
|
+
*/
|
|
3765
|
+
interface SellerFeedbackEntry {
|
|
3766
|
+
rating: number | null;
|
|
3767
|
+
comment: string | null;
|
|
3768
|
+
rater: string | null;
|
|
3769
|
+
date_raw: string | null;
|
|
3770
|
+
date_utc: number | null;
|
|
3771
|
+
date_at: string | null;
|
|
3772
|
+
}
|
|
3773
|
+
/**
|
|
3774
|
+
* A single keyword suggestion.
|
|
3775
|
+
*/
|
|
3776
|
+
interface AutocompleteSuggestion {
|
|
3777
|
+
value: string;
|
|
3778
|
+
alias: string | null;
|
|
3779
|
+
}
|
|
3780
|
+
/** Response from the /search endpoint. */
|
|
3781
|
+
interface SearchResponse {
|
|
3782
|
+
query: string;
|
|
3783
|
+
domain: string;
|
|
3784
|
+
results: SearchResult[];
|
|
3785
|
+
pagination: Pagination;
|
|
3786
|
+
scraped_utc: number | null;
|
|
3787
|
+
scraped_at: string | null;
|
|
3788
|
+
}
|
|
3789
|
+
/** Response from the /products/{asin} endpoint. */
|
|
3790
|
+
interface ProductDetailResponse {
|
|
3791
|
+
domain: string;
|
|
3792
|
+
product: Product;
|
|
3793
|
+
}
|
|
3794
|
+
/** Response from the /products/{asin}/offers endpoint. */
|
|
3795
|
+
interface OffersResponse {
|
|
3796
|
+
asin: string;
|
|
3797
|
+
domain: string;
|
|
3798
|
+
buybox: Offer | null;
|
|
3799
|
+
offers: Offer[];
|
|
3800
|
+
total_offers: number | null;
|
|
3801
|
+
scraped_utc: number | null;
|
|
3802
|
+
scraped_at: string | null;
|
|
3803
|
+
}
|
|
3804
|
+
/** Response from the /products/{asin}/reviews endpoint. */
|
|
3805
|
+
interface ReviewsResponse {
|
|
3806
|
+
asin: string;
|
|
3807
|
+
domain: string;
|
|
3808
|
+
reviews: Review[];
|
|
3809
|
+
rating: number | null;
|
|
3810
|
+
ratings_total: number | null;
|
|
3811
|
+
rating_breakdown: RatingBreakdown | null;
|
|
3812
|
+
pagination: Pagination;
|
|
3813
|
+
scraped_utc: number | null;
|
|
3814
|
+
scraped_at: string | null;
|
|
3815
|
+
}
|
|
3816
|
+
/** Response from the /bestsellers endpoint. */
|
|
3817
|
+
interface BestsellersResponse {
|
|
3818
|
+
domain: string;
|
|
3819
|
+
category: string | null;
|
|
3820
|
+
bestsellers: Bestseller[];
|
|
3821
|
+
pagination: Pagination;
|
|
3822
|
+
scraped_utc: number | null;
|
|
3823
|
+
scraped_at: string | null;
|
|
3824
|
+
}
|
|
3825
|
+
/** Response from the /new-releases endpoint. */
|
|
3826
|
+
interface NewReleasesResponse {
|
|
3827
|
+
domain: string;
|
|
3828
|
+
category: string | null;
|
|
3829
|
+
new_releases: Bestseller[];
|
|
3830
|
+
pagination: Pagination;
|
|
3831
|
+
scraped_utc: number | null;
|
|
3832
|
+
scraped_at: string | null;
|
|
3833
|
+
}
|
|
3834
|
+
/** Response from the /deals endpoint. */
|
|
3835
|
+
interface DealsResponse {
|
|
3836
|
+
domain: string;
|
|
3837
|
+
category: string | null;
|
|
3838
|
+
deals: Deal[];
|
|
3839
|
+
pagination: Pagination;
|
|
3840
|
+
scraped_utc: number | null;
|
|
3841
|
+
scraped_at: string | null;
|
|
3842
|
+
}
|
|
3843
|
+
/** Response from the /category endpoint. */
|
|
3844
|
+
interface CategoryResponse {
|
|
3845
|
+
domain: string;
|
|
3846
|
+
node: string;
|
|
3847
|
+
results: SearchResult[];
|
|
3848
|
+
pagination: Pagination;
|
|
3849
|
+
scraped_utc: number | null;
|
|
3850
|
+
scraped_at: string | null;
|
|
3851
|
+
}
|
|
3852
|
+
/** Response from the /sellers/{seller_id} endpoint. */
|
|
3853
|
+
interface SellerProfileResponse {
|
|
3854
|
+
domain: string;
|
|
3855
|
+
seller: Seller;
|
|
3856
|
+
}
|
|
3857
|
+
/** Response from the /sellers/{seller_id}/products endpoint. */
|
|
3858
|
+
interface SellerProductsResponse {
|
|
3859
|
+
domain: string;
|
|
3860
|
+
seller_id: string;
|
|
3861
|
+
products: SearchResult[];
|
|
3862
|
+
pagination: Pagination;
|
|
3863
|
+
scraped_utc: number | null;
|
|
3864
|
+
scraped_at: string | null;
|
|
3865
|
+
}
|
|
3866
|
+
/** Response from the /sellers/{seller_id}/feedback endpoint. */
|
|
3867
|
+
interface SellerFeedbackResponse {
|
|
3868
|
+
domain: string;
|
|
3869
|
+
seller_id: string;
|
|
3870
|
+
feedback: SellerFeedbackEntry[];
|
|
3871
|
+
pagination: Pagination;
|
|
3872
|
+
scraped_utc: number | null;
|
|
3873
|
+
scraped_at: string | null;
|
|
3874
|
+
}
|
|
3875
|
+
/** Response from the /autocomplete endpoint. */
|
|
3876
|
+
interface AutocompleteResponse {
|
|
3877
|
+
query: string;
|
|
3878
|
+
domain: string;
|
|
3879
|
+
suggestions: AutocompleteSuggestion[];
|
|
3880
|
+
}
|
|
3881
|
+
/** Response from the /markets endpoint. */
|
|
3882
|
+
interface MarketsResponse {
|
|
3883
|
+
markets: MarketInfo[];
|
|
3884
|
+
}
|
|
3885
|
+
/** Response from the /categories endpoint. */
|
|
3886
|
+
interface CategoriesResponse {
|
|
3887
|
+
categories: CategoryInfo[];
|
|
3888
|
+
}
|
|
3889
|
+
/** Parameters for searching Amazon products. */
|
|
3890
|
+
interface AmazonSearchParams {
|
|
3891
|
+
/** Search query string */
|
|
3892
|
+
query: string;
|
|
3893
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3894
|
+
domain?: string;
|
|
3895
|
+
/** Page number (1-indexed) */
|
|
3896
|
+
page?: number;
|
|
3897
|
+
/** Sort order (e.g. "price_low_to_high", "featured", "review_rank") */
|
|
3898
|
+
sort_by?: string;
|
|
3899
|
+
/** Category / department alias to scope the search */
|
|
3900
|
+
category?: string;
|
|
3901
|
+
/** Minimum price filter */
|
|
3902
|
+
min_price?: number;
|
|
3903
|
+
/** Maximum price filter */
|
|
3904
|
+
max_price?: number;
|
|
3905
|
+
/** Delivery ZIP / postal code for localized price & availability */
|
|
3906
|
+
zip?: string;
|
|
3907
|
+
/** Preferred content language / locale (e.g. "en_US") */
|
|
3908
|
+
language?: string;
|
|
3909
|
+
}
|
|
3910
|
+
/** Options for fetching product detail. */
|
|
3911
|
+
interface AmazonProductParams {
|
|
3912
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3913
|
+
domain?: string;
|
|
3914
|
+
/** Delivery ZIP / postal code */
|
|
3915
|
+
zip?: string;
|
|
3916
|
+
/** Preferred content language (e.g. "en_US") */
|
|
3917
|
+
language?: string;
|
|
3918
|
+
}
|
|
3919
|
+
/** Options for fetching product offers. */
|
|
3920
|
+
interface AmazonOffersParams {
|
|
3921
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3922
|
+
domain?: string;
|
|
3923
|
+
/** Delivery ZIP / postal code */
|
|
3924
|
+
zip?: string;
|
|
3925
|
+
}
|
|
3926
|
+
/** Options for fetching product reviews. */
|
|
3927
|
+
interface AmazonReviewsParams {
|
|
3928
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3929
|
+
domain?: string;
|
|
3930
|
+
/** Page number (1-indexed) */
|
|
3931
|
+
page?: number;
|
|
3932
|
+
/** Sort order ("helpful" or "recent") */
|
|
3933
|
+
sort_by?: "helpful" | "recent";
|
|
3934
|
+
/** Filter by star rating (e.g. "five_star", "one_star") */
|
|
3935
|
+
star?: string;
|
|
3936
|
+
/** Restrict to verified-purchase reviews */
|
|
3937
|
+
verified_only?: boolean;
|
|
3938
|
+
/** Restrict to reviews containing images / video */
|
|
3939
|
+
media_only?: boolean;
|
|
3940
|
+
}
|
|
3941
|
+
/** Options for the bestsellers / new-releases endpoints. */
|
|
3942
|
+
interface AmazonListingsParams {
|
|
3943
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3944
|
+
domain?: string;
|
|
3945
|
+
/** Bestsellers / new-releases node or category alias */
|
|
3946
|
+
category?: string;
|
|
3947
|
+
/** Page number (1-indexed) */
|
|
3948
|
+
page?: number;
|
|
3949
|
+
}
|
|
3950
|
+
/** Options for the deals endpoint. */
|
|
3951
|
+
interface AmazonDealsParams {
|
|
3952
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3953
|
+
domain?: string;
|
|
3954
|
+
/** Deals category filter */
|
|
3955
|
+
category?: string;
|
|
3956
|
+
/** Page number (1-indexed) */
|
|
3957
|
+
page?: number;
|
|
3958
|
+
}
|
|
3959
|
+
/** Options for the category-browse endpoint. */
|
|
3960
|
+
interface AmazonCategoryParams {
|
|
3961
|
+
/** Browse-node ID (required) */
|
|
3962
|
+
node: string;
|
|
3963
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3964
|
+
domain?: string;
|
|
3965
|
+
/** Page number (1-indexed) */
|
|
3966
|
+
page?: number;
|
|
3967
|
+
/** Sort order */
|
|
3968
|
+
sort_by?: string;
|
|
3969
|
+
}
|
|
3970
|
+
/** Options for seller storefront products / feedback endpoints. */
|
|
3971
|
+
interface AmazonSellerListParams {
|
|
3972
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3973
|
+
domain?: string;
|
|
3974
|
+
/** Page number (1-indexed) */
|
|
3975
|
+
page?: number;
|
|
3976
|
+
}
|
|
3977
|
+
/** Options for the seller profile endpoint. */
|
|
3978
|
+
interface AmazonSellerParams {
|
|
3979
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3980
|
+
domain?: string;
|
|
3981
|
+
}
|
|
3982
|
+
/** Options for the autocomplete endpoint. */
|
|
3983
|
+
interface AmazonAutocompleteParams {
|
|
3984
|
+
/** Amazon marketplace domain (default: "com") */
|
|
3985
|
+
domain?: string;
|
|
3986
|
+
}
|
|
3987
|
+
|
|
3988
|
+
/**
|
|
3989
|
+
* Amazon Search API client.
|
|
3990
|
+
*
|
|
3991
|
+
* Provides methods for keyword search and keyword autocomplete suggestions.
|
|
3992
|
+
*/
|
|
3993
|
+
|
|
3994
|
+
/**
|
|
3995
|
+
* Client for Amazon search and autocomplete endpoints.
|
|
3996
|
+
*
|
|
3997
|
+
* @example
|
|
3998
|
+
* ```typescript
|
|
3999
|
+
* const client = new ScrapeBadger({ apiKey: "key" });
|
|
4000
|
+
*
|
|
4001
|
+
* const results = await client.amazon.search.search({ query: "wireless headphones" });
|
|
4002
|
+
* for (const item of results.results) {
|
|
4003
|
+
* console.log(`${item.position}. ${item.title}`);
|
|
4004
|
+
* }
|
|
4005
|
+
*
|
|
4006
|
+
* const suggestions = await client.amazon.search.autocomplete("lapt");
|
|
4007
|
+
* ```
|
|
4008
|
+
*/
|
|
4009
|
+
declare class SearchClient {
|
|
4010
|
+
private readonly client;
|
|
4011
|
+
constructor(client: BaseClient);
|
|
4012
|
+
/**
|
|
4013
|
+
* Search Amazon for products by keyword.
|
|
4014
|
+
*
|
|
4015
|
+
* @param params - Search parameters including query, filters, and pagination.
|
|
4016
|
+
* @returns Search results with rows and pagination metadata.
|
|
4017
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
4018
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
4019
|
+
*/
|
|
4020
|
+
search(params: AmazonSearchParams): Promise<SearchResponse>;
|
|
4021
|
+
/**
|
|
4022
|
+
* Get Amazon keyword autocomplete suggestions.
|
|
4023
|
+
*
|
|
4024
|
+
* @param query - Partial search query string.
|
|
4025
|
+
* @param options - Optional parameters (domain).
|
|
4026
|
+
* @returns Autocomplete suggestions.
|
|
4027
|
+
*/
|
|
4028
|
+
autocomplete(query: string, options?: AmazonAutocompleteParams): Promise<AutocompleteResponse>;
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
/**
|
|
4032
|
+
* Amazon Products API client.
|
|
4033
|
+
*
|
|
4034
|
+
* Provides methods for fetching product detail, offers, and reviews by ASIN.
|
|
4035
|
+
*/
|
|
4036
|
+
|
|
4037
|
+
/**
|
|
4038
|
+
* Client for Amazon product endpoints (detail, offers, reviews).
|
|
4039
|
+
*
|
|
4040
|
+
* @example
|
|
4041
|
+
* ```typescript
|
|
4042
|
+
* const client = new ScrapeBadger({ apiKey: "key" });
|
|
4043
|
+
*
|
|
4044
|
+
* const detail = await client.amazon.products.get("B08N5WRWNW");
|
|
4045
|
+
* console.log(detail.product.title);
|
|
4046
|
+
*
|
|
4047
|
+
* const offers = await client.amazon.products.offers("B08N5WRWNW");
|
|
4048
|
+
* console.log(`${offers.total_offers} offers`);
|
|
4049
|
+
*
|
|
4050
|
+
* const reviews = await client.amazon.products.reviews("B08N5WRWNW");
|
|
4051
|
+
* ```
|
|
4052
|
+
*/
|
|
4053
|
+
declare class ProductsClient {
|
|
4054
|
+
private readonly client;
|
|
4055
|
+
constructor(client: BaseClient);
|
|
4056
|
+
/**
|
|
4057
|
+
* Get full product detail (PDP) for an ASIN.
|
|
4058
|
+
*
|
|
4059
|
+
* @param asin - The product ASIN.
|
|
4060
|
+
* @param options - Optional parameters (domain, zip, language).
|
|
4061
|
+
* @returns Product detail including variants, badges, buybox, and related products.
|
|
4062
|
+
* @throws NotFoundError - If the product doesn't exist.
|
|
4063
|
+
*/
|
|
4064
|
+
get(asin: string, options?: AmazonProductParams): Promise<ProductDetailResponse>;
|
|
4065
|
+
/**
|
|
4066
|
+
* Get all-seller offers (and the buybox winner) for an ASIN.
|
|
4067
|
+
*
|
|
4068
|
+
* @param asin - The product ASIN.
|
|
4069
|
+
* @param options - Optional parameters (domain, zip).
|
|
4070
|
+
* @returns Offers response with the buybox winner and full offer list.
|
|
4071
|
+
*/
|
|
4072
|
+
offers(asin: string, options?: AmazonOffersParams): Promise<OffersResponse>;
|
|
4073
|
+
/**
|
|
4074
|
+
* Get product reviews for an ASIN.
|
|
4075
|
+
*
|
|
4076
|
+
* @param asin - The product ASIN.
|
|
4077
|
+
* @param options - Optional parameters (domain, page, sort_by, star, verified_only, media_only).
|
|
4078
|
+
* @returns Reviews response with reviews, aggregate rating, and breakdown.
|
|
4079
|
+
*/
|
|
4080
|
+
reviews(asin: string, options?: AmazonReviewsParams): Promise<ReviewsResponse>;
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
/**
|
|
4084
|
+
* Amazon Listings API client.
|
|
4085
|
+
*
|
|
4086
|
+
* Provides methods for bestsellers, new releases, deals, and category browse.
|
|
4087
|
+
*/
|
|
4088
|
+
|
|
4089
|
+
/**
|
|
4090
|
+
* Client for Amazon listing endpoints (bestsellers, new releases, deals, category).
|
|
4091
|
+
*
|
|
4092
|
+
* @example
|
|
4093
|
+
* ```typescript
|
|
4094
|
+
* const client = new ScrapeBadger({ apiKey: "key" });
|
|
4095
|
+
*
|
|
4096
|
+
* const top = await client.amazon.listings.bestsellers({ category: "electronics" });
|
|
4097
|
+
* for (const item of top.bestsellers) {
|
|
4098
|
+
* console.log(`#${item.rank}: ${item.title}`);
|
|
4099
|
+
* }
|
|
4100
|
+
* ```
|
|
4101
|
+
*/
|
|
4102
|
+
declare class ListingsClient {
|
|
4103
|
+
private readonly client;
|
|
4104
|
+
constructor(client: BaseClient);
|
|
4105
|
+
/**
|
|
4106
|
+
* Get the bestsellers list for a marketplace / category.
|
|
4107
|
+
*
|
|
4108
|
+
* @param options - Optional parameters (domain, category, page).
|
|
4109
|
+
* @returns Bestsellers response with ranked products and pagination.
|
|
4110
|
+
*/
|
|
4111
|
+
bestsellers(options?: AmazonListingsParams): Promise<BestsellersResponse>;
|
|
4112
|
+
/**
|
|
4113
|
+
* Get the new-releases list for a marketplace / category.
|
|
4114
|
+
*
|
|
4115
|
+
* @param options - Optional parameters (domain, category, page).
|
|
4116
|
+
* @returns New-releases response with ranked products and pagination.
|
|
4117
|
+
*/
|
|
4118
|
+
newReleases(options?: AmazonListingsParams): Promise<NewReleasesResponse>;
|
|
4119
|
+
/**
|
|
4120
|
+
* Get current deals for a marketplace / category.
|
|
4121
|
+
*
|
|
4122
|
+
* @param options - Optional parameters (domain, category, page).
|
|
4123
|
+
* @returns Deals response with deal rows and pagination.
|
|
4124
|
+
*/
|
|
4125
|
+
deals(options?: AmazonDealsParams): Promise<DealsResponse>;
|
|
4126
|
+
/**
|
|
4127
|
+
* Browse a category / department by browse-node ID.
|
|
4128
|
+
*
|
|
4129
|
+
* @param params - Parameters including the required node ID.
|
|
4130
|
+
* @returns Category response with result rows and pagination.
|
|
4131
|
+
*/
|
|
4132
|
+
category(params: AmazonCategoryParams): Promise<CategoryResponse>;
|
|
4133
|
+
}
|
|
4134
|
+
|
|
4135
|
+
/**
|
|
4136
|
+
* Amazon Sellers API client.
|
|
4137
|
+
*
|
|
4138
|
+
* Provides methods for seller profile, storefront products, and buyer feedback.
|
|
4139
|
+
*/
|
|
4140
|
+
|
|
4141
|
+
/**
|
|
4142
|
+
* Client for Amazon seller endpoints (profile, products, feedback).
|
|
4143
|
+
*
|
|
4144
|
+
* @example
|
|
4145
|
+
* ```typescript
|
|
4146
|
+
* const client = new ScrapeBadger({ apiKey: "key" });
|
|
4147
|
+
*
|
|
4148
|
+
* const profile = await client.amazon.sellers.get("A2L77EE7U53NWQ");
|
|
4149
|
+
* console.log(profile.seller.name);
|
|
4150
|
+
*
|
|
4151
|
+
* const products = await client.amazon.sellers.products("A2L77EE7U53NWQ");
|
|
4152
|
+
* ```
|
|
4153
|
+
*/
|
|
4154
|
+
declare class SellersClient {
|
|
4155
|
+
private readonly client;
|
|
4156
|
+
constructor(client: BaseClient);
|
|
4157
|
+
/**
|
|
4158
|
+
* Get a seller's profile and ratings.
|
|
4159
|
+
*
|
|
4160
|
+
* @param sellerId - The seller ID.
|
|
4161
|
+
* @param options - Optional parameters (domain).
|
|
4162
|
+
* @returns Seller profile response.
|
|
4163
|
+
* @throws NotFoundError - If the seller doesn't exist.
|
|
4164
|
+
*/
|
|
4165
|
+
get(sellerId: string, options?: AmazonSellerParams): Promise<SellerProfileResponse>;
|
|
4166
|
+
/**
|
|
4167
|
+
* Get a seller's storefront listings.
|
|
4168
|
+
*
|
|
4169
|
+
* @param sellerId - The seller ID.
|
|
4170
|
+
* @param options - Optional parameters (domain, page).
|
|
4171
|
+
* @returns Seller products response with result rows and pagination.
|
|
4172
|
+
*/
|
|
4173
|
+
products(sellerId: string, options?: AmazonSellerListParams): Promise<SellerProductsResponse>;
|
|
4174
|
+
/**
|
|
4175
|
+
* Get buyer feedback entries for a seller.
|
|
4176
|
+
*
|
|
4177
|
+
* @param sellerId - The seller ID.
|
|
4178
|
+
* @param options - Optional parameters (domain, page).
|
|
4179
|
+
* @returns Seller feedback response with feedback entries and pagination.
|
|
4180
|
+
*/
|
|
4181
|
+
feedback(sellerId: string, options?: AmazonSellerListParams): Promise<SellerFeedbackResponse>;
|
|
4182
|
+
}
|
|
4183
|
+
|
|
4184
|
+
/**
|
|
4185
|
+
* Amazon Reference Data API client.
|
|
4186
|
+
*
|
|
4187
|
+
* Provides methods for fetching the static marketplace and category lists.
|
|
4188
|
+
*/
|
|
4189
|
+
|
|
4190
|
+
/**
|
|
4191
|
+
* Client for Amazon reference data endpoints (markets, categories).
|
|
4192
|
+
*
|
|
4193
|
+
* @example
|
|
4194
|
+
* ```typescript
|
|
4195
|
+
* const client = new ScrapeBadger({ apiKey: "key" });
|
|
4196
|
+
*
|
|
4197
|
+
* const markets = await client.amazon.reference.markets();
|
|
4198
|
+
* for (const m of markets.markets) {
|
|
4199
|
+
* console.log(`${m.code}: ${m.domain} (${m.currency})`);
|
|
4200
|
+
* }
|
|
4201
|
+
*
|
|
4202
|
+
* const categories = await client.amazon.reference.categories();
|
|
4203
|
+
* ```
|
|
4204
|
+
*/
|
|
4205
|
+
declare class ReferenceClient {
|
|
4206
|
+
private readonly client;
|
|
4207
|
+
constructor(client: BaseClient);
|
|
4208
|
+
/**
|
|
4209
|
+
* Get all supported Amazon marketplaces.
|
|
4210
|
+
*
|
|
4211
|
+
* @returns Markets response with all supported marketplaces.
|
|
4212
|
+
*/
|
|
4213
|
+
markets(): Promise<MarketsResponse>;
|
|
4214
|
+
/**
|
|
4215
|
+
* Get the reference department / category aliases.
|
|
4216
|
+
*
|
|
4217
|
+
* @returns Categories response with all category aliases.
|
|
4218
|
+
*/
|
|
4219
|
+
categories(): Promise<CategoriesResponse>;
|
|
4220
|
+
}
|
|
4221
|
+
|
|
4222
|
+
/**
|
|
4223
|
+
* Amazon API client.
|
|
4224
|
+
*
|
|
4225
|
+
* Provides access to all Amazon API endpoints through specialized sub-clients.
|
|
4226
|
+
*/
|
|
4227
|
+
|
|
4228
|
+
/**
|
|
4229
|
+
* Amazon API client with access to all Amazon endpoints.
|
|
4230
|
+
*
|
|
4231
|
+
* Provides sub-clients for different resource types:
|
|
4232
|
+
* - `search` - Keyword search and autocomplete
|
|
4233
|
+
* - `products` - Product detail, offers, and reviews
|
|
4234
|
+
* - `listings` - Bestsellers, new releases, deals, and category browse
|
|
4235
|
+
* - `sellers` - Seller profile, storefront products, and feedback
|
|
4236
|
+
* - `reference` - Reference data (markets, categories)
|
|
4237
|
+
*
|
|
4238
|
+
* @example
|
|
4239
|
+
* ```typescript
|
|
4240
|
+
* const client = new ScrapeBadger({ apiKey: "key" });
|
|
4241
|
+
*
|
|
4242
|
+
* // Search products
|
|
4243
|
+
* const results = await client.amazon.search.search({ query: "wireless headphones" });
|
|
4244
|
+
*
|
|
4245
|
+
* // Get product detail
|
|
4246
|
+
* const detail = await client.amazon.products.get("B08N5WRWNW");
|
|
4247
|
+
*
|
|
4248
|
+
* // Get bestsellers
|
|
4249
|
+
* const top = await client.amazon.listings.bestsellers({ category: "electronics" });
|
|
4250
|
+
*
|
|
4251
|
+
* // Get a seller profile
|
|
4252
|
+
* const seller = await client.amazon.sellers.get("A2L77EE7U53NWQ");
|
|
4253
|
+
*
|
|
4254
|
+
* // Get reference data
|
|
4255
|
+
* const markets = await client.amazon.reference.markets();
|
|
4256
|
+
* ```
|
|
4257
|
+
*/
|
|
4258
|
+
declare class AmazonClient {
|
|
4259
|
+
/** Client for keyword search and autocomplete */
|
|
4260
|
+
readonly search: SearchClient;
|
|
4261
|
+
/** Client for product detail, offers, and reviews */
|
|
4262
|
+
readonly products: ProductsClient;
|
|
4263
|
+
/** Client for bestsellers, new releases, deals, and category browse */
|
|
4264
|
+
readonly listings: ListingsClient;
|
|
4265
|
+
/** Client for seller profile, products, and feedback */
|
|
4266
|
+
readonly sellers: SellersClient;
|
|
4267
|
+
/** Client for reference data (markets, categories) */
|
|
4268
|
+
readonly reference: ReferenceClient;
|
|
4269
|
+
/**
|
|
4270
|
+
* Create a new Amazon client.
|
|
4271
|
+
*
|
|
4272
|
+
* @param client - The base HTTP client for making requests.
|
|
4273
|
+
*/
|
|
4274
|
+
constructor(client: BaseClient);
|
|
4275
|
+
}
|
|
4276
|
+
|
|
3026
4277
|
/**
|
|
3027
4278
|
* Main ScrapeBadger client.
|
|
3028
4279
|
*
|
|
@@ -3073,6 +4324,8 @@ declare class ScrapeBadger {
|
|
|
3073
4324
|
readonly google: GoogleClient;
|
|
3074
4325
|
/** Reddit scraper API client */
|
|
3075
4326
|
readonly reddit: RedditClient;
|
|
4327
|
+
/** Amazon scraper API client — 14 endpoints */
|
|
4328
|
+
readonly amazon: AmazonClient;
|
|
3076
4329
|
/**
|
|
3077
4330
|
* Create a new ScrapeBadger client.
|
|
3078
4331
|
*
|
|
@@ -3101,4 +4354,4 @@ declare class ScrapeBadger {
|
|
|
3101
4354
|
constructor(config?: Partial<ScrapeBadgerConfig>);
|
|
3102
4355
|
}
|
|
3103
4356
|
|
|
3104
|
-
export { type AiModeSearchParams, type AutocompleteParams, type DetectOptions, type DetectResult, type DomainPostsResponse, type FinanceQuoteParams, type FlightsSearchParams, type FlightsStopsFilter, type FlightsTravelClass, type FlightsTripType, 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, type GoogleResponse, ScholarClient as GoogleScholarClient, SearchClient$
|
|
4357
|
+
export { type AiModeSearchParams, type AmazonAutocompleteParams, type AutocompleteResponse as AmazonAutocompleteResponse, type AutocompleteSuggestion as AmazonAutocompleteSuggestion, type Bestseller as AmazonBestseller, type BestsellersRankEntry as AmazonBestsellersRankEntry, type BestsellersResponse as AmazonBestsellersResponse, type Buybox as AmazonBuybox, type CategoriesResponse as AmazonCategoriesResponse, type CategoryInfo as AmazonCategoryInfo, type AmazonCategoryParams, type CategoryResponse as AmazonCategoryResponse, AmazonClient, type Coupon as AmazonCoupon, type Deal as AmazonDeal, type AmazonDealsParams, type DealsResponse as AmazonDealsResponse, type Delivery as AmazonDelivery, type FeedbackWindow as AmazonFeedbackWindow, ListingsClient as AmazonListingsClient, type AmazonListingsParams, type MarketInfo as AmazonMarketInfo, type MarketsResponse as AmazonMarketsResponse, type NewReleasesResponse as AmazonNewReleasesResponse, type Offer as AmazonOffer, type OfferCondition as AmazonOfferCondition, type OfferDelivery as AmazonOfferDelivery, type OfferSeller as AmazonOfferSeller, type AmazonOffersParams, type OffersResponse as AmazonOffersResponse, type Pagination as AmazonPagination, type AmazonPrice, type Product as AmazonProduct, type ProductBadges as AmazonProductBadges, type ProductDeal as AmazonProductDeal, type ProductDetailResponse as AmazonProductDetailResponse, type AmazonProductParams, type ProductVariant as AmazonProductVariant, ProductsClient as AmazonProductsClient, type RatingBreakdown as AmazonRatingBreakdown, ReferenceClient as AmazonReferenceClient, type RelatedProduct as AmazonRelatedProduct, type Review as AmazonReview, type ReviewProfile as AmazonReviewProfile, type AmazonReviewsParams, type ReviewsResponse as AmazonReviewsResponse, SearchClient as AmazonSearchClient, type AmazonSearchParams, type SearchResponse as AmazonSearchResponse, type SearchResult as AmazonSearchResult, type Seller as AmazonSeller, type SellerFeedbackEntry as AmazonSellerFeedbackEntry, type SellerFeedbackResponse as AmazonSellerFeedbackResponse, type SellerFeedbackSummary as AmazonSellerFeedbackSummary, type AmazonSellerListParams, type AmazonSellerParams, type SellerProductsResponse as AmazonSellerProductsResponse, type SellerProfileResponse as AmazonSellerProfileResponse, SellersClient as AmazonSellersClient, type AutocompleteParams, type DetectOptions, type DetectResult, type DomainPostsResponse, type FinanceQuoteParams, type FlightsSearchParams, type FlightsStopsFilter, type FlightsTravelClass, type FlightsTripType, 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$1 as GoogleProductsClient, type GoogleResponse, ScholarClient as GoogleScholarClient, SearchClient$2 as GoogleSearchClient, type GoogleSearchParams, ShoppingClient as GoogleShoppingClient, ShortsClient as GoogleShortsClient, TrendsClient as GoogleTrendsClient, VideosClient as GoogleVideosClient, type HotelsDetailsParams, type HotelsSearchParams, type ImagesSearchParams, type JobsSearchParams, type LensSearchParams, type MapsPhotosParams, type MapsPlaceParams, type MapsPostsParams, type MapsReviewsParams, type MapsSearchParams, type NewsSearchParams, type NewsTopicsParams, type NewsTrendingParams, type PatentsDetailParams, type PatentsSearchParams, type PopularSubredditsResponse, type PostCommentsResponse, type PostDetailResponse, type PostDuplicatesResponse, type ProductsDetailParams, type RedditAward, RedditClient, type RedditComment, type RedditModeratedSubreddit, type RedditPagination, type RedditPost, PostsClient as RedditPostsClient, type RedditRule, SearchClient$1 as RedditSearchClient, type RedditSubreddit, SubredditsClient as RedditSubredditsClient, type RedditTrophy, type RedditUser, type UserProfileResponse as RedditUserProfileResponse, type RedditUserSubreddit, UsersClient as RedditUsersClient, type RedditWikiPage, type ScholarAuthorCitationParams, type ScholarAuthorParams, type ScholarCiteParams, type ScholarProfilesParams, type ScholarSearchParams, ScrapeBadger, ScrapeBadgerConfig, type ScrapeOptions, type ScrapeResult, type SearchPostsResponse, type SearchSubredditsResponse, type SearchUsersResponse, type ShoppingClickParams, type ShoppingProductParams, type ShoppingSearchParams, type ShortsSearchParams, type SubredditDetailResponse, type SubredditPostsResponse, type SubredditRulesResponse, type SubredditWikiPagesResponse, type TrendingPostsResponse, type TrendsAutocompleteParams, type TrendsInterestParams, type TrendsRegionsParams, type TrendsRelatedParams, type TrendsTrendingParams, TwitterClient, type UserCommentsResponse, type UserModeratedResponse, type UserPostsResponse, type UserTrophiesResponse, type VideosSearchParams, type VintedBrand, type BrandsResponse as VintedBrandsResponse, VintedClient, type VintedColor, type ColorsResponse as VintedColorsResponse, type VintedItemDetail, type ItemDetailResponse as VintedItemDetailResponse, type VintedItemSummary, ItemsClient as VintedItemsClient, type VintedMarket, type MarketsResponse$1 as VintedMarketsResponse, type VintedPagination, type VintedPhoto, type VintedPrice, ReferenceClient$1 as VintedReferenceClient, SearchClient$3 as VintedSearchClient, type VintedSearchParams, type SearchResponse$1 as VintedSearchResponse, type VintedSellerSummary, type VintedStatus, type StatusesResponse as VintedStatusesResponse, type UserItemsResponse as VintedUserItemsResponse, type VintedUserProfile, type UserProfileResponse$1 as VintedUserProfileResponse, type VintedUserSummary, UsersClient$1 as VintedUsersClient, WebClient, type WikiPageResponse };
|