scrapebadger 0.40.0 → 0.40.1
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/dist/index.d.cts +28 -7
- package/dist/index.d.ts +28 -7
- package/dist/index.js +29 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/version.ts","../src/internal/exceptions.ts","../src/internal/client.ts","../src/internal/config.ts","../src/internal/pagination.ts","../src/twitter/tweets.ts","../src/twitter/users.ts","../src/twitter/lists.ts","../src/twitter/communities.ts","../src/twitter/trends.ts","../src/twitter/geo.ts","../src/twitter/stream.ts","../src/twitter/spaces.ts","../src/twitter/client.ts","../src/web/client.ts","../src/vinted/search.ts","../src/vinted/items.ts","../src/vinted/users.ts","../src/vinted/reference.ts","../src/vinted/client.ts","../src/google/ai-mode.ts","../src/google/autocomplete.ts","../src/google/finance.ts","../src/google/flights.ts","../src/google/hotels.ts","../src/google/images.ts","../src/google/jobs.ts","../src/google/lens.ts","../src/google/maps.ts","../src/google/news.ts","../src/google/patents.ts","../src/google/products.ts","../src/google/scholar.ts","../src/google/search.ts","../src/google/shopping.ts","../src/google/shorts.ts","../src/google/trends.ts","../src/google/videos.ts","../src/google/client.ts","../src/google_play/client.ts","../src/idealista/client.ts","../src/reddit/search.ts","../src/reddit/posts.ts","../src/reddit/subreddits.ts","../src/reddit/users.ts","../src/reddit/client.ts","../src/apartments/client.ts","../src/app_store/client.ts","../src/instagram/users.ts","../src/instagram/media.ts","../src/instagram/search.ts","../src/instagram/reference.ts","../src/instagram/client.ts","../src/redfin/client.ts","../src/account/client.ts","../src/airbnb/client.ts","../src/amazon/search.ts","../src/amazon/products.ts","../src/amazon/listings.ts","../src/amazon/sellers.ts","../src/amazon/reference.ts","../src/amazon/client.ts","../src/shopee/search.ts","../src/shopee/products.ts","../src/shopee/reviews.ts","../src/shopee/reference.ts","../src/shopee/client.ts","../src/tiktok/users.ts","../src/tiktok/videos.ts","../src/tiktok/search.ts","../src/tiktok/music.ts","../src/tiktok/hashtags.ts","../src/tiktok/trending.ts","../src/tiktok/ads.ts","../src/tiktok/reference.ts","../src/tiktok/client.ts","../src/ebay/search.ts","../src/ebay/items.ts","../src/ebay/sellers.ts","../src/ebay/categories.ts","../src/ebay/reference.ts","../src/ebay/client.ts","../src/facebook/client.ts","../src/walmart/search.ts","../src/walmart/products.ts","../src/walmart/sellers.ts","../src/walmart/stores.ts","../src/walmart/reference.ts","../src/walmart/client.ts","../src/duckduckgo/search.ts","../src/duckduckgo/media.ts","../src/duckduckgo/reference.ts","../src/duckduckgo/client.ts","../src/bing/search.ts","../src/bing/media.ts","../src/bing/news.ts","../src/bing/reference.ts","../src/bing/client.ts","../src/booking/client.ts","../src/baidu/client.ts","../src/yahoo/search.ts","../src/yahoo/media.ts","../src/yahoo/news.ts","../src/yahoo/reference.ts","../src/yahoo/client.ts","../src/yandex/search.ts","../src/yandex/images.ts","../src/yandex/reference.ts","../src/yandex/client.ts","../src/youtube/search.ts","../src/youtube/videos.ts","../src/youtube/channels.ts","../src/youtube/playlists.ts","../src/youtube/community.ts","../src/youtube/shorts.ts","../src/youtube/trending.ts","../src/youtube/music.ts","../src/youtube/reference.ts","../src/youtube/client.ts","../src/realtor/search.ts","../src/realtor/properties.ts","../src/realtor/reference.ts","../src/realtor/client.ts","../src/leboncoin/search.ts","../src/leboncoin/ads.ts","../src/leboncoin/sellers.ts","../src/leboncoin/reference.ts","../src/leboncoin/client.ts","../src/zillow/search.ts","../src/zillow/properties.ts","../src/zillow/agent.ts","../src/zillow/reference.ts","../src/zillow/client.ts","../src/immobiliare/client.ts","../src/loopnet/search.ts","../src/loopnet/listings.ts","../src/loopnet/brokers.ts","../src/loopnet/reference.ts","../src/loopnet/client.ts","../src/perplexity/client.ts","../src/depop/client.ts","../src/linkedin/client.ts","../src/chatgpt/ask.ts","../src/chatgpt/brand.ts","../src/chatgpt/reference.ts","../src/chatgpt/client.ts","../src/gemini/ask.ts","../src/gemini/brand.ts","../src/gemini/client.ts","../src/client.ts"],"names":["EventEmitter","WebSocket","createHmac","timingSafeEqual","UsersClient","SearchClient","TrendsClient","ProductsClient","ReferenceClient","VideosClient","HashtagsClient","ItemsClient","SellersClient","MediaClient","NewsClient","ImagesClient","ShortsClient","TrendingClient","MusicClient","AdsClient","PropertiesClient","ListingsClient","AskClient","BrandClient"],"mappings":";;;;;;;;;;;AAQO,IAAM,WAAA,GAAc,QAAA;;;ACDpB,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0B,KAAA,CAAM;AAAA,EAC3C,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,mBAAA;AACZ,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,kBAAA,CAAkB,SAAS,CAAA;AAAA,EACzD;AACF;AAKO,IAAM,mBAAA,GAAN,MAAM,oBAAA,SAA4B,iBAAA,CAAkB;AAAA,EACzD,WAAA,CAAY,UAAU,4CAAA,EAA8C;AAClE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,qBAAA;AACZ,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,oBAAA,CAAoB,SAAS,CAAA;AAAA,EAC3D;AACF;AAKO,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuB,iBAAA,CAAkB;AAAA;AAAA,EAE3C,UAAA;AAAA;AAAA,EAEA,KAAA;AAAA;AAAA,EAEA,SAAA;AAAA,EAET,WAAA,CACE,OAAA,GAAU,sBAAA,EACV,OAAA,EACA;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AACZ,IAAA,IAAA,CAAK,aAAa,OAAA,EAAS,UAAA;AAC3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aAAA,CAAc,IAAA,CAAK,UAAU,CAAA;AAChD,IAAA,IAAA,CAAK,MAAA,GAAS,IAAI,YAAA,CAAa,IAAA,CAAK,UAAU,CAAA;AAAA,EAChD;AACF","file":"index.js","sourcesContent":["/**\n * Single source-of-truth for the SDK version string.\n *\n * This constant is kept in sync with package.json by the release workflow.\n * It is used to set the User-Agent header on all outgoing requests.\n *\n * @internal\n */\nexport const SDK_VERSION = \"0.40.0\";\n","/**\n * Custom exceptions for the ScrapeBadger SDK.\n */\n\n/**\n * Base error class for all ScrapeBadger errors.\n */\nexport class ScrapeBadgerError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ScrapeBadgerError\";\n Object.setPrototypeOf(this, ScrapeBadgerError.prototype);\n }\n}\n\n/**\n * Raised when authentication fails (invalid or missing API key).\n */\nexport class AuthenticationError extends ScrapeBadgerError {\n constructor(message = \"Authentication failed. Check your API key.\") {\n super(message);\n this.name = \"AuthenticationError\";\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n}\n\n/**\n * Raised when rate limit is exceeded.\n */\nexport class RateLimitError extends ScrapeBadgerError {\n /** Unix timestamp when the rate limit resets */\n readonly retryAfter: number | undefined;\n /** Maximum requests per minute for this tier */\n readonly limit: number | undefined;\n /** Remaining requests in the current window */\n readonly remaining: number | undefined;\n\n constructor(\n message = \"Rate limit exceeded.\",\n options?: { retryAfter?: number; limit?: number; remaining?: number }\n ) {\n super(message);\n this.name = \"RateLimitError\";\n this.retryAfter = options?.retryAfter;\n this.limit = options?.limit;\n this.remaining = options?.remaining;\n Object.setPrototypeOf(this, RateLimitError.prototype);\n }\n}\n\n/**\n * Raised when the requested resource is not found.\n */\nexport class NotFoundError extends ScrapeBadgerError {\n /** The resource type that was not found */\n readonly resourceType: string | undefined;\n /** The resource ID that was not found */\n readonly resourceId: string | undefined;\n\n constructor(message = \"Resource not found.\", resourceType?: string, resourceId?: string) {\n super(message);\n this.name = \"NotFoundError\";\n this.resourceType = resourceType;\n this.resourceId = resourceId;\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n\n/**\n * Raised when the request is invalid.\n */\nexport class ValidationError extends ScrapeBadgerError {\n /** Validation errors by field */\n readonly errors: Record<string, string[]> | undefined;\n\n constructor(message = \"Validation error.\", errors?: Record<string, string[]>) {\n super(message);\n this.name = \"ValidationError\";\n this.errors = errors;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\n/**\n * Raised when an internal server error occurs.\n */\nexport class ServerError extends ScrapeBadgerError {\n /** HTTP status code */\n readonly statusCode: number;\n\n constructor(message = \"Internal server error.\", statusCode = 500) {\n super(message);\n this.name = \"ServerError\";\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n\n/**\n * Raised when the request times out.\n */\nexport class TimeoutError extends ScrapeBadgerError {\n /** Timeout duration in milliseconds */\n readonly timeout: number;\n\n constructor(message = \"Request timed out.\", timeout: number) {\n super(message);\n this.name = \"TimeoutError\";\n this.timeout = timeout;\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\n/**\n * Raised when the account has insufficient credits.\n */\nexport class InsufficientCreditsError extends ScrapeBadgerError {\n /** Current credit balance */\n readonly creditsBalance: number | undefined;\n\n constructor(message = \"Insufficient credits.\", creditsBalance?: number) {\n super(message);\n this.name = \"InsufficientCreditsError\";\n this.creditsBalance = creditsBalance;\n Object.setPrototypeOf(this, InsufficientCreditsError.prototype);\n }\n}\n\n/**\n * Raised when the account is restricted.\n */\nexport class AccountRestrictedError extends ScrapeBadgerError {\n /** Reason for the restriction */\n readonly reason: string | undefined;\n\n constructor(message = \"Account restricted.\", reason?: string) {\n super(message);\n this.name = \"AccountRestrictedError\";\n this.reason = reason;\n Object.setPrototypeOf(this, AccountRestrictedError.prototype);\n }\n}\n\n/**\n * Raised when a resource conflict occurs (e.g. duplicate monitor name).\n *\n * Maps to HTTP 409 Conflict.\n *\n * @example\n * ```typescript\n * import { ConflictError } from \"scrapebadger\";\n *\n * try {\n * await client.twitter.stream.createMonitor({\n * name: \"Existing Monitor\",\n * usernames: [\"elonmusk\"],\n * pollIntervalSeconds: 10,\n * });\n * } catch (err) {\n * if (err instanceof ConflictError) {\n * console.error(\"Monitor name already exists:\", err.message);\n * }\n * }\n * ```\n */\nexport class ConflictError extends ScrapeBadgerError {\n constructor(message = \"Resource conflict.\") {\n super(message);\n this.name = \"ConflictError\";\n Object.setPrototypeOf(this, ConflictError.prototype);\n }\n}\n\n/**\n * Raised when the WebSocket stream connection fails or is terminated.\n *\n * Common codes:\n * - 4001 -- Invalid or missing API key (auth failure)\n * - 4003 -- Connection limit exceeded (max 5 per API key)\n * - 1001 -- Server closed due to pong timeout\n * - 0 -- Unknown/parse error\n *\n * @example\n * ```typescript\n * import { WebSocketStreamError } from \"scrapebadger\";\n *\n * try {\n * for await (const event of client.twitter.stream.connectIter()) {\n * // ...\n * }\n * } catch (err) {\n * if (err instanceof WebSocketStreamError && err.code === 4001) {\n * console.error(\"API key rejected -- check your key\");\n * }\n * }\n * ```\n */\nexport class WebSocketStreamError extends ScrapeBadgerError {\n /** WebSocket close code or server error code */\n readonly code: number | undefined;\n\n constructor(message = \"WebSocket stream error\", code?: number) {\n super(message);\n this.name = \"WebSocketStreamError\";\n this.code = code;\n Object.setPrototypeOf(this, WebSocketStreamError.prototype);\n }\n}\n","/**\n * Base HTTP client with retry logic and error handling.\n */\n\nimport type { ResolvedConfig } from \"./config.js\";\nimport { SDK_VERSION } from \"./version.js\";\nimport {\n AuthenticationError,\n RateLimitError,\n NotFoundError,\n ValidationError,\n ServerError,\n TimeoutError,\n InsufficientCreditsError,\n AccountRestrictedError,\n ConflictError,\n ScrapeBadgerError,\n} from \"./exceptions.js\";\n\n/**\n * Server-side status codes worth retrying.\n *\n * A transient 500 is no more permanent than a 502, and both clear on a retry\n * far more often than not. Kept in step with the Python SDK's `retry_on_status`.\n */\nconst RETRYABLE_STATUS_CODES = [500, 502, 503, 504];\n\nexport interface RateLimit {\n limit: number;\n remaining: number;\n reset: number; // unix timestamp\n}\n\nexport interface ResponseWithHeaders<T> {\n data: T;\n rateLimit?: RateLimit;\n}\n\nexport interface RequestOptions {\n method?: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\";\n params?: Record<string, string | number | boolean | undefined>;\n body?: unknown;\n headers?: Record<string, string>;\n}\n\ninterface ErrorResponse {\n detail?: string;\n message?: string;\n errors?: Record<string, string[]>;\n limit?: number;\n remaining?: number;\n reset_at?: number;\n reason?: string;\n credits_balance?: number;\n}\n\n/**\n * Base HTTP client for making API requests.\n */\nexport class BaseClient {\n readonly config: ResolvedConfig;\n\n constructor(config: ResolvedConfig) {\n this.config = config;\n }\n\n /**\n * Make an HTTP request to the API.\n */\n async request<T>(path: string, options: RequestOptions = {}): Promise<T> {\n const { data } = await this.requestRaw<T>(path, options);\n return data;\n }\n\n /**\n * POST and return the undecoded response body.\n *\n * For endpoints that answer with something other than JSON — currently\n * `/v1/web/scrape` with `raw_content: true`, which returns the scraped body\n * itself. The normal path funnels a non-JSON response into\n * `{ detail: await response.text() }`, which both loses the result and, for\n * a binary payload, corrupts it: `text()` decodes bytes as UTF-8.\n *\n * Returns the raw bytes plus the response headers.\n */\n async postBinary(\n path: string,\n options: RequestOptions = {}\n ): Promise<{ bytes: Uint8Array; headers: Headers; status: number }> {\n const url = new URL(path, this.config.baseUrl);\n const { body, headers = {} } = options;\n\n const response = await this.fetchWithTimeout(url.toString(), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-API-Key\": this.config.apiKey,\n \"User-Agent\": `scrapebadger-node/${SDK_VERSION}`,\n ...headers,\n },\n body: body ? JSON.stringify(body) : undefined,\n });\n\n if (!response.ok) {\n // Let the shared error mapping raise the right typed error.\n await this.handleResponse<unknown>(response);\n }\n\n return {\n bytes: new Uint8Array(await response.arrayBuffer()),\n headers: response.headers,\n status: response.status,\n };\n }\n\n /**\n * Make an HTTP request and return both data and rate limit headers.\n */\n async requestWithHeaders<T>(\n path: string,\n options: RequestOptions = {}\n ): Promise<ResponseWithHeaders<T>> {\n return this.requestRaw<T>(path, options);\n }\n\n /**\n * Internal method that builds the request and executes it, returning data and rate limit info.\n */\n private async requestRaw<T>(\n path: string,\n options: RequestOptions = {}\n ): Promise<ResponseWithHeaders<T>> {\n const { method = \"GET\", params, body, headers = {} } = options;\n\n // Build URL with query parameters\n const url = new URL(path, this.config.baseUrl);\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n // Build headers\n const requestHeaders: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"X-API-Key\": this.config.apiKey,\n \"User-Agent\": `scrapebadger-node/${SDK_VERSION}`,\n ...headers,\n };\n\n // Build request options\n const fetchOptions: RequestInit = {\n method,\n headers: requestHeaders,\n };\n\n if (body && method !== \"GET\") {\n fetchOptions.body = JSON.stringify(body);\n }\n\n // Execute with retry logic\n return this.executeWithRetry<T>(url.toString(), fetchOptions);\n }\n\n /**\n * Execute request with exponential backoff retry logic.\n */\n private async executeWithRetry<T>(\n url: string,\n options: RequestInit\n ): Promise<ResponseWithHeaders<T>> {\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {\n try {\n const httpResponse = await this.fetchWithTimeout(url, options);\n const data = await this.handleResponse<T>(httpResponse);\n const rateLimit = this.parseRateLimitHeaders(httpResponse.headers);\n return { data, rateLimit };\n } catch (error) {\n lastError = error as Error;\n\n // Client errors (auth, validation, not-found) are final — retrying only\n // delays the throw. Transient server failures and timeouts fall through.\n if (!BaseClient.isRetryable(error)) {\n throw error;\n }\n\n // Don't retry after exhausting attempts\n if (attempt === this.config.maxRetries) {\n break;\n }\n\n // Calculate delay with exponential backoff\n const delay = this.config.retryDelay * Math.pow(2, attempt);\n const delaySec = Math.round(delay / 1000);\n const attemptNum = attempt + 1;\n const maxRetries = this.config.maxRetries;\n\n // Warn with ANSI yellow coloring\n if (error instanceof RateLimitError) {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: 429 Rate Limited — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n // For rate limits, use retry-after if available\n if (error.retryAfter) {\n const retryDelay = (error.retryAfter - Date.now() / 1000) * 1000;\n if (retryDelay > 0 && retryDelay < 60000) {\n await this.sleep(retryDelay);\n continue;\n }\n }\n } else if (error instanceof TimeoutError) {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: TimeoutError — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n } else if (error instanceof ServerError) {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: ${error.statusCode} ${error.message} — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n } else {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: ${(error as Error).name} — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n }\n\n await this.sleep(delay);\n }\n }\n\n throw lastError ?? new ScrapeBadgerError(\"Request failed after retries\");\n }\n\n /**\n * Parse rate limit headers from an HTTP response.\n */\n private parseRateLimitHeaders(headers: Headers): RateLimit | undefined {\n const limit = headers.get(\"X-RateLimit-Limit\");\n const remaining = headers.get(\"X-RateLimit-Remaining\");\n const reset = headers.get(\"X-RateLimit-Reset\");\n\n if (limit === null || remaining === null || reset === null) {\n return undefined;\n }\n\n const parsedLimit = parseInt(limit, 10);\n const parsedRemaining = parseInt(remaining, 10);\n const parsedReset = parseInt(reset, 10);\n\n if (isNaN(parsedLimit) || isNaN(parsedRemaining) || isNaN(parsedReset)) {\n return undefined;\n }\n\n return { limit: parsedLimit, remaining: parsedRemaining, reset: parsedReset };\n }\n\n /**\n * Fetch with timeout support.\n */\n private async fetchWithTimeout(url: string, options: RequestInit): Promise<Response> {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);\n\n try {\n const response = await fetch(url, {\n ...options,\n signal: controller.signal,\n });\n return response;\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n throw new TimeoutError(\n `Request timed out after ${this.config.timeout}ms`,\n this.config.timeout\n );\n }\n throw error;\n } finally {\n clearTimeout(timeoutId);\n }\n }\n\n /**\n * Handle HTTP response and convert errors.\n */\n private async handleResponse<T>(response: Response): Promise<T> {\n // Parse response body\n let data: T | ErrorResponse;\n const contentType = response.headers.get(\"content-type\");\n\n if (contentType?.includes(\"application/json\")) {\n data = (await response.json()) as T | ErrorResponse;\n } else {\n const text = await response.text();\n data = { detail: text } as ErrorResponse;\n }\n\n // Handle success\n if (response.ok) {\n return data as T;\n }\n\n // Handle errors\n const errorData = data as ErrorResponse;\n const message = errorData.detail ?? errorData.message ?? \"Request failed\";\n\n switch (response.status) {\n case 401:\n throw new AuthenticationError(message);\n\n case 402:\n throw new InsufficientCreditsError(message, errorData.credits_balance);\n\n case 403:\n if (message.toLowerCase().includes(\"restricted\")) {\n throw new AccountRestrictedError(message, errorData.reason);\n }\n throw new AuthenticationError(message);\n\n case 404:\n throw new NotFoundError(message);\n\n case 409:\n throw new ConflictError(message);\n\n case 422:\n throw new ValidationError(message, errorData.errors);\n\n case 429:\n throw new RateLimitError(message, {\n retryAfter: errorData.reset_at,\n limit: errorData.limit,\n remaining: errorData.remaining,\n });\n\n default:\n if (response.status >= 500) {\n throw new ServerError(message, response.status);\n }\n throw new ScrapeBadgerError(message);\n }\n }\n\n /**\n * Whether a failed request is worth another attempt.\n *\n * Retryable: transient server failures (500/502/503/504), request timeouts,\n * rate limits, and raw network faults thrown by `fetch` itself. Everything\n * else — auth, validation, not-found, conflict — is final.\n */\n private static isRetryable(error: unknown): boolean {\n if (error instanceof ServerError) {\n return RETRYABLE_STATUS_CODES.includes(error.statusCode);\n }\n if (error instanceof RateLimitError || error instanceof TimeoutError) {\n return true;\n }\n // Anything that isn't one of ours is a network-level fault from fetch.\n return !(error instanceof ScrapeBadgerError);\n }\n\n /**\n * Sleep for a given duration.\n */\n private sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n}\n","/**\n * Configuration management for the ScrapeBadger SDK.\n */\n\nexport interface ScrapeBadgerConfig {\n /** API key for authentication */\n apiKey: string;\n /** Base URL for the API (default: https://scrapebadger.com) */\n baseUrl?: string;\n /** Request timeout in milliseconds (default: 30000) */\n timeout?: number;\n /** Maximum number of retry attempts (default: 3) */\n maxRetries?: number;\n /** Initial retry delay in milliseconds (default: 1000) */\n retryDelay?: number;\n}\n\nexport interface ResolvedConfig {\n apiKey: string;\n baseUrl: string;\n timeout: number;\n maxRetries: number;\n retryDelay: number;\n}\n\nconst DEFAULT_BASE_URL = \"https://scrapebadger.com\";\nconst DEFAULT_TIMEOUT = 30000;\nconst DEFAULT_MAX_RETRIES = 10;\nconst DEFAULT_RETRY_DELAY = 1000;\n\n/**\n * Resolve configuration with defaults.\n */\nexport function resolveConfig(config: ScrapeBadgerConfig): ResolvedConfig {\n if (!config.apiKey) {\n throw new Error(\"API key is required\");\n }\n\n return {\n apiKey: config.apiKey,\n baseUrl: config.baseUrl ?? DEFAULT_BASE_URL,\n timeout: config.timeout ?? DEFAULT_TIMEOUT,\n maxRetries: config.maxRetries ?? DEFAULT_MAX_RETRIES,\n retryDelay: config.retryDelay ?? DEFAULT_RETRY_DELAY,\n };\n}\n\n/**\n * Load API key from environment variable.\n */\nexport function getApiKeyFromEnv(): string | undefined {\n if (typeof process !== \"undefined\" && process.env) {\n return process.env.SCRAPEBADGER_API_KEY;\n }\n return undefined;\n}\n","/**\n * Pagination utilities for the ScrapeBadger SDK.\n */\n\nimport type { RateLimit } from \"./client.js\";\n\n/**\n * Response wrapper for paginated API responses.\n */\nexport interface PaginatedResponse<T> {\n /** Array of items in the current page */\n data: T[];\n /** Cursor for the next page, if available */\n nextCursor?: string;\n /** Whether there are more pages available */\n hasMore: boolean;\n}\n\n/**\n * Options for paginated requests.\n */\nexport interface PaginationOptions {\n /** Maximum number of items to fetch per request (default: 20) */\n count?: number;\n /** Cursor for pagination */\n cursor?: string;\n}\n\n/**\n * Options for async iteration.\n */\nexport interface IteratorOptions extends PaginationOptions {\n /** Maximum total number of items to fetch (default: unlimited) */\n maxItems?: number;\n}\n\n/**\n * Page result returned by fetchPage callbacks passed to paginate().\n */\nexport interface PageResult<T> {\n response: PaginatedResponse<T>;\n rateLimit?: RateLimit;\n}\n\n/**\n * Create a paginated response from API response data.\n */\nexport function createPaginatedResponse<T>(data: T[], cursor?: string): PaginatedResponse<T> {\n return {\n data,\n nextCursor: cursor,\n hasMore: !!cursor,\n };\n}\n\nconst RATE_LIMIT_WARN_THRESHOLD = 0.2;\n\n/**\n * Async generator for paginating through API results.\n *\n * Automatically throttles when fewer than 20% of rate limit requests remain,\n * spreading requests across the remaining reset window.\n *\n * @param fetchPage - Function to fetch a single page; returns response + optional rate limit info\n * @param options - Pagination options\n * @yields Individual items from each page\n *\n * @example\n * ```typescript\n * // Iterate through all results\n * for await (const tweet of client.twitter.tweets.searchAll(\"query\")) {\n * console.log(tweet.text);\n * }\n *\n * // With max items limit\n * for await (const tweet of client.twitter.tweets.searchAll(\"query\", { maxItems: 100 })) {\n * console.log(tweet.text);\n * }\n * ```\n */\nexport async function* paginate<T>(\n fetchPage: (cursor?: string) => Promise<PageResult<T>>,\n options: IteratorOptions = {}\n): AsyncGenerator<T, void, undefined> {\n const { maxItems } = options;\n let cursor: string | undefined;\n let totalYielded = 0;\n\n do {\n const { response, rateLimit } = await fetchPage(cursor);\n\n // Throttle pagination when approaching rate limit\n if (rateLimit) {\n const { limit, remaining, reset } = rateLimit;\n if (limit > 0 && remaining / limit < RATE_LIMIT_WARN_THRESHOLD) {\n const nowSec = Date.now() / 1000;\n const windowRemainingSec = Math.max(reset - nowSec, 1);\n const delayMs =\n remaining > 0 ? (windowRemainingSec / remaining) * 1000 : windowRemainingSec * 1000;\n const resetInSec = Math.round(windowRemainingSec);\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: Rate limit: ${remaining}/${limit} remaining (resets in ${resetInSec}s), throttling pagination\\x1b[0m`\n );\n await sleep(delayMs);\n }\n }\n\n for (const item of response.data) {\n yield item;\n totalYielded++;\n\n if (maxItems !== undefined && totalYielded >= maxItems) {\n return;\n }\n }\n\n cursor = response.nextCursor;\n } while (cursor);\n}\n\n/**\n * Collect all items from an async generator into an array.\n *\n * @param generator - Async generator to collect from\n * @returns Array of all yielded items\n *\n * @example\n * ```typescript\n * const tweets = await collectAll(client.twitter.tweets.searchAll(\"query\", { maxItems: 100 }));\n * console.log(`Fetched ${tweets.length} tweets`);\n * ```\n */\nexport async function collectAll<T>(generator: AsyncGenerator<T, void, undefined>): Promise<T[]> {\n const items: T[] = [];\n for await (const item of generator) {\n items.push(item);\n }\n return items;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/**\n * Twitter Tweets API client.\n *\n * Provides methods for fetching tweets, searching, and getting tweet metadata.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { Tweet, User, QueryType, Article, CommunityNote } from \"./types.js\";\n\n/**\n * Client for Twitter tweets endpoints.\n *\n * Provides async methods for fetching individual tweets, searching tweets,\n * and getting tweet engagement data (retweeters, favoriters, replies).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get single tweet\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n *\n * // Search tweets\n * const results = await client.twitter.tweets.search(\"python programming\");\n * for (const tweet of results.data) {\n * console.log(tweet.text);\n * }\n *\n * // Iterate through all results\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\")) {\n * console.log(tweet.text);\n * }\n * ```\n */\nexport class TweetsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single tweet by ID.\n *\n * @param tweetId - The tweet ID to fetch.\n * @returns The tweet data.\n * @throws NotFoundError - If the tweet doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n * console.log(`@${tweet.username}: ${tweet.text}`);\n * ```\n */\n async getById(tweetId: string): Promise<Tweet> {\n return this.client.request<Tweet>(`/v1/twitter/tweets/tweet/${tweetId}`);\n }\n\n /**\n * Get multiple tweets by their IDs.\n *\n * @param tweetIds - List of tweet IDs to fetch.\n * @returns Paginated response containing the tweets.\n *\n * @example\n * ```typescript\n * const tweets = await client.twitter.tweets.getByIds([\n * \"1234567890\",\n * \"0987654321\"\n * ]);\n * for (const tweet of tweets.data) {\n * console.log(tweet.text);\n * }\n * ```\n */\n async getByIds(tweetIds: string[]): Promise<PaginatedResponse<Tweet>> {\n const tweetsParam = tweetIds.join(\",\");\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n \"/v1/twitter/tweets/\",\n { params: { tweets: tweetsParam } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get replies to a tweet.\n *\n * @param tweetId - The tweet ID to get replies for.\n * @param options - Pagination options.\n * @returns Paginated response containing reply tweets.\n *\n * @example\n * ```typescript\n * const replies = await client.twitter.tweets.getReplies(\"1234567890\");\n * for (const reply of replies.data) {\n * console.log(`@${reply.username}: ${reply.text}`);\n * }\n *\n * // Get next page\n * if (replies.hasMore) {\n * const more = await client.twitter.tweets.getReplies(\"1234567890\", {\n * cursor: replies.nextCursor\n * });\n * }\n * ```\n */\n async getReplies(\n tweetId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/replies`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get users who retweeted a tweet.\n *\n * @param tweetId - The tweet ID to get retweeters for.\n * @param options - Pagination options.\n * @returns Paginated response containing users who retweeted.\n *\n * @example\n * ```typescript\n * const retweeters = await client.twitter.tweets.getRetweeters(\"1234567890\");\n * for (const user of retweeters.data) {\n * console.log(`@${user.username} retweeted`);\n * }\n * ```\n */\n async getRetweeters(\n tweetId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/retweeters`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get users who liked/favorited a tweet.\n *\n * @param tweetId - The tweet ID to get favoriters for.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing users who liked.\n *\n * @example\n * ```typescript\n * const likers = await client.twitter.tweets.getFavoriters(\"1234567890\");\n * console.log(`${likers.data.length} users liked this tweet`);\n * ```\n */\n async getFavoriters(\n tweetId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/favoriters`,\n { params: { count: options.count ?? 40, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get tweets similar to a given tweet.\n *\n * @param tweetId - The tweet ID to find similar tweets for.\n * @returns Paginated response containing similar tweets.\n *\n * @example\n * ```typescript\n * const similar = await client.twitter.tweets.getSimilar(\"1234567890\");\n * for (const tweet of similar.data) {\n * console.log(`Similar: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getSimilar(tweetId: string): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/similar`\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get tweets that quote a specific tweet.\n *\n * @param tweetId - The tweet ID to get quote tweets for.\n * @param options - Pagination options.\n * @returns Paginated response containing tweets that quote this tweet.\n *\n * @example\n * ```typescript\n * const quotes = await client.twitter.tweets.getQuotes(\"1234567890\");\n * for (const quote of quotes.data) {\n * console.log(`@${quote.username} quoted: ${quote.text.slice(0, 100)}...`);\n * }\n *\n * // Get next page\n * if (quotes.hasMore) {\n * const more = await client.twitter.tweets.getQuotes(\"1234567890\", {\n * cursor: quotes.nextCursor\n * });\n * }\n * ```\n */\n async getQuotes(\n tweetId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/quotes`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all quote tweets with automatic pagination.\n *\n * This is a convenience method that automatically handles pagination,\n * yielding quote tweets one at a time.\n *\n * @param tweetId - The tweet ID to get quote tweets for.\n * @param options - Iteration options.\n * @yields Tweet objects that quote the specified tweet.\n *\n * @example\n * ```typescript\n * // Get all quote tweets (up to 500)\n * for await (const quote of client.twitter.tweets.getQuotesAll(\"1234567890\", {\n * maxItems: 500\n * })) {\n * console.log(`@${quote.username}: ${quote.text}`);\n * }\n *\n * // Collect into an array\n * import { collectAll } from \"scrapebadger\";\n * const quotes = await collectAll(\n * client.twitter.tweets.getQuotesAll(\"1234567890\", { maxItems: 100 })\n * );\n * ```\n */\n async *getQuotesAll(\n tweetId: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/tweets/tweet/${tweetId}/quotes`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Search for tweets.\n *\n * @param query - Search query string. Supports Twitter advanced search operators.\n * @param options - Search options including query type and pagination.\n * @returns Paginated response containing matching tweets.\n *\n * @example\n * ```typescript\n * // Basic search\n * const results = await client.twitter.tweets.search(\"python programming\");\n *\n * // Latest tweets only\n * const latest = await client.twitter.tweets.search(\"python\", {\n * queryType: \"Latest\"\n * });\n *\n * // Advanced search operators\n * const fromUser = await client.twitter.tweets.search(\"from:elonmusk lang:en\");\n * ```\n */\n async search(\n query: string,\n options: PaginationOptions & { queryType?: QueryType; count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n \"/v1/twitter/tweets/advanced_search\",\n {\n params: {\n query,\n query_type: options.queryType ?? \"Top\",\n count: options.count,\n cursor: options.cursor,\n },\n }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all search results with automatic pagination.\n *\n * This is a convenience method that automatically handles pagination,\n * yielding tweets one at a time.\n *\n * @param query - Search query string.\n * @param options - Search and iteration options.\n * @yields Tweet objects matching the search query.\n *\n * @example\n * ```typescript\n * // Get up to 1000 tweets\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\", {\n * maxItems: 1000\n * })) {\n * console.log(tweet.text);\n * }\n *\n * // Collect into an array\n * import { collectAll } from \"scrapebadger\";\n * const tweets = await collectAll(\n * client.twitter.tweets.searchAll(\"python\", { maxItems: 100 })\n * );\n * ```\n */\n async *searchAll(\n query: string,\n options: IteratorOptions & { queryType?: QueryType; count?: number } = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(\"/v1/twitter/tweets/advanced_search\", {\n params: {\n query,\n query_type: options.queryType ?? \"Top\",\n count: options.count,\n cursor,\n },\n });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get tweets from a user's timeline.\n *\n * @param username - Twitter username (without @).\n * @param options - Pagination options.\n * @returns Paginated response containing the user's tweets.\n *\n * @example\n * ```typescript\n * const tweets = await client.twitter.tweets.getUserTweets(\"elonmusk\");\n * for (const tweet of tweets.data) {\n * console.log(`${tweet.created_at}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getUserTweets(\n username: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/latest_tweets`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all tweets from a user with automatic pagination.\n *\n * @param username - Twitter username (without @).\n * @param options - Iteration options.\n * @yields Tweet objects from the user's timeline.\n *\n * @example\n * ```typescript\n * for await (const tweet of client.twitter.tweets.getUserTweetsAll(\"elonmusk\", {\n * maxItems: 500\n * })) {\n * console.log(tweet.text);\n * }\n * ```\n */\n async *getUserTweetsAll(\n username: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/users/${username}/latest_tweets`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get the edit history of a tweet.\n *\n * @param tweetId - The tweet ID to get edit history for.\n * @returns Paginated response containing tweet versions.\n *\n * @example\n * ```typescript\n * const history = await client.twitter.tweets.getEditHistory(\"1234567890\");\n * console.log(`${history.data.length} version(s) of this tweet`);\n * ```\n */\n async getEditHistory(tweetId: string): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[] }>(\n `/v1/twitter/tweets/tweet/${tweetId}/edit_history`\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get community notes (Birdwatch) attached to a tweet.\n *\n * @param tweetId - The tweet ID to get community notes for.\n * @returns Paginated response containing community notes.\n *\n * @example\n * ```typescript\n * const notes = await client.twitter.tweets.getCommunityNotes(\"1234567890\");\n * for (const note of notes.data) {\n * console.log(note.text);\n * }\n * ```\n */\n async getCommunityNotes(tweetId: string): Promise<PaginatedResponse<CommunityNote>> {\n const response = await this.client.request<{ data?: CommunityNote[] }>(\n `/v1/twitter/tweets/tweet/${tweetId}/community_notes`\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get a long-form article by its ID.\n *\n * @param articleId - The article ID to fetch.\n * @returns The article data.\n *\n * @example\n * ```typescript\n * const article = await client.twitter.tweets.getArticle(\"abc123\");\n * console.log(`${article.title}: ${article.text?.slice(0, 100)}...`);\n * ```\n */\n async getArticle(articleId: string): Promise<Article> {\n return this.client.request<Article>(`/v1/twitter/tweets/article/${articleId}`);\n }\n}\n","/**\n * Twitter Users API client.\n *\n * Provides methods for fetching user profiles, followers, following, and related data.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { User, UserAbout, UserIds, Tweet } from \"./types.js\";\n\n/**\n * Client for Twitter users endpoints.\n *\n * Provides async methods for fetching user profiles, followers, following,\n * and other user-related data.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get user profile\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n * console.log(`${user.name}: ${user.followers_count.toLocaleString()} followers`);\n *\n * // Get followers\n * const followers = await client.twitter.users.getFollowers(\"elonmusk\");\n *\n * // Iterate through all followers\n * for await (const follower of client.twitter.users.getFollowersAll(\"elonmusk\")) {\n * console.log(follower.username);\n * }\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a user by their numeric ID.\n *\n * @param userId - The user's numeric ID.\n * @returns The user profile.\n * @throws NotFoundError - If the user doesn't exist.\n *\n * @example\n * ```typescript\n * const user = await client.twitter.users.getById(\"44196397\");\n * console.log(`@${user.username}`);\n * ```\n */\n async getById(userId: string): Promise<User> {\n return this.client.request<User>(`/v1/twitter/users/${userId}/by_id`);\n }\n\n /**\n * Get a user by their username.\n *\n * @param username - The user's username (without @).\n * @returns The user profile.\n * @throws NotFoundError - If the user doesn't exist.\n *\n * @example\n * ```typescript\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n * console.log(`${user.name} has ${user.followers_count.toLocaleString()} followers`);\n * ```\n */\n async getByUsername(username: string): Promise<User> {\n return this.client.request<User>(`/v1/twitter/users/${username}/by_username`);\n }\n\n /**\n * Get extended \"About\" information for a user.\n *\n * Returns additional metadata including account location,\n * username change history, and verification details.\n *\n * @param username - The user's username (without @).\n * @returns Extended user information.\n *\n * @example\n * ```typescript\n * const about = await client.twitter.users.getAbout(\"elonmusk\");\n * console.log(`Account based in: ${about.account_based_in}`);\n * console.log(`Username changes: ${about.username_changes}`);\n * ```\n */\n async getAbout(username: string): Promise<UserAbout> {\n return this.client.request<UserAbout>(`/v1/twitter/users/${username}/about`);\n }\n\n /**\n * Get a user's followers.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options.\n * @returns Paginated response containing follower users.\n *\n * @example\n * ```typescript\n * const followers = await client.twitter.users.getFollowers(\"elonmusk\");\n * for (const user of followers.data) {\n * console.log(`@${user.username}`);\n * }\n *\n * // Get next page\n * if (followers.hasMore) {\n * const more = await client.twitter.users.getFollowers(\"elonmusk\", {\n * cursor: followers.nextCursor\n * });\n * }\n * ```\n */\n async getFollowers(\n username: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/followers`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all followers with automatic pagination.\n *\n * @param username - The user's username (without @).\n * @param options - Iteration options.\n * @yields User objects for each follower.\n *\n * @example\n * ```typescript\n * for await (const follower of client.twitter.users.getFollowersAll(\"elonmusk\", {\n * maxItems: 1000\n * })) {\n * console.log(follower.username);\n * }\n * ```\n */\n async *getFollowersAll(\n username: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(`/v1/twitter/users/${username}/followers`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get users that a user is following.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options.\n * @returns Paginated response containing followed users.\n *\n * @example\n * ```typescript\n * const following = await client.twitter.users.getFollowing(\"elonmusk\");\n * for (const user of following.data) {\n * console.log(`Follows @${user.username}`);\n * }\n * ```\n */\n async getFollowing(\n username: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/followings`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all following with automatic pagination.\n *\n * @param username - The user's username (without @).\n * @param options - Iteration options.\n * @yields User objects for each followed account.\n */\n async *getFollowingAll(\n username: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(`/v1/twitter/users/${username}/followings`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get a user's most recent followers.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing recent followers.\n */\n async getLatestFollowers(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/latest_followers`,\n { params: { count: options.count ?? 200, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get accounts a user most recently followed.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing recently followed users.\n */\n async getLatestFollowing(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/latest_following`,\n { params: { count: options.count ?? 200, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get follower IDs for a user.\n *\n * More efficient than getFollowers when you only need IDs.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns UserIds containing list of follower IDs.\n *\n * @example\n * ```typescript\n * const ids = await client.twitter.users.getFollowerIds(\"elonmusk\");\n * console.log(`Found ${ids.ids.length.toLocaleString()} follower IDs`);\n * ```\n */\n async getFollowerIds(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<UserIds> {\n const response = await this.client.request<{ data?: { ids?: number[]; next_cursor?: string } }>(\n `/v1/twitter/users/${username}/follower_ids`,\n { params: { count: options.count ?? 5000, cursor: options.cursor } }\n );\n return {\n ids: response.data?.ids ?? [],\n next_cursor: response.data?.next_cursor,\n };\n }\n\n /**\n * Get following IDs for a user.\n *\n * More efficient than getFollowing when you only need IDs.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns UserIds containing list of following IDs.\n */\n async getFollowingIds(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<UserIds> {\n const response = await this.client.request<{ data?: { ids?: number[]; next_cursor?: string } }>(\n `/v1/twitter/users/${username}/following_ids`,\n { params: { count: options.count ?? 5000, cursor: options.cursor } }\n );\n return {\n ids: response.data?.ids ?? [],\n next_cursor: response.data?.next_cursor,\n };\n }\n\n /**\n * Get verified followers for a user.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing verified followers.\n */\n async getVerifiedFollowers(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/verified_followers`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get followers that the authenticated user also follows.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing mutual connections.\n */\n async getFollowersYouKnow(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/followers_you_know`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get premium accounts that a user subscribes to.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing subscribed accounts.\n */\n async getSubscriptions(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/subscriptions`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get a user's highlighted tweets.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing highlighted tweets.\n */\n async getHighlights(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/highlights`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search for users.\n *\n * @param query - Search query string.\n * @param options - Pagination options.\n * @returns Paginated response containing matching users.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.users.search(\"python developer\");\n * for (const user of results.data) {\n * console.log(`@${user.username}: ${user.description}`);\n * }\n * ```\n */\n async search(query: string, options: PaginationOptions = {}): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n \"/v1/twitter/users/search_users\",\n { params: { query, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all search results with automatic pagination.\n *\n * @param query - Search query string.\n * @param options - Iteration options.\n * @yields User objects matching the search query.\n */\n async *searchAll(\n query: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(\"/v1/twitter/users/search_users\", { params: { query, cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get multiple users by their numeric IDs in a single request.\n *\n * @param userIds - List of user IDs to fetch.\n * @returns Paginated response containing the matching users.\n *\n * @example\n * ```typescript\n * const users = await client.twitter.users.getByIds([\"44196397\", \"783214\"]);\n * for (const user of users.data) {\n * console.log(`@${user.username}`);\n * }\n * ```\n */\n async getByIds(userIds: string[]): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[] }>(\n \"/v1/twitter/users/batch_by_ids\",\n { params: { user_ids: userIds.join(\",\") } }\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get multiple users by their usernames in a single request.\n *\n * @param usernames - List of usernames (without @) to fetch.\n * @returns Paginated response containing the matching users.\n *\n * @example\n * ```typescript\n * const users = await client.twitter.users.getByUsernames([\"elonmusk\", \"twitter\"]);\n * for (const user of users.data) {\n * console.log(`${user.name}: ${user.followers_count?.toLocaleString()} followers`);\n * }\n * ```\n */\n async getByUsernames(usernames: string[]): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[] }>(\n \"/v1/twitter/users/batch_by_usernames\",\n { params: { usernames: usernames.join(\",\") } }\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get tweets that mention a user.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing tweets mentioning the user.\n *\n * @example\n * ```typescript\n * const mentions = await client.twitter.users.getMentions(\"elonmusk\");\n * for (const tweet of mentions.data) {\n * console.log(`@${tweet.username}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getMentions(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/mentions`,\n { params: { count: options.count, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get long-form articles authored by a user.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing the user's articles as tweets.\n *\n * @example\n * ```typescript\n * const articles = await client.twitter.users.getArticles(\"44196397\");\n * for (const article of articles.data) {\n * console.log(article.text?.slice(0, 100));\n * }\n * ```\n */\n async getArticles(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/articles`,\n { params: { count: options.count, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n}\n","/**\n * Twitter Lists API client.\n *\n * Provides methods for fetching Twitter lists, list members, and list tweets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { List, Tweet, User } from \"./types.js\";\n\n/**\n * Client for Twitter lists endpoints.\n *\n * Provides async methods for fetching list details, members, subscribers,\n * and tweets from lists.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search for lists\n * const lists = await client.twitter.lists.search(\"tech leaders\");\n *\n * // Get list details\n * const list = await client.twitter.lists.getDetail(\"123456\");\n * console.log(`${list.name}: ${list.member_count} members`);\n *\n * // Get list tweets\n * const tweets = await client.twitter.lists.getTweets(\"123456\");\n * ```\n */\nexport class ListsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get details for a specific list.\n *\n * @param listId - The list ID.\n * @returns The list details.\n * @throws NotFoundError - If the list doesn't exist.\n *\n * @example\n * ```typescript\n * const list = await client.twitter.lists.getDetail(\"123456\");\n * console.log(`${list.name} by @${list.username}`);\n * console.log(`${list.member_count} members, ${list.subscriber_count} subscribers`);\n * ```\n */\n async getDetail(listId: string): Promise<List> {\n return this.client.request<List>(`/v1/twitter/lists/${listId}/detail`);\n }\n\n /**\n * Get tweets from a list's timeline.\n *\n * @param listId - The list ID.\n * @param options - Pagination options.\n * @returns Paginated response containing tweets from list members.\n *\n * @example\n * ```typescript\n * const tweets = await client.twitter.lists.getTweets(\"123456\");\n * for (const tweet of tweets.data) {\n * console.log(`@${tweet.username}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getTweets(\n listId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/tweets`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all list tweets with automatic pagination.\n *\n * @param listId - The list ID.\n * @param options - Iteration options.\n * @yields Tweet objects from the list timeline.\n */\n async *getTweetsAll(\n listId: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/lists/${listId}/tweets`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get members of a list.\n *\n * @param listId - The list ID.\n * @param options - Pagination options.\n * @returns Paginated response containing list members.\n *\n * @example\n * ```typescript\n * const members = await client.twitter.lists.getMembers(\"123456\");\n * for (const user of members.data) {\n * console.log(`@${user.username}`);\n * }\n * ```\n */\n async getMembers(\n listId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/members`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all list members with automatic pagination.\n *\n * @param listId - The list ID.\n * @param options - Iteration options.\n * @yields User objects for each list member.\n */\n async *getMembersAll(\n listId: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(`/v1/twitter/lists/${listId}/members`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get subscribers of a list.\n *\n * @param listId - The list ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing list subscribers.\n */\n async getSubscribers(\n listId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/subscribers`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search for lists.\n *\n * @param query - Search query string.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing matching lists.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.lists.search(\"tech leaders\");\n * for (const list of results.data) {\n * console.log(`${list.name}: ${list.member_count} members`);\n * }\n * ```\n */\n async search(\n query: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<List>> {\n const response = await this.client.request<{ data?: List[]; next_cursor?: string }>(\n \"/v1/twitter/lists/search\",\n { params: { query, count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get lists owned by the authenticated user.\n *\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing the user's lists.\n */\n async getMyLists(\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<List>> {\n const response = await this.client.request<{ data?: List[]; next_cursor?: string }>(\n \"/v1/twitter/lists/my_lists\",\n { params: { count: options.count ?? 100, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search tweets within a specific list.\n *\n * @param listId - The list ID to search within.\n * @param query - Search query string.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing matching tweets from the list.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.lists.searchTweets(\"123456\", \"python\");\n * for (const tweet of results.data) {\n * console.log(`@${tweet.username}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async searchTweets(\n listId: string,\n query: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/search_tweets`,\n { params: { query, count: options.count, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n}\n","/**\n * Twitter Communities API client.\n *\n * Provides methods for fetching Twitter communities, members, and tweets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { Community, CommunityMember, CommunityTweetType, Tweet } from \"./types.js\";\n\n/**\n * Client for Twitter communities endpoints.\n *\n * Provides async methods for fetching community details, members,\n * moderators, and tweets.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search communities\n * const communities = await client.twitter.communities.search(\"python\");\n *\n * // Get community details\n * const community = await client.twitter.communities.getDetail(\"123456\");\n * console.log(`${community.name}: ${community.member_count} members`);\n *\n * // Get community tweets\n * const tweets = await client.twitter.communities.getTweets(\"123456\");\n * ```\n */\nexport class CommunitiesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Parse a community member from the API response.\n * Handles both flat format (user_id, username, role at top level)\n * and nested format (user object with id, username).\n */\n private parseCommunityMember(item: Record<string, unknown>): CommunityMember {\n if (\"user\" in item && item.user) {\n return item as unknown as CommunityMember;\n }\n // Flat format: map user_id -> id for User interface\n return {\n user: {\n id: (item.user_id as string) ?? \"\",\n username: (item.username as string) ?? \"\",\n name: (item.name as string) ?? \"\",\n profile_image_url: item.profile_image_url as string | undefined,\n verified: (item.verified as boolean) ?? false,\n is_blue_verified: item.is_blue_verified as boolean | undefined,\n },\n role: item.role as string | undefined,\n joined_at: item.joined_at as string | undefined,\n };\n }\n\n /**\n * Get details for a specific community.\n *\n * @param communityId - The community ID.\n * @returns The community details including rules and admin info.\n * @throws NotFoundError - If the community doesn't exist.\n *\n * @example\n * ```typescript\n * const community = await client.twitter.communities.getDetail(\"123456\");\n * console.log(`${community.name}`);\n * console.log(`Members: ${community.member_count?.toLocaleString()}`);\n * console.log(`Join policy: ${community.join_policy}`);\n *\n * if (community.rules) {\n * console.log(\"Rules:\");\n * for (const rule of community.rules) {\n * console.log(` - ${rule.name}`);\n * }\n * }\n * ```\n */\n async getDetail(communityId: string): Promise<Community> {\n return this.client.request<Community>(`/v1/twitter/communities/${communityId}`);\n }\n\n /**\n * Get tweets from a community.\n *\n * @param communityId - The community ID.\n * @param options - Options including tweet type, count, and pagination.\n * @returns Paginated response containing community tweets.\n *\n * @example\n * ```typescript\n * // Get top tweets\n * const tweets = await client.twitter.communities.getTweets(\"123456\");\n *\n * // Get latest tweets\n * const latest = await client.twitter.communities.getTweets(\"123456\", {\n * tweetType: \"Latest\"\n * });\n * ```\n */\n async getTweets(\n communityId: string,\n options: PaginationOptions & { tweetType?: CommunityTweetType; count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/communities/${communityId}/tweets`,\n {\n params: {\n tweet_type: options.tweetType ?? \"Top\",\n count: options.count ?? 40,\n cursor: options.cursor,\n },\n }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all community tweets with automatic pagination.\n *\n * @param communityId - The community ID.\n * @param options - Options including tweet type and iteration limits.\n * @yields Tweet objects from the community.\n */\n async *getTweetsAll(\n communityId: string,\n options: IteratorOptions & { tweetType?: CommunityTweetType } = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/communities/${communityId}/tweets`, {\n params: {\n tweet_type: options.tweetType ?? \"Top\",\n count: options.count ?? 40,\n cursor,\n },\n });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get members of a community.\n *\n * @param communityId - The community ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing community members.\n *\n * @example\n * ```typescript\n * const members = await client.twitter.communities.getMembers(\"123456\");\n * for (const member of members.data) {\n * console.log(`@${member.user.username} (${member.role})`);\n * }\n * ```\n */\n async getMembers(\n communityId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<CommunityMember>> {\n const response = await this.client.request<{\n data?: Record<string, unknown>[];\n next_cursor?: string;\n }>(`/v1/twitter/communities/${communityId}/members`, {\n params: { count: options.count ?? 20, cursor: options.cursor },\n });\n\n const data: CommunityMember[] = (response.data ?? []).map((item) =>\n this.parseCommunityMember(item)\n );\n\n return createPaginatedResponse(data, response.next_cursor);\n }\n\n /**\n * Get moderators of a community.\n *\n * @param communityId - The community ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing community moderators.\n */\n async getModerators(\n communityId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<CommunityMember>> {\n const response = await this.client.request<{\n data?: Record<string, unknown>[];\n next_cursor?: string;\n }>(`/v1/twitter/communities/${communityId}/moderators`, {\n params: { count: options.count ?? 20, cursor: options.cursor },\n });\n\n const data: CommunityMember[] = (response.data ?? []).map((item) =>\n this.parseCommunityMember(item)\n );\n\n return createPaginatedResponse(data, response.next_cursor);\n }\n\n /**\n * Search for communities.\n *\n * @param query - Search query string.\n * @param options - Pagination options.\n * @returns Paginated response containing matching communities.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.communities.search(\"python developers\");\n * for (const community of results.data) {\n * console.log(`${community.name}: ${community.member_count} members`);\n * }\n * ```\n */\n async search(\n query: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Community>> {\n const response = await this.client.request<{ data?: Community[]; next_cursor?: string }>(\n \"/v1/twitter/communities/search\",\n { params: { query, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search for tweets within a community.\n *\n * @param communityId - The community ID.\n * @param query - Search query string.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing matching tweets.\n */\n async searchTweets(\n communityId: string,\n query: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/communities/${communityId}/search_tweets`,\n { params: { query, count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get the community timeline (tweets from communities you're in).\n *\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing community timeline tweets.\n */\n async getTimeline(\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n \"/v1/twitter/communities/timeline\",\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n}\n","/**\n * Twitter Trends API client.\n *\n * Provides methods for fetching trending topics and trend locations.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { PaginatedResponse } from \"../internal/pagination.js\";\nimport { createPaginatedResponse } from \"../internal/pagination.js\";\nimport type { Trend, TrendCategory, Location, PlaceTrends } from \"./types.js\";\n\n/**\n * Client for Twitter trends endpoints.\n *\n * Provides async methods for fetching trending topics, place-specific trends,\n * and available trend locations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get global trends\n * const trends = await client.twitter.trends.getTrends();\n * for (const trend of trends.data) {\n * console.log(`${trend.name}: ${trend.tweet_count || 'N/A'} tweets`);\n * }\n *\n * // Get trends for a specific location\n * const usTrends = await client.twitter.trends.getPlaceTrends(23424977);\n *\n * // Get available locations\n * const locations = await client.twitter.trends.getAvailableLocations();\n * ```\n */\nexport class TrendsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get trending topics.\n *\n * @param options - Options for filtering trends.\n * @returns Paginated response containing trending topics.\n *\n * @example\n * ```typescript\n * // Get general trending topics\n * const trends = await client.twitter.trends.getTrends();\n *\n * // Get news trends\n * const newsTrends = await client.twitter.trends.getTrends({\n * category: \"news\"\n * });\n *\n * for (const trend of trends.data) {\n * const count = trend.tweet_count?.toLocaleString() || \"N/A\";\n * console.log(`${trend.name}: ${count} tweets`);\n * }\n * ```\n */\n async getTrends(\n options: { category?: TrendCategory; count?: number } = {}\n ): Promise<PaginatedResponse<Trend>> {\n const response = await this.client.request<{ data?: Trend[] }>(\"/v1/twitter/trends/\", {\n params: {\n category: options.category ?? \"trending\",\n count: options.count ?? 20,\n },\n });\n return createPaginatedResponse(response.data ?? []);\n }\n\n /**\n * Get trends for a specific location.\n *\n * @param woeid - Where On Earth ID for the location.\n * Common WOEIDs:\n * - 1: Worldwide\n * - 23424977: United States\n * - 23424975: United Kingdom\n * - 23424856: Japan\n * - 23424829: Germany\n * @returns PlaceTrends containing location info and trends.\n * @throws NotFoundError - If the WOEID is invalid.\n *\n * @example\n * ```typescript\n * // Get US trends\n * const usTrends = await client.twitter.trends.getPlaceTrends(23424977);\n * console.log(`Trends in ${usTrends.name}:`);\n * for (const trend of usTrends.trends) {\n * console.log(` - ${trend.name}`);\n * }\n *\n * // Get worldwide trends\n * const globalTrends = await client.twitter.trends.getPlaceTrends(1);\n * ```\n */\n async getPlaceTrends(woeid: number): Promise<PlaceTrends> {\n return this.client.request<PlaceTrends>(`/v1/twitter/trends/place/${woeid}`);\n }\n\n /**\n * Get all locations where trends are available.\n *\n * @returns Paginated response containing available trend locations.\n *\n * @example\n * ```typescript\n * const locations = await client.twitter.trends.getAvailableLocations();\n *\n * // Filter by country\n * const usLocations = locations.data.filter(\n * loc => loc.country_code === \"US\"\n * );\n * console.log(`Found ${usLocations.length} US locations`);\n *\n * // Get countries only\n * const countries = locations.data.filter(\n * loc => loc.place_type === \"Country\"\n * );\n * ```\n */\n async getAvailableLocations(): Promise<PaginatedResponse<Location>> {\n const response = await this.client.request<{ data?: Location[] }>(\n \"/v1/twitter/trends/locations\"\n );\n return createPaginatedResponse(response.data ?? []);\n }\n}\n","/**\n * Twitter Geo API client.\n *\n * Provides methods for fetching geographic place information.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { PaginatedResponse } from \"../internal/pagination.js\";\nimport { createPaginatedResponse } from \"../internal/pagination.js\";\nimport type { Place } from \"./types.js\";\n\n/**\n * Options for searching places.\n */\nexport interface GeoSearchOptions {\n /** Latitude coordinate */\n lat?: number;\n /** Longitude coordinate */\n long?: number;\n /** Free-form text search query (e.g., \"San Francisco\") */\n query?: string;\n /** IP address for location lookup */\n ip?: string;\n /** Result granularity (\"neighborhood\", \"city\", \"admin\", \"country\") */\n granularity?: string;\n /** Maximum number of results (1-100) */\n maxResults?: number;\n}\n\n/**\n * Client for Twitter geo/places endpoints.\n *\n * Provides async methods for fetching place details and searching\n * for geographic locations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search for places\n * const places = await client.twitter.geo.search({ query: \"San Francisco\" });\n *\n * // Search by coordinates\n * const nearby = await client.twitter.geo.search({ lat: 37.7749, long: -122.4194 });\n *\n * // Get place details\n * const place = await client.twitter.geo.getDetail(\"5a110d312052166f\");\n * ```\n */\nexport class GeoClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get details for a specific place.\n *\n * @param placeId - The Twitter place ID.\n * @returns The place details.\n * @throws NotFoundError - If the place doesn't exist.\n *\n * @example\n * ```typescript\n * const place = await client.twitter.geo.getDetail(\"5a110d312052166f\");\n * console.log(`${place.full_name}`);\n * console.log(`Type: ${place.place_type}`);\n * console.log(`Country: ${place.country}`);\n * ```\n */\n async getDetail(placeId: string): Promise<Place> {\n return this.client.request<Place>(`/v1/twitter/geo/places/${placeId}`);\n }\n\n /**\n * Search for geographic places.\n *\n * At least one of lat/long, query, or ip must be provided.\n *\n * @param options - Search options.\n * @returns Paginated response containing matching places.\n * @throws ValidationError - If no search parameters are provided.\n *\n * @example\n * ```typescript\n * // Search by name\n * const places = await client.twitter.geo.search({ query: \"San Francisco\" });\n * for (const place of places.data) {\n * console.log(`${place.full_name} (${place.place_type})`);\n * }\n *\n * // Search by coordinates\n * const nearby = await client.twitter.geo.search({\n * lat: 37.7749,\n * long: -122.4194,\n * granularity: \"city\"\n * });\n *\n * // Search by IP\n * const ipPlaces = await client.twitter.geo.search({ ip: \"8.8.8.8\" });\n * ```\n */\n async search(options: GeoSearchOptions = {}): Promise<PaginatedResponse<Place>> {\n const response = await this.client.request<{ data?: Place[] }>(\"/v1/twitter/geo/search\", {\n params: {\n lat: options.lat,\n long: options.long,\n query: options.query,\n ip: options.ip,\n granularity: options.granularity,\n max_results: options.maxResults,\n },\n });\n return createPaginatedResponse(response.data ?? []);\n }\n}\n","/**\n * StreamClient -- stream monitor management and live WebSocket streaming.\n */\n\nimport { createHmac, timingSafeEqual } from \"node:crypto\";\nimport { EventEmitter } from \"node:events\";\nimport WebSocket from \"ws\";\nimport type { BaseClient } from \"../internal/client.js\";\nimport { WebSocketStreamError } from \"../internal/exceptions.js\";\nimport type {\n BillingLogList,\n ConnectOptions,\n ConnectedEvent,\n CreateMonitorParams,\n DeliveryLogList,\n ErrorEvent,\n FilterRuleCreate,\n FilterRuleDeliveryLogListResponse,\n FilterRuleListResponse,\n FilterRulePricingTiersResponse,\n FilterRuleResponse,\n FilterRuleUpdate,\n FilterRuleValidateResponse,\n PingEvent,\n StreamEvent,\n StreamMonitor,\n StreamMonitorList,\n StreamTweet,\n TweetEvent,\n UpdateMonitorParams,\n} from \"./stream-types.js\";\n\n// Minimum reconnect delay regardless of caller configuration (seconds)\nconst MIN_RECONNECT_DELAY_SECONDS = 5;\n\n/**\n * Derive WebSocket URL from HTTP base URL.\n * 'https://...' -> 'wss://...'\n * 'http://...' -> 'ws://...'\n */\nexport function wsUrlFromBase(baseUrl: string): string {\n if (baseUrl.startsWith(\"https://\")) {\n return baseUrl.replace(\"https://\", \"wss://\") + \"/v1/twitter/stream\";\n }\n if (baseUrl.startsWith(\"http://\")) {\n return baseUrl.replace(\"http://\", \"ws://\") + \"/v1/twitter/stream\";\n }\n return baseUrl + \"/v1/twitter/stream\";\n}\n\n/**\n * Map a raw server JSON object to a camelCase StreamEvent.\n * Unknown types return an ErrorEvent with code 0.\n */\nexport function parseEvent(raw: Record<string, unknown>): StreamEvent {\n const type = raw[\"type\"] as string | undefined;\n\n switch (type) {\n case \"connected\":\n return {\n type: \"connected\",\n connectionId: raw[\"connection_id\"] as string,\n apiKeyId: raw[\"api_key_id\"] as string,\n } satisfies ConnectedEvent;\n\n case \"ping\":\n return {\n type: \"ping\",\n timestamp: raw[\"timestamp\"] as string,\n } satisfies PingEvent;\n\n case \"tweet\":\n return {\n type: \"tweet\",\n monitorId: raw[\"monitor_id\"] as string,\n tweetId: raw[\"tweet_id\"] as string,\n authorUsername: raw[\"author_username\"] as string,\n tweetPublishedAt: raw[\"tweet_published_at\"] as string,\n detectedAt: raw[\"detected_at\"] as string,\n latencyMs: raw[\"latency_ms\"] as number,\n tweet: raw[\"tweet\"] as StreamTweet,\n } satisfies TweetEvent;\n\n case \"error\":\n return {\n type: \"error\",\n code: raw[\"code\"] as number,\n message: raw[\"message\"] as string,\n } satisfies ErrorEvent;\n\n default:\n return {\n type: \"error\",\n code: 0,\n message: `Unknown event type: ${String(type)}`,\n } satisfies ErrorEvent;\n }\n}\n\n/**\n * Typed EventEmitter for stream events.\n *\n * @example\n * ```typescript\n * const stream = client.twitter.stream.connect();\n * stream.on(\"tweet\", (event) => console.log(event.authorUsername));\n * stream.on(\"error\", (err) => console.error(err));\n * ```\n */\nexport interface StreamEmitter extends EventEmitter {\n on(event: \"connected\", listener: (event: ConnectedEvent) => void): this;\n on(event: \"ping\", listener: (event: PingEvent) => void): this;\n on(event: \"tweet\", listener: (event: TweetEvent) => void): this;\n on(event: \"error\", listener: (error: WebSocketStreamError) => void): this;\n on(event: \"close\", listener: () => void): this;\n\n once(event: \"connected\", listener: (event: ConnectedEvent) => void): this;\n once(event: \"tweet\", listener: (event: TweetEvent) => void): this;\n once(event: \"close\", listener: () => void): this;\n\n /** Gracefully close the WebSocket connection. */\n close(): void;\n}\n\n/**\n * Client for Twitter Streams -- monitor CRUD and live WebSocket streaming.\n *\n * Accessed as `client.twitter.stream`.\n *\n * @example Monitor CRUD\n * ```typescript\n * const monitor = await client.twitter.stream.createMonitor({\n * name: \"Tech Leaders\",\n * usernames: [\"elonmusk\", \"naval\"],\n * pollIntervalSeconds: 10,\n * });\n * console.log(`Created: ${monitor.id}, tier: ${monitor.pricing_tier}`);\n * ```\n *\n * @example EventEmitter streaming\n * ```typescript\n * const stream = client.twitter.stream.connect();\n * stream.on(\"tweet\", (event) => {\n * console.log(`@${event.authorUsername}: ${event.tweet.text}`);\n * console.log(` latency: ${event.latencyMs}ms`);\n * });\n * stream.on(\"error\", (err) => console.error(\"Stream error:\", err));\n * // Later:\n * stream.close();\n * ```\n *\n * @example AsyncIterator streaming\n * ```typescript\n * for await (const event of client.twitter.stream.connectIter()) {\n * if (event.type === \"tweet\") {\n * console.log(event.authorUsername, event.latencyMs);\n * }\n * }\n * ```\n */\nexport class StreamClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n // ===========================================================================\n // Monitor CRUD\n // ===========================================================================\n\n /**\n * Create a new stream monitor.\n *\n * @param params - Monitor configuration.\n * @returns The created StreamMonitor.\n * @throws InsufficientCreditsError - Credit balance below tier threshold (402).\n * @throws ValidationError - Invalid username or interval (422).\n * @throws ScrapeBadgerError - Name conflict (409).\n * @throws AuthenticationError - Invalid API key (401).\n *\n * @example\n * ```typescript\n * const monitor = await client.twitter.stream.createMonitor({\n * name: \"Breaking News\",\n * usernames: [\"cnnbrk\", \"bbcbreaking\"],\n * pollIntervalSeconds: 5,\n * });\n * ```\n */\n async createMonitor(params: CreateMonitorParams): Promise<StreamMonitor> {\n const body: Record<string, unknown> = {\n name: params.name,\n usernames: params.usernames,\n poll_interval_seconds: params.pollIntervalSeconds,\n };\n if (params.webhookUrl !== undefined) body[\"webhook_url\"] = params.webhookUrl;\n if (params.webhookSecret !== undefined) body[\"webhook_secret\"] = params.webhookSecret;\n\n return this.client.request<StreamMonitor>(\"/v1/twitter/stream/monitors\", {\n method: \"POST\",\n body,\n });\n }\n\n /**\n * List stream monitors for the authenticated API key.\n *\n * @param options - Filter and pagination options.\n * @returns StreamMonitorList with pagination metadata.\n *\n * @example\n * ```typescript\n * const { monitors, total } = await client.twitter.stream.listMonitors({\n * status: \"active\",\n * });\n * console.log(`${total} active monitors`);\n * ```\n */\n async listMonitors(options?: {\n status?: \"active\" | \"paused\" | \"error\";\n page?: number;\n pageSize?: number;\n }): Promise<StreamMonitorList> {\n const params: Record<string, string | number | boolean | undefined> = {\n page: options?.page ?? 1,\n page_size: options?.pageSize ?? 20,\n status: options?.status,\n };\n return this.client.request<StreamMonitorList>(\"/v1/twitter/stream/monitors\", {\n params,\n });\n }\n\n /**\n * Get a single stream monitor by ID.\n *\n * @param monitorId - UUID of the monitor.\n * @returns The StreamMonitor.\n * @throws NotFoundError - No monitor with that ID for this API key.\n *\n * @example\n * ```typescript\n * const monitor = await client.twitter.stream.getMonitor(\"550e8400-...\");\n * console.log(`${monitor.name}: ${monitor.status}`);\n * ```\n */\n async getMonitor(monitorId: string): Promise<StreamMonitor> {\n return this.client.request<StreamMonitor>(`/v1/twitter/stream/monitors/${monitorId}`);\n }\n\n /**\n * Partially update a stream monitor.\n *\n * Only fields that are explicitly set in params are sent to the server.\n *\n * @param monitorId - UUID of the monitor.\n * @param params - Fields to update (all optional).\n * @returns The updated StreamMonitor.\n * @throws NotFoundError - Monitor not found for this API key.\n * @throws InsufficientCreditsError - When resuming with insufficient credits.\n *\n * @example\n * ```typescript\n * const monitor = await client.twitter.stream.updateMonitor(\"550e8400-...\", {\n * pollIntervalSeconds: 60,\n * });\n * ```\n */\n async updateMonitor(monitorId: string, params: UpdateMonitorParams): Promise<StreamMonitor> {\n const body: Record<string, unknown> = {};\n if (params.name !== undefined) body[\"name\"] = params.name;\n if (params.usernames !== undefined) body[\"usernames\"] = params.usernames;\n if (params.pollIntervalSeconds !== undefined)\n body[\"poll_interval_seconds\"] = params.pollIntervalSeconds;\n if (params.status !== undefined) body[\"status\"] = params.status;\n if (params.webhookUrl !== undefined) body[\"webhook_url\"] = params.webhookUrl;\n if (params.webhookSecret !== undefined) body[\"webhook_secret\"] = params.webhookSecret;\n\n return this.client.request<StreamMonitor>(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"PATCH\",\n body,\n });\n }\n\n /**\n * Pause an active stream monitor.\n *\n * Convenience wrapper around updateMonitor({ status: \"paused\" }).\n *\n * @param monitorId - UUID of the monitor.\n * @returns The updated StreamMonitor with status=\"paused\".\n */\n async pauseMonitor(monitorId: string): Promise<StreamMonitor> {\n return this.updateMonitor(monitorId, { status: \"paused\" });\n }\n\n /**\n * Resume a paused stream monitor.\n *\n * Convenience wrapper around updateMonitor({ status: \"active\" }).\n *\n * @param monitorId - UUID of the monitor.\n * @returns The updated StreamMonitor with status=\"active\".\n * @throws InsufficientCreditsError - If credits are below the tier threshold.\n */\n async resumeMonitor(monitorId: string): Promise<StreamMonitor> {\n return this.updateMonitor(monitorId, { status: \"active\" });\n }\n\n /**\n * Delete a stream monitor and all its associated logs. Irreversible.\n *\n * @param monitorId - UUID of the monitor.\n * @throws NotFoundError - Monitor not found for this API key.\n *\n * @example\n * ```typescript\n * await client.twitter.stream.deleteMonitor(\"550e8400-...\");\n * ```\n */\n async deleteMonitor(monitorId: string): Promise<void> {\n await this.client.request<void>(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"DELETE\",\n });\n }\n\n // ===========================================================================\n // Delivery and Billing Logs\n // ===========================================================================\n\n /**\n * List tweet delivery logs.\n *\n * @param options - Filter and pagination options.\n * @returns DeliveryLogList with pagination metadata.\n */\n async listDeliveryLogs(options?: {\n monitorId?: string;\n authorUsername?: string;\n deliveryStatus?: string;\n page?: number;\n pageSize?: number;\n sort?: \"asc\" | \"desc\";\n }): Promise<DeliveryLogList> {\n const params: Record<string, string | number | boolean | undefined> = {\n page: options?.page ?? 1,\n page_size: options?.pageSize ?? 20,\n sort: options?.sort ?? \"desc\",\n monitor_id: options?.monitorId,\n author_username: options?.authorUsername,\n delivery_status: options?.deliveryStatus,\n };\n return this.client.request<DeliveryLogList>(\"/v1/twitter/stream/logs\", { params });\n }\n\n /**\n * List billing activity logs.\n *\n * @param options - Filter and pagination options.\n * @returns BillingLogList with pagination metadata.\n */\n async listBillingLogs(options?: {\n monitorId?: string;\n page?: number;\n pageSize?: number;\n }): Promise<BillingLogList> {\n const params: Record<string, string | number | boolean | undefined> = {\n page: options?.page ?? 1,\n page_size: options?.pageSize ?? 20,\n monitor_id: options?.monitorId,\n };\n return this.client.request<BillingLogList>(\"/v1/twitter/stream/billing-logs\", { params });\n }\n\n // ===========================================================================\n // Filter Rules CRUD\n // ===========================================================================\n\n /**\n * Create a new tweet filter rule.\n *\n * @param params - Filter rule configuration.\n * @returns The created FilterRuleResponse.\n * @throws ValidationError - Invalid query or interval (422).\n * @throws InsufficientCreditsError - Credit balance below tier threshold (402).\n * @throws AuthenticationError - Invalid API key (401).\n *\n * @example\n * ```typescript\n * const rule = await client.twitter.stream.createFilterRule({\n * tag: \"python news\",\n * query: \"#python lang:en -is:retweet\",\n * interval_seconds: 60,\n * });\n * console.log(`Created: ${rule.id}, tier: ${rule.pricing_tier}`);\n * ```\n */\n async createFilterRule(params: FilterRuleCreate): Promise<FilterRuleResponse> {\n const body: Record<string, unknown> = {\n tag: params.tag,\n query: params.query,\n interval_seconds: params.interval_seconds,\n };\n if (params.webhook_url !== undefined) body[\"webhook_url\"] = params.webhook_url;\n if (params.webhook_secret !== undefined) body[\"webhook_secret\"] = params.webhook_secret;\n if (params.max_results_per_poll !== undefined)\n body[\"max_results_per_poll\"] = params.max_results_per_poll;\n\n return this.client.request<FilterRuleResponse>(\"/v1/twitter/stream/filter-rules\", {\n method: \"POST\",\n body,\n });\n }\n\n /**\n * List filter rules for the authenticated API key.\n *\n * @param options - Filter and pagination options.\n * @returns FilterRuleListResponse with pagination metadata.\n *\n * @example\n * ```typescript\n * const { rules, total } = await client.twitter.stream.listFilterRules({\n * status: \"active\",\n * });\n * console.log(`${total} active rules`);\n * ```\n */\n async listFilterRules(options?: {\n status?: FilterRuleResponse[\"status\"];\n limit?: number;\n offset?: number;\n }): Promise<FilterRuleListResponse> {\n const params: Record<string, string | number | boolean | undefined> = {\n limit: options?.limit ?? 20,\n offset: options?.offset ?? 0,\n status: options?.status,\n };\n return this.client.request<FilterRuleListResponse>(\"/v1/twitter/stream/filter-rules\", {\n params,\n });\n }\n\n /**\n * Get a single filter rule by ID.\n *\n * @param ruleId - UUID of the filter rule.\n * @returns The FilterRuleResponse.\n * @throws NotFoundError - No rule with that ID for this API key.\n *\n * @example\n * ```typescript\n * const rule = await client.twitter.stream.getFilterRule(\"550e8400-...\");\n * console.log(`${rule.tag}: ${rule.status}`);\n * ```\n */\n async getFilterRule(ruleId: string): Promise<FilterRuleResponse> {\n return this.client.request<FilterRuleResponse>(`/v1/twitter/stream/filter-rules/${ruleId}`);\n }\n\n /**\n * Partially update a filter rule.\n *\n * Only fields that are explicitly set in params are sent to the server.\n *\n * @param ruleId - UUID of the filter rule.\n * @param params - Fields to update (all optional).\n * @returns The updated FilterRuleResponse.\n * @throws NotFoundError - Rule not found for this API key.\n * @throws ValidationError - Invalid field values (422).\n *\n * @example\n * ```typescript\n * const rule = await client.twitter.stream.updateFilterRule(\"550e8400-...\", {\n * interval_seconds: 120,\n * });\n * ```\n */\n async updateFilterRule(ruleId: string, params: FilterRuleUpdate): Promise<FilterRuleResponse> {\n const body: Record<string, unknown> = {};\n if (params.tag !== undefined) body[\"tag\"] = params.tag;\n if (params.query !== undefined) body[\"query\"] = params.query;\n if (params.interval_seconds !== undefined) body[\"interval_seconds\"] = params.interval_seconds;\n if (params.status !== undefined) body[\"status\"] = params.status;\n if (params.webhook_url !== undefined) body[\"webhook_url\"] = params.webhook_url;\n if (params.webhook_secret !== undefined) body[\"webhook_secret\"] = params.webhook_secret;\n if (params.max_results_per_poll !== undefined)\n body[\"max_results_per_poll\"] = params.max_results_per_poll;\n\n return this.client.request<FilterRuleResponse>(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"PATCH\",\n body,\n });\n }\n\n /**\n * Delete a filter rule and all its associated logs. Irreversible.\n *\n * @param ruleId - UUID of the filter rule.\n * @throws NotFoundError - Rule not found for this API key.\n *\n * @example\n * ```typescript\n * await client.twitter.stream.deleteFilterRule(\"550e8400-...\");\n * ```\n */\n async deleteFilterRule(ruleId: string): Promise<void> {\n await this.client.request<void>(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"DELETE\",\n });\n }\n\n // ===========================================================================\n // Filter Rules Utility\n // ===========================================================================\n\n /**\n * Validate a Twitter search query before creating a rule.\n *\n * @param query - The Twitter search query to validate.\n * @returns FilterRuleValidateResponse with validity and sample result count.\n *\n * @example\n * ```typescript\n * const result = await client.twitter.stream.validateFilterRuleQuery(\n * \"#python lang:en -is:retweet\"\n * );\n * if (!result.valid) {\n * console.error(\"Invalid query:\", result.error);\n * }\n * ```\n */\n async validateFilterRuleQuery(query: string): Promise<FilterRuleValidateResponse> {\n return this.client.request<FilterRuleValidateResponse>(\n \"/v1/twitter/stream/filter-rules/validate\",\n { method: \"POST\", body: { query } }\n );\n }\n\n /**\n * List tweet delivery logs for a specific filter rule.\n *\n * @param ruleId - UUID of the filter rule.\n * @param options - Filter and pagination options.\n * @returns FilterRuleDeliveryLogListResponse with pagination metadata.\n *\n * @example\n * ```typescript\n * const { logs, total } = await client.twitter.stream.listFilterRuleLogs(\n * \"550e8400-...\",\n * { limit: 50, deliveryStatus: \"webhook_delivered\" }\n * );\n * ```\n */\n async listFilterRuleLogs(\n ruleId: string,\n options?: {\n limit?: number;\n offset?: number;\n deliveryStatus?: string;\n sort?: \"asc\" | \"desc\";\n }\n ): Promise<FilterRuleDeliveryLogListResponse> {\n const params: Record<string, string | number | boolean | undefined> = {\n limit: options?.limit ?? 20,\n offset: options?.offset ?? 0,\n sort: options?.sort ?? \"desc\",\n delivery_status: options?.deliveryStatus,\n };\n return this.client.request<FilterRuleDeliveryLogListResponse>(\n `/v1/twitter/stream/filter-rules/${ruleId}/logs`,\n { params }\n );\n }\n\n /**\n * Get all available filter rule pricing tiers.\n *\n * @returns FilterRulePricingTiersResponse listing all tiers.\n *\n * @example\n * ```typescript\n * const { tiers } = await client.twitter.stream.getFilterRulePricingTiers();\n * tiers.forEach((t) => console.log(t.tier_label, t.credits_per_rule_per_day));\n * ```\n */\n async getFilterRulePricingTiers(): Promise<FilterRulePricingTiersResponse> {\n return this.client.request<FilterRulePricingTiersResponse>(\n \"/v1/twitter/stream/filter-rules-pricing\"\n );\n }\n\n // ===========================================================================\n // WebSocket Streaming -- EventEmitter style\n // ===========================================================================\n\n /**\n * Connect to the WebSocket stream and return an EventEmitter.\n *\n * The caller subscribes to events via `.on(\"tweet\", handler)`.\n * The SDK handles pong replies to server pings automatically.\n * Call `.close()` on the emitter to disconnect cleanly.\n *\n * If reconnect is true, the emitter automatically reconnects after\n * disconnects (other than auth failures). A new \"connected\" event is\n * emitted on each reconnect.\n *\n * @param options - Connection options (reconnect, delay, maxReconnects).\n * @returns StreamEmitter -- an EventEmitter subclass.\n *\n * @example\n * ```typescript\n * const stream = client.twitter.stream.connect();\n * stream.on(\"connected\", (e) => console.log(\"Connected:\", e.connectionId));\n * stream.on(\"tweet\", (event) => {\n * console.log(`@${event.authorUsername}: ${event.tweet.text}`);\n * console.log(` latency: ${event.latencyMs}ms`);\n * });\n * stream.on(\"error\", (err) => console.error(\"Stream error:\", err));\n * stream.on(\"close\", () => console.log(\"Stream closed\"));\n *\n * // Later:\n * stream.close();\n * ```\n */\n connect(options: ConnectOptions = {}): StreamEmitter {\n const { reconnect = false, reconnectDelaySeconds = 90, maxReconnects } = options;\n\n const delay = Math.max(MIN_RECONNECT_DELAY_SECONDS, reconnectDelaySeconds) * 1000;\n const wsUrl = wsUrlFromBase(this.client.config.baseUrl);\n const apiKey = this.client.config.apiKey;\n\n const emitter = new EventEmitter() as StreamEmitter;\n let ws: WebSocket | null = null;\n let closed = false;\n let reconnectCount = 0;\n\n const connectOnce = (): void => {\n ws = new WebSocket(wsUrl, { headers: { \"x-api-key\": apiKey } });\n\n ws.on(\"message\", (data: unknown) => {\n let raw: Record<string, unknown>;\n try {\n raw = JSON.parse(String(data)) as Record<string, unknown>;\n } catch {\n return;\n }\n\n const event = parseEvent(raw);\n\n if (event.type === \"ping\") {\n ws?.send(JSON.stringify({ type: \"pong\" }));\n emitter.emit(\"ping\", event);\n return;\n }\n\n if (event.type === \"error\") {\n const code = (event as ErrorEvent).code;\n const err = new WebSocketStreamError((event as ErrorEvent).message, code);\n emitter.emit(\"error\", err);\n if (code === 4001 || code === 4003) {\n closed = true; // Do not reconnect on auth/limit errors\n ws?.close();\n }\n return;\n }\n\n emitter.emit(event.type, event);\n });\n\n ws.on(\"open\", () => {\n // Connection is open; wait for \"connected\" event from server\n });\n\n ws.on(\"close\", (code: unknown, reason: unknown) => {\n if (closed) {\n emitter.emit(\"close\");\n return;\n }\n\n if (!reconnect) {\n const reasonStr =\n reason instanceof Buffer ? reason.toString() : typeof reason === \"string\" ? reason : \"\";\n emitter.emit(\n \"error\",\n new WebSocketStreamError(`WebSocket closed: ${reasonStr || String(code)}`)\n );\n emitter.emit(\"close\");\n return;\n }\n\n if (maxReconnects !== undefined && reconnectCount >= maxReconnects) {\n emitter.emit(\n \"error\",\n new WebSocketStreamError(`Max reconnects (${maxReconnects}) exhausted`)\n );\n emitter.emit(\"close\");\n return;\n }\n\n reconnectCount++;\n setTimeout(connectOnce, delay);\n });\n\n ws.on(\"error\", (err: unknown) => {\n const message = err instanceof Error ? err.message : String(err);\n emitter.emit(\"error\", new WebSocketStreamError(message));\n });\n };\n\n // Attach close() method to emitter\n (emitter as unknown as { close: () => void }).close = (): void => {\n closed = true;\n ws?.close(1000, \"Client closed\");\n };\n\n connectOnce();\n return emitter;\n }\n\n // ===========================================================================\n // WebSocket Streaming -- AsyncIterator style\n // ===========================================================================\n\n /**\n * Connect to the WebSocket stream and return an AsyncIterator.\n *\n * Iterates over StreamEvent objects. The SDK handles pong replies\n * automatically but still yields PingEvent to the caller (the caller\n * may ignore ping events).\n *\n * @param options - Connection options (reconnect, delay, maxReconnects).\n * @yields StreamEvent\n *\n * @example\n * ```typescript\n * for await (const event of client.twitter.stream.connectIter()) {\n * if (event.type === \"tweet\") {\n * console.log(`@${event.authorUsername}: ${event.latencyMs}ms`);\n * }\n * }\n * ```\n *\n * @example With auto-reconnect\n * ```typescript\n * for await (const event of client.twitter.stream.connectIter({\n * reconnect: true,\n * reconnectDelaySeconds: 90,\n * })) {\n * if (event.type === \"tweet\") {\n * // process(event);\n * }\n * }\n * ```\n */\n async *connectIter(options: ConnectOptions = {}): AsyncIterableIterator<StreamEvent> {\n const { reconnect = false, reconnectDelaySeconds = 90, maxReconnects } = options;\n\n const delay = Math.max(MIN_RECONNECT_DELAY_SECONDS, reconnectDelaySeconds) * 1000;\n const wsUrl = wsUrlFromBase(this.client.config.baseUrl);\n const apiKey = this.client.config.apiKey;\n let reconnectCount = 0;\n\n while (true) {\n const events: StreamEvent[] = [];\n let resolveWait: (() => void) | null = null;\n let rejectWait: ((err: Error) => void) | null = null;\n let done = false;\n\n const ws = new WebSocket(wsUrl, { headers: { \"x-api-key\": apiKey } });\n\n const waitForEvent = (): Promise<void> =>\n new Promise<void>((res, rej) => {\n resolveWait = res;\n rejectWait = rej;\n });\n\n ws.on(\"message\", (data: unknown) => {\n let raw: Record<string, unknown>;\n try {\n raw = JSON.parse(String(data)) as Record<string, unknown>;\n } catch {\n return;\n }\n\n const event = parseEvent(raw);\n\n if (event.type === \"ping\") {\n ws.send(JSON.stringify({ type: \"pong\" }));\n }\n\n if (event.type === \"error\") {\n const code = (event as ErrorEvent).code;\n if (code === 4001 || code === 4003) {\n rejectWait?.(new WebSocketStreamError((event as ErrorEvent).message, code));\n rejectWait = null;\n resolveWait = null;\n return;\n }\n }\n\n events.push(event);\n resolveWait?.();\n resolveWait = null;\n rejectWait = null;\n });\n\n ws.on(\"close\", () => {\n done = true;\n resolveWait?.();\n resolveWait = null;\n rejectWait = null;\n });\n\n ws.on(\"error\", (err: unknown) => {\n const message = err instanceof Error ? err.message : String(err);\n rejectWait?.(new WebSocketStreamError(message));\n rejectWait = null;\n resolveWait = null;\n });\n\n try {\n while (!done || events.length > 0) {\n if (events.length === 0) {\n await waitForEvent();\n }\n while (events.length > 0) {\n yield events.shift()!;\n }\n }\n } catch (err) {\n ws.close();\n throw err;\n } finally {\n ws.close();\n }\n\n // Connection ended cleanly\n if (!reconnect) {\n return;\n }\n\n if (maxReconnects !== undefined && reconnectCount >= maxReconnects) {\n throw new WebSocketStreamError(`Max reconnects (${maxReconnects}) exhausted`);\n }\n\n reconnectCount++;\n await new Promise<void>((res) => setTimeout(res, delay));\n // Continue outer while loop for reconnect\n }\n }\n}\n\n/**\n * Verify the HMAC-SHA256 signature of an incoming webhook request.\n *\n * The server sets the header:\n * X-ScrapeBadger-Signature: sha256=<hex-digest>\n *\n * @param secret - The webhook secret configured on the monitor.\n * @param body - The raw request body string or Buffer.\n * @param signatureHeader - The full X-ScrapeBadger-Signature header value.\n * @returns true if the signature is valid.\n *\n * @example\n * ```typescript\n * // In an Express webhook receiver:\n * import { verifyWebhookSignature } from \"scrapebadger/twitter\";\n * import express from \"express\";\n *\n * app.post(\"/webhook\", express.raw({ type: \"application/json\" }), (req, res) => {\n * const sig = req.headers[\"x-scrapebadger-signature\"] as string;\n * if (!verifyWebhookSignature(\"my-secret\", req.body, sig)) {\n * return res.status(401).json({ error: \"Invalid signature\" });\n * }\n * const event = JSON.parse(req.body.toString());\n * // process event...\n * res.sendStatus(200);\n * });\n * ```\n */\nexport function verifyWebhookSignature(\n secret: string,\n body: string | Buffer,\n signatureHeader: string\n): boolean {\n if (!signatureHeader.startsWith(\"sha256=\")) {\n return false;\n }\n\n const expectedHex = signatureHeader.slice(\"sha256=\".length);\n const bodyBuffer = typeof body === \"string\" ? Buffer.from(body, \"utf-8\") : body;\n const actualHex = createHmac(\"sha256\", secret).update(bodyBuffer).digest(\"hex\");\n\n // Use constant-time comparison to prevent timing attacks\n try {\n return timingSafeEqual(Buffer.from(expectedHex, \"hex\"), Buffer.from(actualHex, \"hex\"));\n } catch {\n // Buffers of different lengths throw -- treat as mismatch\n return false;\n }\n}\n","/**\n * Twitter Spaces API client.\n *\n * Provides methods for fetching Twitter Spaces and live broadcasts.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Space, Broadcast } from \"./types.js\";\n\n/**\n * Client for Twitter Spaces endpoints.\n *\n * Provides async methods for fetching Space details and live broadcast data.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get Space details\n * const space = await client.twitter.spaces.getDetail(\"1eaKbrPPbPwKX\");\n * console.log(`${space.title} — state: ${space.state}`);\n *\n * // Get broadcast details\n * const broadcast = await client.twitter.spaces.getBroadcast(\"broadcast123\");\n * console.log(`${broadcast.title}: ${broadcast.total_viewers} viewers`);\n * ```\n */\nexport class SpacesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get details for a specific Twitter Space.\n *\n * @param spaceId - The Space ID to fetch.\n * @returns The Space data.\n * @throws NotFoundError - If the Space doesn't exist.\n *\n * @example\n * ```typescript\n * const space = await client.twitter.spaces.getDetail(\"1eaKbrPPbPwKX\");\n * console.log(`${space.title} — ${space.participant_count} participants`);\n * ```\n */\n async getDetail(spaceId: string): Promise<Space> {\n return this.client.request<Space>(`/v1/twitter/spaces/${spaceId}`);\n }\n\n /**\n * Get details for a live video broadcast.\n *\n * @param broadcastId - The broadcast ID to fetch.\n * @returns The broadcast data.\n * @throws NotFoundError - If the broadcast doesn't exist.\n *\n * @example\n * ```typescript\n * const broadcast = await client.twitter.spaces.getBroadcast(\"broadcast123\");\n * console.log(`${broadcast.title}: ${broadcast.total_viewers} viewers`);\n * ```\n */\n async getBroadcast(broadcastId: string): Promise<Broadcast> {\n return this.client.request<Broadcast>(`/v1/twitter/spaces/broadcast/${broadcastId}`);\n }\n}\n","/**\n * Twitter API client.\n *\n * Provides access to all Twitter API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { TweetsClient } from \"./tweets.js\";\nimport { UsersClient } from \"./users.js\";\nimport { ListsClient } from \"./lists.js\";\nimport { CommunitiesClient } from \"./communities.js\";\nimport { TrendsClient } from \"./trends.js\";\nimport { GeoClient } from \"./geo.js\";\nimport { StreamClient } from \"./stream.js\";\nimport { SpacesClient } from \"./spaces.js\";\n\n/**\n * Twitter API client with access to all Twitter endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `tweets` - Tweet operations (get, search, replies, retweeters, etc.)\n * - `users` - User operations (profiles, followers, following, search, etc.)\n * - `lists` - List operations (details, members, tweets, search, etc.)\n * - `communities` - Community operations (details, members, tweets, search, etc.)\n * - `trends` - Trending topics and locations\n * - `geo` - Geographic place information\n * - `stream` - Real-time stream monitor management and WebSocket streaming\n * - `spaces` - Twitter Spaces and live broadcast details\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Access tweets\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n *\n * // Access users\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n *\n * // Access trends\n * const trends = await client.twitter.trends.getTrends();\n *\n * // Search with automatic pagination\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\")) {\n * console.log(tweet.text);\n * }\n *\n * // Stream live tweets\n * const stream = client.twitter.stream.connect();\n * stream.on(\"tweet\", (event) => console.log(event.authorUsername));\n * ```\n */\nexport class TwitterClient {\n private readonly _gen: BaseClient;\n\n /** Client for tweet operations */\n readonly tweets: TweetsClient;\n\n /** Client for user operations */\n readonly users: UsersClient;\n\n /** Client for list operations */\n readonly lists: ListsClient;\n\n /** Client for community operations */\n readonly communities: CommunitiesClient;\n\n /** Client for trends operations */\n readonly trends: TrendsClient;\n\n /** Client for geo/places operations */\n readonly geo: GeoClient;\n\n /** Client for real-time stream monitor management and WebSocket streaming */\n readonly stream: StreamClient;\n\n /** Client for Twitter Spaces and live broadcast operations */\n readonly spaces: SpacesClient;\n\n /**\n * Create a new Twitter client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.tweets = new TweetsClient(client);\n this.users = new UsersClient(client);\n this.lists = new ListsClient(client);\n this.communities = new CommunitiesClient(client);\n this.trends = new TrendsClient(client);\n this.geo = new GeoClient(client);\n this.stream = new StreamClient(client);\n this.spaces = new SpacesClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Delete filter rule. Generated from the OpenAPI spec; returns the raw response object. */\n async deleteFilterRule(\n ruleId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"DELETE\",\n params,\n body,\n });\n }\n\n /** Update filter rule. Generated from the OpenAPI spec; returns the raw response object. */\n async updateFilterRule(\n ruleId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"PATCH\",\n params,\n body,\n });\n }\n\n /** Delete stream monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async deleteStreamMonitor(\n monitorId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"DELETE\",\n params,\n body,\n });\n }\n\n /** Update stream monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async updateStreamMonitor(\n monitorId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"PATCH\",\n params,\n body,\n });\n }\n\n /** List webhooks. Generated from the OpenAPI spec; returns the raw response object. */\n async listWebhooks(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/twitter/stream/webhooks\", { params });\n }\n\n /** Configure webhook on a monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async configureWebhookOnAMonitor(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/twitter/stream/webhooks\", { method: \"POST\", params, body });\n }\n\n /** Test webhook delivery. Generated from the OpenAPI spec; returns the raw response object. */\n async testWebhookDelivery(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/twitter/stream/webhooks/test\", { method: \"POST\", params, body });\n }\n\n /** Remove webhook from monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async removeWebhookFromMonitor(\n webhookId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/webhooks/${webhookId}`, {\n method: \"DELETE\",\n params,\n body,\n });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Web scraping API client for ScrapeBadger SDK.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ScrapeOptions, ScrapeResult, DetectOptions, DetectResult } from \"./types.js\";\n\n/**\n * Client for web scraping operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Simple scrape\n * const result = await client.web.scrape(\"https://scrapebadger.com\");\n * console.log(result.content);\n *\n * // Scrape with JavaScript rendering\n * const rendered = await client.web.scrape(\"https://scrapebadger.com\", {\n * renderJs: true,\n * format: \"markdown\",\n * });\n *\n * // AI extraction\n * const extracted = await client.web.extract(\n * \"https://scrapebadger.com/pricing\",\n * \"Extract all pricing plans with their features\"\n * );\n *\n * // Detect anti-bot systems\n * const detection = await client.web.detect(\"https://scrapebadger.com\");\n * console.log(detection.antibot_systems);\n * ```\n */\nexport class WebClient {\n private readonly _gen: BaseClient;\n\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.client = client;\n }\n\n /**\n * Scrape a web page.\n *\n * @param url - The URL to scrape\n * @param options - Scrape configuration options\n * @returns The scrape result including content, metadata, and credit usage\n */\n async scrape(url: string, options: ScrapeOptions = {}): Promise<ScrapeResult> {\n const body: Record<string, unknown> = { url };\n\n if (options.format !== undefined) body.format = options.format;\n if (options.renderJs !== undefined) body.render_js = options.renderJs;\n if (options.engine !== undefined) body.engine = options.engine;\n if (options.waitFor !== undefined) body.wait_for = options.waitFor;\n if (options.waitTimeout !== undefined) body.wait_timeout = options.waitTimeout;\n if (options.waitAfterLoad !== undefined) body.wait_after_load = options.waitAfterLoad;\n if (options.jsScenario !== undefined) body.js_scenario = options.jsScenario;\n if (options.sessionId !== undefined) body.session_id = options.sessionId;\n if (options.retryCount !== undefined) body.retry_count = options.retryCount;\n if (options.retryOnBlock !== undefined) body.retry_on_block = options.retryOnBlock;\n if (options.country !== undefined) body.country = options.country;\n if (options.customHeaders !== undefined) body.custom_headers = options.customHeaders;\n if (options.screenshot !== undefined) body.screenshot = options.screenshot;\n if (options.video !== undefined) body.video = options.video;\n if (options.antiBot !== undefined) body.anti_bot = options.antiBot;\n if (options.escalate !== undefined) body.escalate = options.escalate;\n if (options.maxCost !== undefined) body.max_cost = options.maxCost;\n if (options.aiExtract !== undefined) body.ai_extract = options.aiExtract;\n if (options.aiPrompt !== undefined) body.ai_prompt = options.aiPrompt;\n if (options.rawContent !== undefined) body.raw_content = options.rawContent;\n if (options.skipBotDetection !== undefined) body.skip_bot_detection = options.skipBotDetection;\n\n if (options.rawContent) {\n return this.scrapeRaw(body);\n }\n\n return this.client.request<ScrapeResult>(\"/v1/web/scrape\", {\n method: \"POST\",\n body,\n });\n }\n\n /**\n * Run a `rawContent` scrape, whose response is not JSON.\n *\n * The normal path funnels a non-JSON response into `{ detail: text }`, so a\n * raw scrape returned a result with no content — and for a binary target,\n * `response.text()` decoded the bytes as UTF-8 and destroyed them. Read the\n * body as bytes and rebuild the metadata from the `X-Scrape-*` headers the\n * server sends in this mode.\n */\n private async scrapeRaw(body: Record<string, unknown>): Promise<ScrapeResult> {\n const { bytes, headers, status } = await this.client.postBinary(\"/v1/web/scrape\", {\n body,\n });\n\n const int = (name: string): number => {\n const parsed = Number.parseInt(headers.get(name) ?? \"\", 10);\n return Number.isNaN(parsed) ? 0 : parsed;\n };\n\n const mediaType = ((headers.get(\"content-type\") ?? \"\").split(\";\")[0] ?? \"\")\n .trim()\n .toLowerCase();\n // Only decode when the payload is genuinely text — decoding an image or a\n // PDF is the very corruption this mode exists to avoid.\n const isText =\n mediaType.startsWith(\"text/\") ||\n [\"application/json\", \"application/xml\", \"image/svg+xml\"].includes(mediaType);\n\n return {\n success: headers.get(\"x-scrape-success\") !== \"0\",\n url: headers.get(\"x-scrape-url\") ?? (typeof body.url === \"string\" ? body.url : \"\"),\n status_code: int(\"x-scrape-status-code\") || status,\n content: isText ? new TextDecoder().decode(bytes) : null,\n content_bytes: bytes,\n content_base64: null,\n is_binary: !isText,\n content_type: mediaType || null,\n format: headers.get(\"x-scrape-format\") ?? \"html\",\n engine_used: headers.get(\"x-scrape-engine\") ?? \"\",\n credits_used: int(\"x-credits-used\"),\n duration_ms: int(\"x-scrape-duration-ms\"),\n retries_used: int(\"x-scrape-retries\"),\n content_length: int(\"x-scrape-content-length\") || bytes.length,\n screenshot_url: null,\n video_url: null,\n headers: {},\n blocking_detected: false,\n } as ScrapeResult;\n }\n\n /**\n * Extract structured data from a web page using AI.\n *\n * Convenience wrapper around {@link scrape} that enables AI extraction\n * with the given prompt and defaults to markdown format.\n *\n * @param url - The URL to extract data from\n * @param prompt - Natural language prompt describing what to extract (max 2000 chars)\n * @param options - Additional scrape options (aiExtract and aiPrompt are set automatically)\n * @returns The scrape result with ai_extraction populated\n */\n async extract(url: string, prompt: string, options: ScrapeOptions = {}): Promise<ScrapeResult> {\n return this.scrape(url, {\n format: \"markdown\",\n ...options,\n aiExtract: true,\n aiPrompt: prompt,\n });\n }\n\n /**\n * Detect anti-bot systems on a URL.\n *\n * @param url - The URL to analyze\n * @param options - Detection options\n * @returns Detection results including identified anti-bot and captcha systems\n */\n async detect(url: string, options: DetectOptions = {}): Promise<DetectResult> {\n const body: Record<string, unknown> = { url };\n\n if (options.timeout !== undefined) body.timeout = options.timeout;\n if (options.country !== undefined) body.country = options.country;\n\n return this.client.request<DetectResult>(\"/v1/web/detect\", {\n method: \"POST\",\n body,\n });\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Submit batch scraping job. Generated from the OpenAPI spec; returns the raw response object. */\n async submitBatchScrapingJob(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/web/batch\", { method: \"POST\", params, body });\n }\n\n /** Get batch job status. Generated from the OpenAPI spec; returns the raw response object. */\n async getBatchJobStatus(\n jobId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/web/batch/${jobId}`, { params });\n }\n\n /** Extract structured data. Generated from the OpenAPI spec; returns the raw response object. */\n async extractStructuredData(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/web/extract\", { method: \"POST\", params, body });\n }\n\n /** Take a screenshot. Generated from the OpenAPI spec; returns the raw response object. */\n async takeAScreenshot(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/web/screenshot\", { method: \"POST\", params, body });\n }\n\n /** Poll an auto-unblock discovery job. Generated from the OpenAPI spec; returns the raw response object. */\n async pollAnAutoUnblockDiscoveryJob(\n jobId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/web/unblock/${jobId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Vinted Search API client.\n *\n * Provides methods for searching Vinted item listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { VintedSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for Vinted search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Basic search\n * const results = await client.vinted.search.search({ query: \"nike air max\" });\n * for (const item of results.items) {\n * console.log(`${item.title} — ${item.price.amount} ${item.price.currency_code}`);\n * }\n *\n * // Search with filters\n * const filtered = await client.vinted.search.search({\n * query: \"adidas\",\n * market: \"de\",\n * price_from: 10,\n * price_to: 50,\n * order: \"price_low_to_high\",\n * });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search for Vinted items.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results with items and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.vinted.search.search({\n * query: \"vintage jacket\",\n * market: \"fr\",\n * page: 1,\n * per_page: 20,\n * order: \"newest_first\",\n * });\n * console.log(`Found ${results.pagination.total_entries} items`);\n * ```\n *\n * @example\n * ```typescript\n * // Restrict to a Vinted category (women's T-shirts on vinted.fr).\n * const tshirts = await client.vinted.search.search({\n * query: \"nike\",\n * catalog_ids: \"221\",\n * });\n * ```\n *\n * @example\n * ```typescript\n * // Filter results to sellers physically located in France or Belgium.\n * const local = await client.vinted.search.search({\n * query: \"vintage jacket\",\n * seller_country: \"fr,be\",\n * });\n * for (const item of local.items) {\n * console.log(`${item.title} — seller in ${item.seller_country_code}`);\n * }\n * ```\n */\n async search(params: VintedSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/vinted/search\", {\n params: {\n query: params.query,\n market: params.market,\n page: params.page,\n per_page: params.per_page,\n price_from: params.price_from,\n price_to: params.price_to,\n brand_ids: params.brand_ids,\n catalog_ids: params.catalog_ids,\n color_ids: params.color_ids,\n status_ids: params.status_ids,\n order: params.order,\n seller_country: params.seller_country,\n },\n });\n }\n}\n","/**\n * Vinted Items API client.\n *\n * Provides methods for fetching individual Vinted item details.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ItemDetailResponse } from \"./types.js\";\n\n/**\n * Client for Vinted item endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const item = await client.vinted.items.get(123456789, { market: \"fr\" });\n * console.log(`${item.item.title} — ${item.item.price.amount} ${item.item.price.currency_code}`);\n * console.log(`Seller: ${item.item.seller.login}`);\n * ```\n */\nexport class ItemsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single item by ID.\n *\n * @param itemId - The Vinted item ID to fetch.\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns The item detail response including full item data.\n * @throws NotFoundError - If the item doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.items.get(123456789);\n * const { item } = response;\n * console.log(`${item.title}: ${item.description}`);\n * console.log(`Brand: ${item.brand_title}, Size: ${item.size_title}`);\n * console.log(`Photos: ${item.photos.length}`);\n * ```\n */\n async get(itemId: number, options: { market?: string } = {}): Promise<ItemDetailResponse> {\n return this.client.request<ItemDetailResponse>(`/v1/vinted/items/${itemId}`, {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Vinted Users API client.\n *\n * Provides methods for fetching Vinted user profiles and their item listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { UserProfileResponse, UserItemsResponse } from \"./types.js\";\n\n/**\n * Client for Vinted user endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get user profile\n * const profile = await client.vinted.users.getProfile(12345);\n * console.log(`${profile.user.login} — ${profile.user.item_count} items`);\n *\n * // Get user's items\n * const items = await client.vinted.users.getItems(12345);\n * for (const item of items.items) {\n * console.log(`${item.title} — ${item.price.amount} ${item.price.currency_code}`);\n * }\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a user's profile.\n *\n * @param userId - The Vinted user ID.\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns The user profile response.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.users.getProfile(12345);\n * const { user } = response;\n * console.log(`${user.login} from ${user.city}, ${user.country_code}`);\n * console.log(`Reputation: ${user.feedback_reputation}`);\n * console.log(`Items: ${user.item_count}, Followers: ${user.followers_count}`);\n * ```\n */\n async getProfile(\n userId: number,\n options: { market?: string } = {}\n ): Promise<UserProfileResponse> {\n return this.client.request<UserProfileResponse>(`/v1/vinted/users/${userId}`, {\n params: { market: options.market },\n });\n }\n\n /**\n * Get items listed by a user.\n *\n * @param userId - The Vinted user ID.\n * @param options - Optional parameters for pagination and market.\n * @param options.market - Market code (default: \"fr\").\n * @param options.page - Page number.\n * @param options.per_page - Items per page.\n * @returns The user's items with pagination metadata.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.users.getItems(12345, {\n * market: \"de\",\n * page: 1,\n * per_page: 20,\n * });\n * console.log(`Page ${response.pagination.current_page} of ${response.pagination.total_pages}`);\n * for (const item of response.items) {\n * console.log(`${item.title} — ${item.price.amount} ${item.price.currency_code}`);\n * }\n * ```\n */\n async getItems(\n userId: number,\n options: { market?: string; page?: number; per_page?: number } = {}\n ): Promise<UserItemsResponse> {\n return this.client.request<UserItemsResponse>(`/v1/vinted/users/${userId}/items`, {\n params: {\n market: options.market,\n page: options.page,\n per_page: options.per_page,\n },\n });\n }\n}\n","/**\n * Vinted Reference Data API client.\n *\n * Provides methods for fetching brands, colors, statuses, and markets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BrandsResponse, ColorsResponse, StatusesResponse, MarketsResponse } from \"./types.js\";\n\n/**\n * Client for Vinted reference data endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get available markets\n * const markets = await client.vinted.reference.markets();\n * for (const market of markets.markets) {\n * console.log(`${market.name} (${market.code}) — ${market.currency}`);\n * }\n *\n * // Search brands\n * const brands = await client.vinted.reference.brands({ keyword: \"nike\" });\n * for (const brand of brands.brands) {\n * console.log(`${brand.title}: ${brand.item_count} items`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search for brands by keyword.\n *\n * @param options - Optional parameters.\n * @param options.keyword - Brand name to search for.\n * @param options.market - Market code (default: \"fr\").\n * @param options.per_page - Number of results per page.\n * @returns Brands matching the keyword.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.brands({\n * keyword: \"adidas\",\n * market: \"de\",\n * per_page: 10,\n * });\n * for (const brand of response.brands) {\n * console.log(`${brand.title} (${brand.slug}): ${brand.item_count} items`);\n * }\n * ```\n */\n async brands(\n options: { keyword?: string; market?: string; per_page?: number } = {}\n ): Promise<BrandsResponse> {\n return this.client.request<BrandsResponse>(\"/v1/vinted/brands\", {\n params: {\n keyword: options.keyword,\n market: options.market,\n per_page: options.per_page,\n },\n });\n }\n\n /**\n * Get available colors for a market.\n *\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns List of available colors.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.colors({ market: \"fr\" });\n * for (const color of response.colors) {\n * console.log(`${color.title} (#${color.hex})`);\n * }\n * ```\n */\n async colors(options: { market?: string } = {}): Promise<ColorsResponse> {\n return this.client.request<ColorsResponse>(\"/v1/vinted/colors\", {\n params: { market: options.market },\n });\n }\n\n /**\n * Get available item condition statuses for a market.\n *\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns List of item condition statuses.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.statuses({ market: \"fr\" });\n * for (const status of response.statuses) {\n * console.log(`${status.id}: ${status.title}`);\n * }\n * ```\n */\n async statuses(options: { market?: string } = {}): Promise<StatusesResponse> {\n return this.client.request<StatusesResponse>(\"/v1/vinted/statuses\", {\n params: { market: options.market },\n });\n }\n\n /**\n * Get all available Vinted markets.\n *\n * @returns List of all supported Vinted markets/countries.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.markets();\n * for (const market of response.markets) {\n * console.log(`${market.name}: ${market.domain} (${market.currency})`);\n * }\n * ```\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/vinted/markets\");\n }\n}\n","/**\n * Vinted API client.\n *\n * Provides access to all Vinted API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ItemsClient } from \"./items.js\";\nimport { UsersClient } from \"./users.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Vinted API client with access to all Vinted endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Search for items across Vinted marketplaces\n * - `items` - Get individual item details\n * - `users` - User profiles and their item listings\n * - `reference` - Reference data (brands, colors, statuses, markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search items\n * const results = await client.vinted.search.search({ query: \"nike air max\" });\n *\n * // Get item details\n * const item = await client.vinted.items.get(123456789);\n *\n * // Get user profile\n * const user = await client.vinted.users.getProfile(12345);\n *\n * // Get reference data\n * const markets = await client.vinted.reference.markets();\n * ```\n */\nexport class VintedClient {\n /** Client for item search operations */\n readonly search: SearchClient;\n\n /** Client for individual item operations */\n readonly items: ItemsClient;\n\n /** Client for user operations */\n readonly users: UsersClient;\n\n /** Client for reference data (brands, colors, statuses, markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Vinted client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.items = new ItemsClient(client);\n this.users = new UsersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Google AI Mode API client (udm=50 generative answers).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { AiModeResponse, AiModeSearchParams } from \"./types.js\";\n\n/**\n * Client for Google AI Mode.\n */\nexport class AiModeClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get an AI-generated answer from Google's AI Mode (udm=50).\n *\n * The response carries structured `text_blocks` (prose, headings,\n * comparison `table` blocks and lists), a flat `references` list, a\n * compact `markdown` rendering and — unless `include_html: false` —\n * the raw `answer_html` body.\n */\n async search(params: AiModeSearchParams): Promise<AiModeResponse> {\n return this.client.request<AiModeResponse>(\"/v1/google/ai-mode/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Autocomplete API client.\n *\n * Returns up to 10 search suggestions. Suggestions that resolve to\n * Knowledge-Graph entities (companies, people, movies, stocks, local\n * businesses, …) additionally carry `entity_name` and `thumbnail` —\n * the same enrichment Google's own search-box surfaces.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { AutocompleteParams, GoogleResponse } from \"./types.js\";\n\n/**\n * Client for Google Autocomplete (search suggestions).\n */\nexport class AutocompleteClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get Google autocomplete suggestions for a query.\n *\n * @example\n * ```typescript\n * const res = await client.google.autocomplete.get({ q: \"apple\" });\n * for (const s of res.suggestions) {\n * console.log(s.value, s.entity_name, s.thumbnail);\n * }\n * ```\n */\n async get(params: AutocompleteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/autocomplete\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Finance API client.\n *\n * Powered by the same `mKsvE` batchexecute RPC the Google Finance SPA\n * uses internally. Returns price / change / change% / previous_close /\n * after-hours / market hours / timezone / currency / country /\n * alternate exchange listings in ~1 s.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { FinanceQuoteParams, GoogleResponse } from \"./types.js\";\n\n/**\n * Client for Google Finance quotes.\n *\n * @example\n * ```typescript\n * const quote = await client.google.finance.quote({ q: \"AAPL:NASDAQ\" });\n * console.log(quote.price, quote.currency, quote.after_hours);\n * ```\n */\nexport class FinanceClient {\n constructor(private readonly client: BaseClient) {}\n\n async quote(params: FinanceQuoteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/finance/quote\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Flights API client — one-way, round-trip, multi-city.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { FlightsSearchParams, GoogleResponse } from \"./types.js\";\n\n/**\n * Client for Google Flights search.\n *\n * Supports one-way, round-trip, and multi-city itineraries with\n * passenger configuration, cabin class, stops filter, and max-price.\n * Returns Google's Best flights recommendations plus the full Other\n * flights result set, with per-offer pricing, duration, stops,\n * layovers, carbon emissions, and price insights (low / typical /\n * high + typical price range) when Google shows them.\n *\n * @example\n * ```typescript\n * const flights = await client.google.flights.search({\n * departure_id: \"JFK\",\n * arrival_id: \"LHR\",\n * outbound_date: \"2026-06-15\",\n * return_date: \"2026-06-22\",\n * adults: 2,\n * });\n * for (const offer of flights.best_flights) {\n * console.log(offer.price, offer.currency, offer.total_duration_minutes);\n * }\n * if (flights.price_insights) {\n * console.log(\"Price level:\", flights.price_insights.price_level);\n * }\n * ```\n */\nexport class FlightsClient {\n constructor(private readonly client: BaseClient) {}\n\n /** Search Google Flights for available itineraries. */\n async search(params: FlightsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/flights/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Hotels API client — search, property details.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, HotelsDetailsParams, HotelsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Hotels endpoints.\n *\n * @example\n * ```typescript\n * const hotels = await client.google.hotels.search({\n * q: \"Paris\",\n * check_in: \"2026-05-01\",\n * check_out: \"2026-05-05\",\n * adults: 2,\n * });\n * ```\n */\nexport class HotelsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: HotelsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/hotels/search\", {\n params: { ...params },\n });\n }\n\n async details(params: HotelsDetailsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/hotels/details\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Images API client.\n *\n * Returns up to 100 tiles per page with `title`, `source`, `link`\n * (referrer page), `thumbnail`, `image` (inline preview), `original`\n * (full-res URL), `original_width` / `original_height`,\n * `original_size` (e.g. `\"635KB\"`), plus licensability flags.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, ImagesSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Images search.\n *\n * @example\n * ```typescript\n * const res = await client.google.images.search({\n * q: \"golden retriever\",\n * imgsz: \"l\",\n * imgcolor: \"color\",\n * });\n * for (const img of res.results) {\n * console.log(img.rank, img.title, img.original);\n * }\n * ```\n */\nexport class ImagesClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: ImagesSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/images/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Jobs API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, JobsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Jobs search.\n *\n * @example\n * ```typescript\n * const jobs = await client.google.jobs.search({\n * q: \"software engineer\",\n * location: \"San Francisco, CA\",\n * job_type: \"FULLTIME\",\n * });\n * ```\n */\nexport class JobsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: JobsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/jobs/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Lens API client (visual image search).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, LensSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Lens visual search by image URL.\n *\n * Response carries `lens_results` (Scrapingdog-parity alias) with\n * `title`, `source`, `source_favicon`, `thumbnail`, `rating`,\n * `reviews` and `in_stock`. Shoppable matches also carry `price`\n * (`{value, currency, extracted}`) plus the raw `tag` chip it is\n * parsed from. `related_searches` chips come alongside. Legacy\n * `results` alias retained for backwards compat.\n *\n * @example\n * ```typescript\n * const out = await client.google.lens.search({\n * url: \"https://example.com/photo.jpg\",\n * product: true, // bias towards shoppable matches\n * });\n * for (const match of out.lens_results) {\n * console.log(match.title, match.price?.value, match.price?.currency);\n * }\n * ```\n */\nexport class LensClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: LensSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/lens/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Maps API client — search, place details, reviews, photos, posts.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n MapsPhotosParams,\n MapsPlaceParams,\n MapsPostsParams,\n MapsReviewsParams,\n MapsSearchParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Maps endpoints.\n *\n * @example\n * ```typescript\n * const places = await client.google.maps.search({ q: \"coffee shops sf\" });\n * const detail = await client.google.maps.place({ data_id: \"0x...:0x...\" });\n * const reviews = await client.google.maps.reviews({\n * data_id: \"0x...:0x...\",\n * sort_by: \"newestFirst\",\n * });\n * ```\n */\nexport class MapsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Maps for places by text query, place_id, or ludocid.\n *\n * Returns up to 20 results per page with full details (place_id,\n * data_id, GPS, rating, reviews, address, phone, website, extensions,\n * weekly hours, thumbnail) in a single call.\n */\n async search(params: MapsSearchParams): Promise<GoogleResponse> {\n if (!params.q && !params.place_id && !params.ludocid) {\n throw new Error(\"q, place_id, or ludocid is required\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/maps/search\", {\n params: { ...params },\n });\n }\n\n /**\n * Get full place detail by `place_id` or `data_id`.\n *\n * Returns title, address, phone, website, GPS, rating, reviews_count,\n * rating_summary (per-star distribution), categories, extensions\n * (service_options, accessibility, offerings, payments), weekly\n * operating hours, popular_times graph, provider_id,\n * permanently_closed, thumbnail, and photo list.\n */\n async place(params: MapsPlaceParams): Promise<GoogleResponse> {\n if (!params.place_id && !params.data_id) {\n throw new Error(\"place_id or data_id is required\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/maps/place\", {\n params: { ...params },\n });\n }\n\n /**\n * Get reviews for a place (paginated, optional topic filter).\n *\n * Pass the `next_page_token` from `response.pagination.next` for\n * subsequent pages, or use `topic_id` from `response.topics[].id`\n * to scope to a specific review topic.\n */\n async reviews(params: MapsReviewsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/maps/reviews\", {\n params: { ...params },\n });\n }\n\n /**\n * Get photos for a place with place-specific categories.\n *\n * Returns place-specific categories (Menu, Vibe, Comfort food, dish\n * names) and photo URLs from all CDN families. Use `category_id` to\n * scope to a category, or `page_size: 200` to fetch all photos in\n * one call (Google caps at ~120 photos per response).\n */\n async photos(params: MapsPhotosParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/maps/photos\", {\n params: { ...params },\n });\n }\n\n /** Get business posts (promotional updates, announcements) for a place. */\n async posts(params: MapsPostsParams): Promise<GoogleResponse> {\n if (!params.data_id && !params.place_id) {\n throw new Error(\"data_id or place_id is required\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/maps/posts\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google News API client — search, topics, trending.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n NewsSearchParams,\n NewsTopicsParams,\n NewsTrendingParams,\n} from \"./types.js\";\n\n/**\n * Client for Google News endpoints.\n *\n * @example\n * ```typescript\n * const articles = await client.google.news.search({ q: \"openai\" });\n * const tech = await client.google.news.topics({ topic: \"TECHNOLOGY\" });\n * const trending = await client.google.news.trending();\n * ```\n */\nexport class NewsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Google News. One of `q`, `topic_token`, `publication_token`,\n * or `story_token` is required (or pass no params for the trending\n * home feed). Returns `menu_links`, `news_results`, `related_topics`.\n */\n async search(params: NewsSearchParams = {}): Promise<GoogleResponse> {\n if (!params.q && !params.topic_token && !params.publication_token && !params.story_token) {\n throw new Error(\"Provide q, topic_token, publication_token, or story_token\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/news/search\", {\n params: { ...params },\n });\n }\n\n async topics(params: NewsTopicsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/news/topics\", {\n params: { ...params },\n });\n }\n\n async trending(params: NewsTrendingParams = {}): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/news/trending\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Patents API client — search, detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, PatentsDetailParams, PatentsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Patents endpoints.\n *\n * @example\n * ```typescript\n * const results = await client.google.patents.search({\n * q: \"distributed lock\",\n * assignee: \"Google\",\n * });\n * ```\n */\nexport class PatentsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: PatentsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/patents/search\", {\n params: { ...params },\n });\n }\n\n /**\n * Get rich patent document details by patent number.\n *\n * Response includes full abstract + every claim + complete description,\n * plus structured `cpc_classifications` (code + description), split\n * `backward_citations` / `forward_citations` (with `primary_examiner`\n * flag), `non_patent_citations`, `concepts` (research fields),\n * `legal_events` (prosecution history), `figures` (full-res URLs),\n * every `inventor`, and the full `assignees_original` history.\n */\n async detail(params: PatentsDetailParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/patents/detail\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Products API client (immersive product detail).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, ProductsDetailParams } from \"./types.js\";\n\n/**\n * Client for Google's immersive product detail endpoint.\n */\nexport class ProductsClient {\n constructor(private readonly client: BaseClient) {}\n\n async detail(params: ProductsDetailParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/products/detail\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Scholar API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n ScholarAuthorCitationParams,\n ScholarAuthorParams,\n ScholarCiteParams,\n ScholarProfilesParams,\n ScholarSearchParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Scholar — search, author profiles, citation charts,\n * and citation formats.\n *\n * Search results carry doc `id`, `type` badge, wrapped `inline_links`\n * (versions + cited_by + related), PDF `resources`, and author objects\n * with `author_id` for pipe-through into {@link ScholarClient.author}.\n * The author endpoint returns structured `interests_detailed`,\n * publications with per-article `citation_id` + nested `cited_by`, and\n * lifetime + since-year citation stats.\n *\n * @example\n * ```typescript\n * const papers = await client.google.scholar.search({\n * q: \"transformer neural networks\",\n * as_ylo: 2020,\n * });\n * const first = papers.scholar_results[0];\n * // Pipe a profiled author into the author endpoint:\n * if (first.authors[0].author_id) {\n * const profile = await client.google.scholar.author({\n * author_id: first.authors[0].author_id,\n * });\n * }\n * ```\n */\nexport class ScholarClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Google Scholar. Returns each result with doc `id`, `type`\n * badge, wrapped `inline_links`, PDF `resources`, and structured\n * authors. Envelope includes `scholar_results` alias,\n * `related_searches`, and matched `profiles` cards.\n */\n async search(params: ScholarSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/search\", {\n params: { ...params },\n });\n }\n\n /** Search Google Scholar for author profiles by name. */\n async profiles(params: ScholarProfilesParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/profiles\", {\n params: { ...params },\n });\n }\n\n /**\n * Full Scholar author profile: structured `interests_detailed`,\n * publications (with per-article `citation_id` + nested\n * `cited_by{value, link, citation_id}`), stats, and co-authors.\n */\n async author(params: ScholarAuthorParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/author\", {\n params: { ...params },\n });\n }\n\n /** Citations-per-year chart for a Scholar author. */\n async authorCitation(params: ScholarAuthorCitationParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/author/citation\", {\n params: { ...params },\n });\n }\n\n /**\n * MLA / APA / Chicago / Harvard / Vancouver citation formats plus\n * BibTeX / RIS / EndNote / RefWorks export links for a paper.\n */\n async cite(params: ScholarCiteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/cite\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Web Search (SERP) API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, GoogleSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Web Search.\n *\n * @example\n * ```typescript\n * const serp = await client.google.search.search({ q: \"python 3.13\" });\n * for (const r of serp.organic_results as any[]) {\n * console.log(r.title, r.link);\n * }\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Google and get a structured SERP response with organic results,\n * knowledge graph, People Also Ask, related searches, AI overview, and\n * pagination.\n */\n async search(params: GoogleSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/search\", { params: { ...params } });\n }\n\n /**\n * Lightweight Google Search — organic results + related searches only.\n *\n * ~40% faster than {@link search}. Skips ads, Knowledge Graph, AI\n * Overview, local pack, news, inline videos, and shopping blocks.\n * Credit cost is configured per-endpoint by admins — query\n * `/public/pricing` for the live rate.\n *\n * @example\n * ```typescript\n * const lite = await client.google.search.light({ q: \"python 3.13\" });\n * ```\n */\n async light(params: GoogleSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/search\", {\n params: { ...params, mode: \"fast\" },\n });\n }\n}\n","/**\n * Google Shopping API client — search and product detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n ShoppingClickParams,\n ShoppingOffersParams,\n ShoppingProductParams,\n ShoppingSearchParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Shopping endpoints.\n *\n * Each search tile now carries Google's native `gpcid`, `catalog_id`,\n * `headline_offer_docid`, `image_docid`, and `mid`, so callers can pipe a\n * tile directly into `client.google.products.detail()` for full specs\n * plus merchant offers via the fast `/async/oapv` RPC (~2s).\n *\n * @example\n * ```typescript\n * const products = await client.google.shopping.search({ q: \"laptop\" });\n * const first = (products.results as any[])[0];\n * const detail = await client.google.products.detail({\n * product_id: first.gpcid,\n * q: \"laptop\",\n * include_offers: true, // real merchant URLs from /async/piu_ps\n * });\n * ```\n */\nexport class ShoppingClient {\n constructor(private readonly client: BaseClient) {}\n\n /** Search Google Shopping for products. */\n async search(params: ShoppingSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/search\", {\n params: { ...params },\n });\n }\n\n /** Fetch the Google Shopping product detail page by `product_id`. */\n async product(params: ShoppingProductParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/product\", {\n params: { ...params },\n });\n }\n\n /**\n * Resolve the direct merchant URL for a Shopping product tile via\n * Google's \"I'm Feeling Lucky\" redirect (scoped to the card's `source`\n * merchant via the `site:` operator). You only pay for the call when\n * you actually want the merchant link — no bulk enrichment of every\n * tile.\n */\n async click(params: ShoppingClickParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/product/click\", {\n params: { ...params },\n });\n }\n\n /**\n * Multi-seller Google Shopping offers for a product, by `barcode`\n * (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or\n * by Google Shopping `catalog_id` (sellers read off Google's product page).\n * Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404\n * (nothing resolves).\n */\n async offers(params: ShoppingOffersParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/offers\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Shorts API client — short-form vertical video results.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, ShortsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Shorts search (`udm=39`).\n *\n * Returns a carousel of short-form videos — YouTube Shorts plus\n * TikToks, Instagram Reels, Facebook Reels, and other platforms.\n * Every tile carries `title`, `link`, `source` (platform),\n * `account_name`, `thumbnail`, `image` (inline preview),\n * `duration`, and `video_id` (YouTube only).\n *\n * @example\n * ```typescript\n * const shorts = await client.google.shorts.search({ q: \"cooking hacks\" });\n * for (const v of shorts.short_videos_results) {\n * console.log(v.rank, v.title, v.source, v.account_name);\n * }\n * ```\n */\nexport class ShortsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: ShortsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shorts/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Trends API client — interest, regions, related, trending.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n TrendsAutocompleteParams,\n TrendsInterestParams,\n TrendsRegionsParams,\n TrendsRelatedParams,\n TrendsSearchParams,\n TrendsTrendingNowParams,\n TrendsTrendingParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Trends endpoints.\n *\n * @example\n * ```typescript\n * const interest = await client.google.trends.interest({\n * q: \"python,javascript\",\n * date: \"today 12-m\",\n * });\n * ```\n */\nexport class TrendsClient {\n constructor(private readonly client: BaseClient) {}\n\n async interest(params: TrendsInterestParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/interest\", {\n params: { ...params },\n });\n }\n\n async regions(params: TrendsRegionsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/regions\", {\n params: { ...params },\n });\n }\n\n async related(params: TrendsRelatedParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/related\", {\n params: { ...params },\n });\n }\n\n async trending(params: TrendsTrendingParams = {}): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/trending\", {\n params: { ...params },\n });\n }\n\n /**\n * Current trending searches with the full Google Trends UI filter set\n * — `geo`, `hours`, `category`, `status`, `sort`, `hl`.\n */\n async trendingNow(params: TrendsTrendingNowParams = {}): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/trending-now\", {\n params: { ...params },\n });\n }\n\n /**\n * Unified Google Trends query — pick the response shape via\n * `data_type` (TIMESERIES | GEO_MAP | GEO_MAP_0 | RELATED_TOPICS |\n * RELATED_QUERIES).\n */\n async search(params: TrendsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/search\", {\n params: { ...params },\n });\n }\n\n /**\n * Return categorized Knowledge Graph topic entities (`mid`, `type`,\n * direct link into Trends explore) for a query prefix. Distinct from\n * Google Search autocomplete.\n */\n async autocomplete(params: TrendsAutocompleteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/autocomplete\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Videos API client.\n *\n * Returns up to 10 tiles per page with `title`, `link`\n * (YouTube / Vimeo / etc.), `displayed_link`, `snippet`, `thumbnail`,\n * `image` (inline base-64), `favicon`, `duration`, `channel`,\n * `source` (platform), `date`, `video_id`, and raw `extensions`.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, VideosSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Videos search.\n *\n * @example\n * ```typescript\n * const res = await client.google.videos.search({ q: \"python tutorial\" });\n * for (const v of res.results) {\n * console.log(v.rank, v.title, v.duration, v.channel);\n * }\n * ```\n */\nexport class VideosClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: VideosSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/videos/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Scraper API aggregator — exposes all 16 Google product sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { AiModeClient } from \"./ai-mode.js\";\nimport { AutocompleteClient } from \"./autocomplete.js\";\nimport { FinanceClient } from \"./finance.js\";\nimport { FlightsClient } from \"./flights.js\";\nimport { HotelsClient } from \"./hotels.js\";\nimport { ImagesClient } from \"./images.js\";\nimport { JobsClient } from \"./jobs.js\";\nimport { LensClient } from \"./lens.js\";\nimport { MapsClient } from \"./maps.js\";\nimport { NewsClient } from \"./news.js\";\nimport { PatentsClient } from \"./patents.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { ScholarClient } from \"./scholar.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ShoppingClient } from \"./shopping.js\";\nimport { ShortsClient } from \"./shorts.js\";\nimport { TrendsClient } from \"./trends.js\";\nimport { VideosClient } from \"./videos.js\";\n\n/**\n * Google Scraper API client with access to all 19 Google product APIs.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const serp = await client.google.search.search({ q: \"python 3.13\" });\n * const places = await client.google.maps.search({ q: \"coffee shops sf\" });\n * const products = await client.google.shopping.search({ q: \"laptop\" });\n *\n * // Per-product merchant URL enrichment\n * const enriched = await client.google.shopping.click({\n * title: (products.results as any[])[0].title,\n * source: (products.results as any[])[0].source,\n * });\n * console.log(enriched.merchant_url);\n *\n * // New in v0.3: Shorts, Flights, and Scholar depth\n * const shorts = await client.google.shorts.search({ q: \"cooking hacks\" });\n * const flights = await client.google.flights.search({\n * departure_id: \"JFK\",\n * arrival_id: \"LHR\",\n * outbound_date: \"2026-06-15\",\n * return_date: \"2026-06-22\",\n * });\n * const profiles = await client.google.scholar.profiles({\n * mauthors: \"Geoffrey Hinton\",\n * });\n * ```\n */\nexport class GoogleClient {\n private readonly _gen: BaseClient;\n\n /** Google Web Search (SERP) — with optional deferred AI Overview follow-up. */\n readonly search: SearchClient;\n /** Google Maps — places, reviews, photos, posts. */\n readonly maps: MapsClient;\n /** Google News — articles, topics, trending. */\n readonly news: NewsClient;\n /** Google Hotels — search and property details. */\n readonly hotels: HotelsClient;\n /** Google Trends — interest, regions, related, trending, topic autocomplete. */\n readonly trends: TrendsClient;\n /** Google Jobs. */\n readonly jobs: JobsClient;\n /** Google Shopping — search, details, click enrichment. */\n readonly shopping: ShoppingClient;\n /** Google Patents — search and document details. */\n readonly patents: PatentsClient;\n /** Google Scholar — search, profiles, author, author citation, cite formats. */\n readonly scholar: ScholarClient;\n /** Google Autocomplete — search suggestions. */\n readonly autocomplete: AutocompleteClient;\n /** Google Images. */\n readonly images: ImagesClient;\n /** Google Videos. */\n readonly videos: VideosClient;\n /** Google Finance — stock and index quotes. */\n readonly finance: FinanceClient;\n /** Google AI Mode — generative answer responses. */\n readonly aiMode: AiModeClient;\n /** Google Lens — visual image search. */\n readonly lens: LensClient;\n /** Google Shorts — short-form vertical video results (udm=39). */\n readonly shorts: ShortsClient;\n /** Google Flights — one-way, round-trip, and multi-city itineraries. */\n readonly flights: FlightsClient;\n /** Google Products — immersive product detail. */\n readonly products: ProductsClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.search = new SearchClient(client);\n this.maps = new MapsClient(client);\n this.news = new NewsClient(client);\n this.hotels = new HotelsClient(client);\n this.trends = new TrendsClient(client);\n this.jobs = new JobsClient(client);\n this.shopping = new ShoppingClient(client);\n this.patents = new PatentsClient(client);\n this.scholar = new ScholarClient(client);\n this.autocomplete = new AutocompleteClient(client);\n this.images = new ImagesClient(client);\n this.videos = new VideosClient(client);\n this.finance = new FinanceClient(client);\n this.aiMode = new AiModeClient(client);\n this.lens = new LensClient(client);\n this.shorts = new ShortsClient(client);\n this.flights = new FlightsClient(client);\n this.products = new ProductsClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Google AI Overview (inline SERP block). Generated from the OpenAPI spec; returns the raw response object. */\n async googleAiOverviewInlineSerpBlock(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/google/ai-overview\", { params });\n }\n\n /** Google Flights calendar — cheapest fare per date. Generated from the OpenAPI spec; returns the raw response object. */\n async googleFlightsCalendarCheapestFarePerDate(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/google/flights/calendar\", { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Google-Play API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Google-Play API operations. (Generated from the OpenAPI spec.) */\nexport class GooglePlayClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get app detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppDetail(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}`, { params });\n }\n\n /** Get app permissions. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppPermissions(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}/permissions`, { params });\n }\n\n /** Get app reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppReviews(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}/reviews`, { params });\n }\n\n /** Get similar apps. Generated from the OpenAPI spec; returns the raw response object. */\n async getSimilarApps(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}/similar`, { params });\n }\n\n /** List categories. Generated from the OpenAPI spec; returns the raw response object. */\n async listCategories(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/google-play/categories\", { params });\n }\n\n /** Browse a category. Generated from the OpenAPI spec; returns the raw response object. */\n async browseACategory(\n categoryId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/categories/${categoryId}`, { params });\n }\n\n /** Top charts. Generated from the OpenAPI spec; returns the raw response object. */\n async topCharts(\n collection: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/collections/${collection}`, { params });\n }\n\n /** Get developer apps. Generated from the OpenAPI spec; returns the raw response object. */\n async getDeveloperApps(\n developer: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/developers/${developer}`, { params });\n }\n\n /** List markets. Generated from the OpenAPI spec; returns the raw response object. */\n async listMarkets(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/google-play/markets\", { params });\n }\n\n /** Search apps. Generated from the OpenAPI spec; returns the raw response object. */\n async searchApps(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/google-play/search\", { params });\n }\n}\n","/**\n * Idealista API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Idealista API operations. (Generated from the OpenAPI spec.) */\nexport class IdealistaClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Agency by phone. Generated from the OpenAPI spec; returns the raw response object. */\n async agencyByPhone(\n phone: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/agency/by-phone/${phone}`, { params });\n }\n\n /** Agency profile + listings. Generated from the OpenAPI spec; returns the raw response object. */\n async agencyProfileListings(\n shortName: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/agency/${shortName}`, { params });\n }\n\n /** List markets. Generated from the OpenAPI spec; returns the raw response object. */\n async listMarkets(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/markets\", { params });\n }\n\n /** Get property detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetail(\n propertyCode: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/properties/${propertyCode}`, { params });\n }\n\n /** Get listing engagement stats. Generated from the OpenAPI spec; returns the raw response object. */\n async getListingEngagementStats(\n propertyCode: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/properties/${propertyCode}/stats`, { params });\n }\n\n /** Search listings. Generated from the OpenAPI spec; returns the raw response object. */\n async searchListings(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/search\", { params });\n }\n\n /** Search all (beats result cap). Generated from the OpenAPI spec; returns the raw response object. */\n async searchAllBeatsResultCap(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/search/all\", { params });\n }\n\n /** Resolve locations. Generated from the OpenAPI spec; returns the raw response object. */\n async resolveLocations(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/suggest\", { params });\n }\n}\n","/**\n * Reddit Search API client.\n *\n * Provides methods for searching Reddit posts, subreddits, users, and domain posts.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n SearchPostsResponse,\n SearchSubredditsResponse,\n SearchUsersResponse,\n DomainPostsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search posts\n * const results = await client.reddit.search.posts({ query: \"typescript tips\" });\n * for (const post of results.posts) {\n * console.log(`${post.title} — ${post.score} points`);\n * }\n *\n * // Search subreddits\n * const subs = await client.reddit.search.subreddits({ query: \"programming\" });\n *\n * // Get posts from a domain\n * const domainPosts = await client.reddit.search.domainPosts({ domain: \"github.com\" });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Reddit posts.\n *\n * @param options - Search parameters.\n * @param options.query - Search query string.\n * @param options.subreddit - Restrict search to a specific subreddit.\n * @param options.sort - Sort order (relevance, hot, top, new, comments).\n * @param options.time - Time filter (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Search results with posts and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.posts({\n * query: \"best practices\",\n * subreddit: \"programming\",\n * sort: \"top\",\n * time: \"month\",\n * limit: 25,\n * });\n * console.log(`Found ${results.posts.length} posts`);\n * ```\n */\n async posts(options: {\n query: string;\n subreddit?: string;\n sort?: \"relevance\" | \"hot\" | \"top\" | \"new\" | \"comments\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n }): Promise<SearchPostsResponse> {\n return this.client.request<SearchPostsResponse>(\"/v1/reddit/search/posts\", {\n params: {\n query: options.query,\n subreddit: options.subreddit,\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Search Reddit subreddits.\n *\n * @param options - Search parameters.\n * @param options.query - Search query string.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Matching subreddits with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.subreddits({\n * query: \"javascript\",\n * limit: 10,\n * });\n * for (const sub of results.subreddits) {\n * console.log(`r/${sub.display_name}: ${sub.subscribers.toLocaleString()} subscribers`);\n * }\n * ```\n */\n async subreddits(options: {\n query: string;\n after?: string;\n limit?: number;\n }): Promise<SearchSubredditsResponse> {\n return this.client.request<SearchSubredditsResponse>(\"/v1/reddit/search/subreddits\", {\n params: {\n query: options.query,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Search Reddit users.\n *\n * @param options - Search parameters.\n * @param options.query - Search query string.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Matching users with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.users({\n * query: \"john\",\n * limit: 20,\n * });\n * for (const user of results.users) {\n * console.log(`u/${user.name}: ${user.total_karma.toLocaleString()} karma`);\n * }\n * ```\n */\n async users(options: {\n query: string;\n after?: string;\n limit?: number;\n }): Promise<SearchUsersResponse> {\n return this.client.request<SearchUsersResponse>(\"/v1/reddit/search/users\", {\n params: {\n query: options.query,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get Reddit posts linking to a specific domain.\n *\n * @param options - Request parameters.\n * @param options.domain - Domain name to search for (e.g. \"github.com\").\n * @param options.sort - Sort order (hot, new, top, rising).\n * @param options.time - Time filter for top sort (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Posts linking to the domain with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.domainPosts({\n * domain: \"github.com\",\n * sort: \"top\",\n * time: \"week\",\n * limit: 25,\n * });\n * for (const post of results.posts) {\n * console.log(`r/${post.subreddit}: ${post.title}`);\n * }\n * ```\n */\n async domainPosts(options: {\n domain: string;\n sort?: \"hot\" | \"new\" | \"top\" | \"rising\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n }): Promise<DomainPostsResponse> {\n return this.client.request<DomainPostsResponse>(\"/v1/reddit/search/domain\", {\n params: {\n domain: options.domain,\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n}\n","/**\n * Reddit Posts API client.\n *\n * Provides methods for fetching trending posts, post details, comments, and duplicates.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TrendingPostsResponse,\n PostDetailResponse,\n PostCommentsResponse,\n PostDuplicatesResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit post endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get trending posts\n * const trending = await client.reddit.posts.trending({ subreddit: \"programming\" });\n *\n * // Get post details\n * const post = await client.reddit.posts.get(\"t3_abc123\");\n *\n * // Get post comments\n * const { comments } = await client.reddit.posts.comments(\"abc123\", { subreddit: \"programming\" });\n * ```\n */\nexport class PostsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get trending/hot posts from Reddit or a specific subreddit.\n *\n * @param options - Request parameters.\n * @param options.subreddit - Subreddit name (without r/). If omitted, returns site-wide posts.\n * @param options.sort - Sort order (hot, new, top, rising, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Trending posts with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.posts.trending({\n * subreddit: \"worldnews\",\n * sort: \"hot\",\n * limit: 25,\n * });\n * for (const post of results.posts) {\n * console.log(`${post.title} (${post.num_comments} comments)`);\n * }\n * ```\n */\n async trending(\n options: {\n subreddit?: string;\n sort?: \"hot\" | \"new\" | \"top\" | \"rising\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<TrendingPostsResponse> {\n return this.client.request<TrendingPostsResponse>(\"/v1/reddit/posts\", {\n params: {\n subreddit: options.subreddit,\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get full details of a single Reddit post.\n *\n * @param postId - The Reddit post ID (e.g. \"abc123\" or \"t3_abc123\").\n * @param options - Optional parameters.\n * @param options.subreddit - Subreddit name (helps resolve the post URL).\n * @returns Full post details.\n * @throws NotFoundError - If the post doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.posts.get(\"abc123\", { subreddit: \"programming\" });\n * const { post } = response;\n * console.log(`${post.title} by u/${post.author}`);\n * console.log(`Score: ${post.score}, Comments: ${post.num_comments}`);\n * ```\n */\n async get(postId: string, options: { subreddit?: string } = {}): Promise<PostDetailResponse> {\n return this.client.request<PostDetailResponse>(`/v1/reddit/posts/${postId}`, {\n params: { subreddit: options.subreddit },\n });\n }\n\n /**\n * Get comments for a Reddit post.\n *\n * @param postId - The Reddit post ID (e.g. \"abc123\" or \"t3_abc123\").\n * @param options - Optional parameters.\n * @param options.subreddit - Subreddit name (helps resolve the post URL).\n * @param options.sort - Comment sort order (confidence, top, new, controversial, old, qa).\n * @param options.depth - Maximum comment tree depth.\n * @param options.limit - Number of top-level comments to return.\n * @returns Post details and nested comment tree.\n * @throws NotFoundError - If the post doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.posts.comments(\"abc123\", {\n * subreddit: \"programming\",\n * sort: \"top\",\n * limit: 50,\n * });\n * for (const comment of response.comments) {\n * console.log(`u/${comment.author}: ${comment.body.slice(0, 100)}`);\n * }\n * ```\n */\n async comments(\n postId: string,\n options: {\n subreddit?: string;\n sort?: \"confidence\" | \"top\" | \"new\" | \"controversial\" | \"old\" | \"qa\";\n depth?: number;\n limit?: number;\n } = {}\n ): Promise<PostCommentsResponse> {\n return this.client.request<PostCommentsResponse>(`/v1/reddit/posts/${postId}/comments`, {\n params: {\n subreddit: options.subreddit,\n sort: options.sort,\n depth: options.depth,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get cross-posts and duplicate submissions of a Reddit post.\n *\n * @param postId - The Reddit post ID (e.g. \"abc123\" or \"t3_abc123\").\n * @param options - Optional parameters.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns The original post and its duplicate submissions.\n * @throws NotFoundError - If the post doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.posts.duplicates(\"abc123\");\n * console.log(`Original: ${response.post.title}`);\n * console.log(`Cross-posted ${response.duplicates.length} times`);\n * for (const dupe of response.duplicates) {\n * console.log(` r/${dupe.subreddit}: ${dupe.score} points`);\n * }\n * ```\n */\n async duplicates(\n postId: string,\n options: {\n after?: string;\n limit?: number;\n } = {}\n ): Promise<PostDuplicatesResponse> {\n return this.client.request<PostDuplicatesResponse>(`/v1/reddit/posts/${postId}/duplicates`, {\n params: {\n after: options.after,\n limit: options.limit,\n },\n });\n }\n}\n","/**\n * Reddit Subreddits API client.\n *\n * Provides methods for fetching subreddit details, posts, rules, and wiki pages.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n SubredditDetailResponse,\n SubredditPostsResponse,\n SubredditRulesResponse,\n SubredditWikiPagesResponse,\n WikiPageResponse,\n PopularSubredditsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit subreddit endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get subreddit details\n * const sub = await client.reddit.subreddits.get(\"programming\");\n * console.log(`r/programming: ${sub.subreddit.subscribers.toLocaleString()} subscribers`);\n *\n * // Get subreddit posts\n * const posts = await client.reddit.subreddits.posts(\"programming\", { sort: \"top\" });\n *\n * // Get subreddit rules\n * const rules = await client.reddit.subreddits.rules(\"programming\");\n * ```\n */\nexport class SubredditsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a subreddit's full details and metadata.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @returns Full subreddit details.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.get(\"javascript\");\n * const { subreddit } = response;\n * console.log(`${subreddit.title}: ${subreddit.subscribers.toLocaleString()} members`);\n * console.log(`Description: ${subreddit.public_description}`);\n * ```\n */\n async get(subreddit: string): Promise<SubredditDetailResponse> {\n return this.client.request<SubredditDetailResponse>(`/v1/reddit/subreddits/${subreddit}`);\n }\n\n /**\n * Get posts from a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @param options - Optional parameters.\n * @param options.sort - Sort order (hot, new, top, rising, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Subreddit posts with pagination metadata.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.posts(\"typescript\", {\n * sort: \"top\",\n * time: \"week\",\n * limit: 25,\n * });\n * for (const post of response.posts) {\n * console.log(`${post.title} — ${post.score} pts`);\n * }\n * ```\n */\n async posts(\n subreddit: string,\n options: {\n sort?: \"hot\" | \"new\" | \"top\" | \"rising\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<SubredditPostsResponse> {\n return this.client.request<SubredditPostsResponse>(`/v1/reddit/subreddits/${subreddit}/posts`, {\n params: {\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get the rules for a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @returns List of subreddit rules.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.rules(\"AskReddit\");\n * for (const rule of response.rules) {\n * console.log(`${rule.priority}. ${rule.short_name}`);\n * console.log(` ${rule.description}`);\n * }\n * ```\n */\n async rules(subreddit: string): Promise<SubredditRulesResponse> {\n return this.client.request<SubredditRulesResponse>(`/v1/reddit/subreddits/${subreddit}/rules`);\n }\n\n /**\n * List all wiki pages in a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @returns List of wiki page slugs.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.wikiPages(\"rust\");\n * for (const page of response.pages) {\n * console.log(`/r/rust/wiki/${page}`);\n * }\n * ```\n */\n async wikiPages(subreddit: string): Promise<SubredditWikiPagesResponse> {\n return this.client.request<SubredditWikiPagesResponse>(\n `/v1/reddit/subreddits/${subreddit}/wiki`\n );\n }\n\n /**\n * Get the content of a specific wiki page in a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @param page - Wiki page slug (e.g. \"index\", \"faq\").\n * @returns Wiki page content and metadata.\n * @throws NotFoundError - If the subreddit or wiki page doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.wikiPage(\"learnprogramming\", \"faq\");\n * console.log(`Last edited by: u/${response.page.revision_by}`);\n * console.log(response.page.content_md);\n * ```\n */\n async wikiPage(subreddit: string, page: string): Promise<WikiPageResponse> {\n return this.client.request<WikiPageResponse>(`/v1/reddit/subreddits/${subreddit}/wiki/${page}`);\n }\n\n /**\n * Get the most popular subreddits on Reddit.\n *\n * @param options - Optional parameters.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Popular subreddits with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.popular({ limit: 20 });\n * for (const sub of response.subreddits) {\n * console.log(`r/${sub.display_name}: ${sub.subscribers.toLocaleString()} subscribers`);\n * }\n * ```\n */\n async popular(\n options: {\n after?: string;\n limit?: number;\n } = {}\n ): Promise<PopularSubredditsResponse> {\n return this.client.request<PopularSubredditsResponse>(\"/v1/reddit/subreddits/popular\", {\n params: {\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get newly created subreddits on Reddit.\n *\n * @param options - Optional parameters.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns New subreddits with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.newSubreddits({ limit: 20 });\n * for (const sub of response.subreddits) {\n * console.log(`r/${sub.display_name} (created: ${new Date(sub.created_utc * 1000).toLocaleDateString()})`);\n * }\n * ```\n */\n async newSubreddits(\n options: {\n after?: string;\n limit?: number;\n } = {}\n ): Promise<PopularSubredditsResponse> {\n return this.client.request<PopularSubredditsResponse>(\"/v1/reddit/subreddits/new\", {\n params: {\n after: options.after,\n limit: options.limit,\n },\n });\n }\n}\n","/**\n * Reddit Users API client.\n *\n * Provides methods for fetching Reddit user profiles, posts, comments, moderated subreddits, and trophies.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n UserProfileResponse,\n UserPostsResponse,\n UserCommentsResponse,\n UserModeratedResponse,\n UserTrophiesResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit user endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get user profile\n * const profile = await client.reddit.users.get(\"spez\");\n * console.log(`u/${profile.user.name}: ${profile.user.total_karma.toLocaleString()} karma`);\n *\n * // Get user's recent posts\n * const posts = await client.reddit.users.posts(\"spez\", { sort: \"top\", limit: 10 });\n *\n * // Get user's comments\n * const comments = await client.reddit.users.comments(\"spez\", { sort: \"new\" });\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a Reddit user's profile.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @returns The user profile response.\n * @throws NotFoundError - If the user doesn't exist or is suspended.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.get(\"spez\");\n * const { user } = response;\n * console.log(`u/${user.name}`);\n * console.log(`Karma: ${user.total_karma.toLocaleString()} (${user.link_karma} post, ${user.comment_karma} comment)`);\n * console.log(`Account age: ${new Date(user.created_utc * 1000).toLocaleDateString()}`);\n * ```\n */\n async get(username: string): Promise<UserProfileResponse> {\n return this.client.request<UserProfileResponse>(`/v1/reddit/users/${username}`);\n }\n\n /**\n * Get posts submitted by a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @param options - Optional parameters.\n * @param options.sort - Sort order (hot, new, top, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns The user's posts with pagination metadata.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.posts(\"spez\", {\n * sort: \"top\",\n * time: \"all\",\n * limit: 25,\n * });\n * for (const post of response.posts) {\n * console.log(`r/${post.subreddit}: ${post.title} (${post.score} pts)`);\n * }\n * ```\n */\n async posts(\n username: string,\n options: {\n sort?: \"hot\" | \"new\" | \"top\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<UserPostsResponse> {\n return this.client.request<UserPostsResponse>(`/v1/reddit/users/${username}/posts`, {\n params: {\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get comments made by a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @param options - Optional parameters.\n * @param options.sort - Sort order (hot, new, top, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns The user's comments with pagination metadata.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.comments(\"spez\", {\n * sort: \"new\",\n * limit: 50,\n * });\n * for (const comment of response.comments) {\n * console.log(`r/${comment.subreddit}: ${comment.body.slice(0, 80)}`);\n * }\n * ```\n */\n async comments(\n username: string,\n options: {\n sort?: \"hot\" | \"new\" | \"top\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<UserCommentsResponse> {\n return this.client.request<UserCommentsResponse>(`/v1/reddit/users/${username}/comments`, {\n params: {\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get subreddits moderated by a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @returns Subreddits moderated by the user.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.moderated(\"spez\");\n * for (const sub of response.subreddits) {\n * console.log(`r/${sub.display_name}: ${sub.subscribers.toLocaleString()} subscribers`);\n * }\n * ```\n */\n async moderated(username: string): Promise<UserModeratedResponse> {\n return this.client.request<UserModeratedResponse>(`/v1/reddit/users/${username}/moderated`);\n }\n\n /**\n * Get trophies awarded to a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @returns List of trophies awarded to the user.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.trophies(\"spez\");\n * for (const trophy of response.trophies) {\n * console.log(`${trophy.name}${trophy.description ? `: ${trophy.description}` : \"\"}`);\n * }\n * ```\n */\n async trophies(username: string): Promise<UserTrophiesResponse> {\n return this.client.request<UserTrophiesResponse>(`/v1/reddit/users/${username}/trophies`);\n }\n}\n","/**\n * Reddit API client.\n *\n * Provides access to all Reddit API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { PostsClient } from \"./posts.js\";\nimport { SubredditsClient } from \"./subreddits.js\";\nimport { UsersClient } from \"./users.js\";\n\n/**\n * Reddit API client with access to all Reddit endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Search posts, subreddits, users, and domain posts\n * - `posts` - Trending posts, post details, comments, and cross-posts\n * - `subreddits` - Subreddit details, posts, rules, moderators, and wiki pages\n * - `users` - User profiles, posts, comments, moderated subreddits, and trophies\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search posts\n * const results = await client.reddit.search.posts({ query: \"typescript tips\" });\n *\n * // Get subreddit details\n * const sub = await client.reddit.subreddits.get(\"programming\");\n *\n * // Get user profile\n * const user = await client.reddit.users.get(\"spez\");\n *\n * // Get trending posts\n * const trending = await client.reddit.posts.trending({ sort: \"hot\" });\n * ```\n */\nexport class RedditClient {\n /** Client for search operations (posts, subreddits, users, domain posts) */\n readonly search: SearchClient;\n\n /** Client for post operations (trending, details, comments, duplicates) */\n readonly posts: PostsClient;\n\n /** Client for subreddit operations (details, posts, rules, moderators, wiki) */\n readonly subreddits: SubredditsClient;\n\n /** Client for user operations (profile, posts, comments, moderated, trophies) */\n readonly users: UsersClient;\n\n /**\n * Create a new Reddit client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.posts = new PostsClient(client);\n this.subreddits = new SubredditsClient(client);\n this.users = new UsersClient(client);\n }\n}\n","/**\n * Apartments.com API client.\n *\n * Endpoints: search (rental listings by location, 40 cards a page) and\n * getProperty (one property with full per-unit pricing and availability, by\n * URL or by slug + id). Single market: apartments.com (US, USD, en-US).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n ApartmentsPropertyParams,\n ApartmentsSearchParams,\n Property,\n SearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Apartments.com API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search a location\n * const page = await client.apartments.search(\"kansas-city-mo\", { beds: 1 });\n * console.log(`${page.total_results} rentals`);\n *\n * // Drill into one card for unit-level pricing\n * const prop = await client.apartments.getProperty(page.results[0].url!);\n * for (const unit of prop.units) {\n * console.log(unit.unit_number, unit.rent, unit.available_text);\n * }\n * ```\n */\nexport class ApartmentsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search rental listings in a location.\n *\n * @param location - apartments.com slug (`\"kansas-city-mo\"`) or a ZIP.\n * @param params - Optional page and bed/price filters.\n *\n * @remarks\n * Cards are summaries with a rent/bed rollup. For per-unit rent and\n * availability, pass a card's `url` to {@link getProperty}.\n */\n async search(location: string, params: ApartmentsSearchParams = {}): Promise<SearchResponse> {\n const query: Record<string, string | number> = {\n location,\n page: params.page ?? 1,\n };\n if (params.beds !== undefined) query.beds = params.beds;\n if (params.minPrice !== undefined) query.min_price = params.minPrice;\n if (params.maxPrice !== undefined) query.max_price = params.maxPrice;\n return this.client.request<SearchResponse>(\"/v1/apartments/search\", { params: query });\n }\n\n /**\n * Get one property with floor plans and per-unit inventory.\n *\n * @param url - Full property URL. Omit to look up by `slug` + `propertyId`.\n * @param params - `slug` and `propertyId` alternative to a URL.\n *\n * @remarks\n * Use `unit.rent` (the advertised price), not `unit.max_term_rent` — the\n * latter is the site's raw `data-maxrent`, roughly double the advertised\n * rent.\n */\n async getProperty(url?: string, params: ApartmentsPropertyParams = {}): Promise<Property> {\n if (url) {\n return this.client.request<Property>(\"/v1/apartments/property\", { params: { url } });\n }\n if (params.slug && params.propertyId) {\n return this.client.request<Property>(\n `/v1/apartments/properties/${params.slug}/${params.propertyId}`\n );\n }\n throw new Error(\"Provide either url, or both slug and propertyId\");\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get property detail by slug + id. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetailBySlugId(\n slug: string,\n propertyId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/apartments/properties/${slug}/${propertyId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * App-Store API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all App-Store API operations. (Generated from the OpenAPI spec.) */\nexport class AppStoreClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get app detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppDetail(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/app-store/apps/${appId}`, { params });\n }\n\n /** Get app reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppReviews(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/app-store/apps/${appId}/reviews`, { params });\n }\n\n /** Top charts. Generated from the OpenAPI spec; returns the raw response object. */\n async topCharts(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/charts\", { params });\n }\n\n /** Get developer apps. Generated from the OpenAPI spec; returns the raw response object. */\n async getDeveloperApps(\n artistId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/app-store/developers/${artistId}`, { params });\n }\n\n /** List genres. Generated from the OpenAPI spec; returns the raw response object. */\n async listGenres(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/genres\", { params });\n }\n\n /** List markets. Generated from the OpenAPI spec; returns the raw response object. */\n async listMarkets(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/markets\", { params });\n }\n\n /** Search apps. Generated from the OpenAPI spec; returns the raw response object. */\n async searchApps(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/search\", { params });\n }\n}\n","/**\n * Instagram Users API client.\n *\n * Fetches user profiles and their content: posts, videos, reels, tagged/pinned\n * media, followers, following, stories, and highlights.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Highlight, Media, Paginated, User, UserAbout, UserShort } from \"./types.js\";\n\n/**\n * Client for Instagram user endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.instagram.users.get(\"instagram\");\n * console.log(`@${profile.username}: ${profile.follower_count.toLocaleString()} followers`);\n *\n * const posts = await client.instagram.users.posts(\"instagram\", { amount: 12 });\n * for (const media of posts.items) {\n * console.log(media.code, media.like_count);\n * }\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get a user's full profile. */\n async get(username: string): Promise<User> {\n return this.client.request<User>(`/v1/instagram/users/${username}`);\n }\n\n /**\n * Get \"About this account\" metadata for a user.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async about(username: string): Promise<UserAbout> {\n return this.client.request<UserAbout>(`/v1/instagram/users/${username}/about`);\n }\n\n /** Get accounts related/suggested for a user. */\n async related(username: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/users/${username}/related`);\n }\n\n /** Get a user's timeline posts. */\n async posts(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/posts`, options);\n }\n\n /**\n * Get a user's video posts (IGTV/feed videos).\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async videos(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/videos`, options);\n }\n\n /**\n * Get a user's reels.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async reels(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/reels`, options);\n }\n\n /**\n * Get media a user is tagged in.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async tagged(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/tagged`, options);\n }\n\n /**\n * Get a user's pinned posts.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async pinned(username: string): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(`/v1/instagram/users/${username}/pinned`);\n }\n\n /**\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n *\n * Get a user's followers.\n *\n * @param username - Instagram username.\n * @param options.amount - Number of followers to return.\n * @param options.cursor - Pagination cursor from a previous response.\n * @param options.order - Ordering hint (e.g. \"default\", \"date_followed_earliest\").\n */\n async followers(\n username: string,\n options: { amount?: number; cursor?: string; order?: string } = {}\n ): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/users/${username}/followers`, {\n params: {\n amount: options.amount,\n cursor: options.cursor,\n order: options.order,\n },\n });\n }\n\n /**\n * Get the accounts a user follows.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async following(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/users/${username}/following`, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n }\n\n /**\n * Search within a user's followers by name/username.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async searchFollowers(\n username: string,\n query: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(\n `/v1/instagram/users/${username}/followers/search`,\n {\n params: { query, amount: options.amount, cursor: options.cursor },\n }\n );\n }\n\n /**\n * Get a user's currently-live stories.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async stories(username: string): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(`/v1/instagram/users/${username}/stories`);\n }\n\n /**\n * Get a user's story highlights.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async highlights(username: string): Promise<Paginated<Highlight>> {\n return this.client.request<Paginated<Highlight>>(`/v1/instagram/users/${username}/highlights`);\n }\n\n private async media(\n path: string,\n options: { amount?: number; cursor?: string }\n ): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(path, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n }\n}\n","/**\n * Instagram Media API client.\n *\n * Fetches media details, oEmbed metadata, comments, comment replies, and the\n * users who liked a media or a comment.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Comment, Media, Oembed, Paginated, UserShort } from \"./types.js\";\n\n/**\n * Client for Instagram media endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const media = await client.instagram.media.get(\"C1abcdEfGhI\");\n * console.log(media.caption_text, media.like_count);\n *\n * const comments = await client.instagram.media.comments(media.code, { amount: 20 });\n * for (const comment of comments.items) {\n * console.log(`@${comment.user?.username}: ${comment.text}`);\n * }\n * ```\n */\nexport class MediaClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a media's full details.\n *\n * @param code - The media shortcode (from the `/p/<code>/` URL).\n */\n async get(code: string): Promise<Media> {\n return this.client.request<Media>(`/v1/instagram/media/${code}`);\n }\n\n /** Get oEmbed metadata for a media permalink. */\n async oembed(code: string): Promise<Oembed> {\n return this.client.request<Oembed>(`/v1/instagram/media/${code}/oembed`);\n }\n\n /** Get top-level comments on a media. */\n async comments(\n code: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Comment>> {\n return this.client.request<Paginated<Comment>>(`/v1/instagram/media/${code}/comments`, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n }\n\n /**\n * Get the users who liked a media.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async likers(code: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/media/${code}/likers`);\n }\n\n /**\n * Get replies to a comment.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async replies(\n code: string,\n commentId: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Comment>> {\n return this.client.request<Paginated<Comment>>(\n `/v1/instagram/media/${code}/comments/${commentId}/replies`,\n { params: { amount: options.amount, cursor: options.cursor } }\n );\n }\n\n /** Get the users who liked a comment. */\n async commentLikers(code: string, commentId: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(\n `/v1/instagram/media/${code}/comments/${commentId}/likers`\n );\n }\n}\n","/**\n * Instagram Search API client.\n *\n * Searches users, hashtags, places, the \"top\" blended results, reels, and\n * music, plus a lightweight autocomplete/typeahead.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n Audio,\n Hashtag,\n Location,\n Media,\n Paginated,\n SearchTopResponse,\n UserShort,\n} from \"./types.js\";\n\n/**\n * Client for Instagram search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const users = await client.instagram.search.users(\"nike\");\n * for (const user of users.items) {\n * console.log(`@${user.username}: ${user.full_name}`);\n * }\n *\n * const tags = await client.instagram.search.hashtags(\"running\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search accounts by name/username.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async users(query: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(\"/v1/instagram/search/users\", {\n params: { query },\n });\n }\n\n /** Search hashtags. */\n async hashtags(query: string): Promise<Paginated<Hashtag>> {\n return this.client.request<Paginated<Hashtag>>(\"/v1/instagram/search/hashtags\", {\n params: { query },\n });\n }\n\n /**\n * Search places/locations.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async places(query: string): Promise<Paginated<Location>> {\n return this.client.request<Paginated<Location>>(\"/v1/instagram/search/places\", {\n params: { query },\n });\n }\n\n /**\n * Search reels.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async reels(query: string): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(\"/v1/instagram/search/reels\", {\n params: { query },\n });\n }\n\n /**\n * Search music/audio tracks.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async music(query: string): Promise<Paginated<Audio>> {\n return this.client.request<Paginated<Audio>>(\"/v1/instagram/search/music\", {\n params: { query },\n });\n }\n\n /** Get blended \"top\" results (users, hashtags, and places). */\n async top(query: string): Promise<SearchTopResponse> {\n return this.client.request<SearchTopResponse>(\"/v1/instagram/search/top\", {\n params: { query },\n });\n }\n\n /**\n * Get typeahead/autocomplete suggestions (mixed entity types).\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async autocomplete(query: string): Promise<SearchTopResponse> {\n return this.client.request<SearchTopResponse>(\"/v1/instagram/search/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Instagram hashtag, location, and audio API clients.\n *\n * These endpoints return standalone entities plus their associated media\n * feeds, so they live together in one reference module.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Audio, Hashtag, Location, Media, Paginated } from \"./types.js\";\n\nfunction mediaFeed(\n client: BaseClient,\n path: string,\n options: { amount?: number; cursor?: string }\n): Promise<Paginated<Media>> {\n return client.request<Paginated<Media>>(path, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n}\n\n/** Client for Instagram hashtag endpoints. */\nexport class HashtagsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get a hashtag's info (media count, cover). */\n async get(tag: string): Promise<Hashtag> {\n return this.client.request<Hashtag>(`/v1/instagram/hashtags/${tag}`);\n }\n\n /**\n * Get the top/popular media for a hashtag.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async top(\n tag: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/top`, options);\n }\n\n /** Get the most recent media for a hashtag. */\n async recent(\n tag: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/recent`, options);\n }\n\n /**\n * Get reels for a hashtag.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async reels(\n tag: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/reels`, options);\n }\n}\n\n/** Client for Instagram location endpoints. */\nexport class LocationsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a location's info.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async get(pk: string): Promise<Location> {\n return this.client.request<Location>(`/v1/instagram/locations/${pk}`);\n }\n\n /**\n * Get the top/popular media for a location.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async top(\n pk: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/locations/${pk}/top`, options);\n }\n\n /**\n * Get the most recent media for a location.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async recent(\n pk: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/locations/${pk}/recent`, options);\n }\n\n /**\n * Search locations by name.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async search(query: string): Promise<Paginated<Location>> {\n return this.client.request<Paginated<Location>>(\"/v1/instagram/locations/search\", {\n params: { query },\n });\n }\n}\n\n/** Client for Instagram audio/music endpoints. */\nexport class AudioClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get an audio track's info.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async get(audioId: string): Promise<Audio> {\n return this.client.request<Audio>(`/v1/instagram/audio/${audioId}`);\n }\n\n /**\n * Get media that use an audio track.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async media(\n audioId: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/audio/${audioId}/media`, options);\n }\n\n /**\n * Get currently-trending audio tracks.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async trending(): Promise<Paginated<Audio>> {\n return this.client.request<Paginated<Audio>>(\"/v1/instagram/audio/trending\");\n }\n}\n","/**\n * Instagram API client.\n *\n * Provides access to all Instagram API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { UsersClient } from \"./users.js\";\nimport { MediaClient } from \"./media.js\";\nimport { SearchClient } from \"./search.js\";\nimport { HashtagsClient, LocationsClient, AudioClient } from \"./reference.js\";\n\n/**\n * Instagram API client with access to all Instagram endpoints.\n *\n * Sub-clients:\n * - `users` - Profiles, posts, reels, followers, stories, highlights\n * - `media` - Media details, comments, replies, likers, oEmbed\n * - `search` - Users, hashtags, places, top, reels, music, autocomplete\n * - `hashtags` - Hashtag info and its top/recent/reels feeds\n * - `locations` - Location info, top/recent feeds, and location search\n * - `audio` - Audio info, its media, and trending audio\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.instagram.users.get(\"instagram\");\n * const posts = await client.instagram.users.posts(\"instagram\", { amount: 12 });\n * const media = await client.instagram.media.get(\"C1abcdEfGhI\");\n * const users = await client.instagram.search.users(\"nike\");\n * ```\n */\nexport class InstagramClient {\n private readonly _gen: BaseClient;\n\n /** Client for user operations (profile, posts, followers, stories, highlights) */\n readonly users: UsersClient;\n\n /** Client for media operations (detail, comments, replies, likers, oEmbed) */\n readonly media: MediaClient;\n\n /** Client for search operations (users, hashtags, places, top, reels, music, autocomplete) */\n readonly search: SearchClient;\n\n /** Client for hashtag operations (info, top, recent, reels) */\n readonly hashtags: HashtagsClient;\n\n /** Client for location operations (info, top, recent, search) */\n readonly locations: LocationsClient;\n\n /** Client for audio operations (info, media, trending) */\n readonly audio: AudioClient;\n\n /**\n * Create a new Instagram client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.users = new UsersClient(client);\n this.media = new MediaClient(client);\n this.search = new SearchClient(client);\n this.hashtags = new HashtagsClient(client);\n this.locations = new LocationsClient(client);\n this.audio = new AudioClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get location. Generated from the OpenAPI spec; returns the raw response object. */\n async getLocation(\n locationPk: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/instagram/locations/${locationPk}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Redfin API client.\n *\n * Redfin endpoints: search (for-sale listings), getProperty (full\n * single-listing detail, by propertyId or URL), getAgent (agent profile +\n * listings, by agentId or URL), autocomplete (location suggestions), and\n * listMarkets. Single market: redfin.com (US, USD, en-US).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n RedfinSearchParams,\n RedfinPropertyParams,\n RedfinAgentParams,\n SearchResponse,\n PropertyResponse,\n AgentResponse,\n AutocompleteResponse,\n MarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Redfin API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search for-sale listings\n * const results = await client.redfin.search(\"Austin, TX\");\n * for (const listing of results.results) {\n * console.log(`${listing.position}. ${listing.street_line} — ${listing.price}`);\n * }\n *\n * // Full single-listing detail\n * const detail = await client.redfin.getProperty(\"12345678\");\n * console.log(detail.property.price);\n *\n * // Agent profile\n * const agent = await client.redfin.getAgent(\"jane-doe\");\n *\n * // Supported markets\n * const markets = await client.redfin.listMarkets();\n * ```\n */\nexport class RedfinClient {\n private readonly _gen: BaseClient;\n\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.client = client;\n }\n\n /**\n * Search Redfin for for-sale properties.\n *\n * @param location - City/state, ZIP, address or neighborhood (required).\n * @param options - Optional parameters (page, sort, price/beds/baths/sqft/lot\n * filters, year built, max days on market, bbox override).\n * @returns Search response with matching listings, map bounds, and pagination.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(location: string, options: RedfinSearchParams = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/redfin/search\", {\n params: {\n location,\n page: options.page,\n sort: options.sort,\n price_min: options.price_min,\n price_max: options.price_max,\n beds_min: options.beds_min,\n baths_min: options.baths_min,\n home_type: options.home_type,\n sqft_min: options.sqft_min,\n sqft_max: options.sqft_max,\n lot_min: options.lot_min,\n lot_max: options.lot_max,\n year_built_min: options.year_built_min,\n year_built_max: options.year_built_max,\n max_days_on_market: options.max_days_on_market,\n north: options.north,\n south: options.south,\n east: options.east,\n west: options.west,\n },\n });\n }\n\n /**\n * Get a single Redfin property's full detail by id or URL.\n *\n * Provide either `propertyId` or `options.url`.\n *\n * @param propertyId - The Redfin property id.\n * @param options - Optional parameters (url).\n * @returns Property detail response.\n * @throws NotFoundError - If the property doesn't exist.\n */\n async getProperty(\n propertyId?: string,\n options: RedfinPropertyParams = {}\n ): Promise<PropertyResponse> {\n if (options.url) {\n return this.client.request<PropertyResponse>(\"/v1/redfin/property\", {\n params: { url: options.url },\n });\n }\n return this.client.request<PropertyResponse>(`/v1/redfin/property/${propertyId}`);\n }\n\n /**\n * Get a Redfin agent's profile and their active listings.\n *\n * Provide either `agentId` or `options.url`.\n *\n * @param agentId - The Redfin agent slug.\n * @param options - Optional parameters (url).\n * @returns Agent profile response with the agent and their listings.\n * @throws NotFoundError - If the agent doesn't exist.\n */\n async getAgent(agentId?: string, options: RedfinAgentParams = {}): Promise<AgentResponse> {\n return this.client.request<AgentResponse>(\"/v1/redfin/agent\", {\n params: { agent_id: agentId, url: options.url },\n });\n }\n\n /**\n * Resolve a search term to Redfin locations.\n *\n * @param query - Partial location — city, ZIP, address, or neighborhood.\n * @returns Autocomplete response with location suggestions.\n */\n async autocomplete(query: string): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/redfin/autocomplete\", {\n params: { query },\n });\n }\n\n /**\n * Get all supported Redfin coverage markets.\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/redfin/markets\");\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get property detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetail(\n propertyId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/redfin/property/${propertyId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Account API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Account API operations. (Generated from the OpenAPI spec.) */\nexport class AccountClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get account info. Generated from the OpenAPI spec; returns the raw response object. */\n async getAccountInfo(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/account/me\", { params });\n }\n}\n","/**\n * Airbnb API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Airbnb API operations. (Generated from the OpenAPI spec.) */\nexport class AirbnbClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Search experiences. Generated from the OpenAPI spec; returns the raw response object. */\n async searchExperiences(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/airbnb/experiences\", { params });\n }\n\n /** Get experience detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getExperienceDetail(\n experienceId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/experiences/${experienceId}`, { params });\n }\n\n /** Get listing detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getListingDetail(\n roomId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/listings/${roomId}`, { params });\n }\n\n /** Get availability calendar. Generated from the OpenAPI spec; returns the raw response object. */\n async getAvailabilityCalendar(\n roomId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/listings/${roomId}/calendar`, { params });\n }\n\n /** Get listing reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getListingReviews(\n roomId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/listings/${roomId}/reviews`, { params });\n }\n\n /** Search stays. Generated from the OpenAPI spec; returns the raw response object. */\n async searchStays(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/airbnb/search\", { params });\n }\n}\n","/**\n * Amazon Search API client.\n *\n * Provides methods for keyword search and keyword autocomplete suggestions.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonSearchParams,\n AmazonAutocompleteParams,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.amazon.search.search({ query: \"wireless headphones\" });\n * for (const item of results.results) {\n * console.log(`${item.position}. ${item.title}`);\n * }\n *\n * const suggestions = await client.amazon.search.autocomplete(\"lapt\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Amazon for products by keyword.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results with rows and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: AmazonSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/amazon/search\", {\n params: {\n query: params.query,\n domain: params.domain,\n page: params.page,\n sort_by: params.sort_by,\n category: params.category,\n min_price: params.min_price,\n max_price: params.max_price,\n zip: params.zip,\n language: params.language,\n },\n });\n }\n\n /**\n * Get Amazon keyword autocomplete suggestions.\n *\n * @param query - Partial search query string.\n * @param options - Optional parameters (domain).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: AmazonAutocompleteParams = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/amazon/autocomplete\", {\n params: { query, domain: options.domain },\n });\n }\n}\n","/**\n * Amazon Products API client.\n *\n * Provides methods for fetching product detail, offers, and reviews by ASIN.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonProductParams,\n AmazonOffersParams,\n AmazonReviewsParams,\n ProductDetailResponse,\n OffersResponse,\n ReviewsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon product endpoints (detail, offers, reviews).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.amazon.products.get(\"B08N5WRWNW\");\n * console.log(detail.product.title);\n *\n * const offers = await client.amazon.products.offers(\"B08N5WRWNW\");\n * console.log(`${offers.total_offers} offers`);\n *\n * const reviews = await client.amazon.products.reviews(\"B08N5WRWNW\");\n * ```\n */\nexport class ProductsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full product detail (PDP) for an ASIN.\n *\n * @param asin - The product ASIN.\n * @param options - Optional parameters (domain, zip, language).\n * @returns Product detail including variants, badges, buybox, and related products.\n * @throws NotFoundError - If the product doesn't exist.\n */\n async get(asin: string, options: AmazonProductParams = {}): Promise<ProductDetailResponse> {\n return this.client.request<ProductDetailResponse>(`/v1/amazon/products/${asin}`, {\n params: {\n domain: options.domain,\n zip: options.zip,\n language: options.language,\n },\n });\n }\n\n /**\n * Get all-seller offers (and the buybox winner) for an ASIN.\n *\n * @param asin - The product ASIN.\n * @param options - Optional parameters (domain, zip).\n * @returns Offers response with the buybox winner and full offer list.\n */\n async offers(asin: string, options: AmazonOffersParams = {}): Promise<OffersResponse> {\n return this.client.request<OffersResponse>(`/v1/amazon/products/${asin}/offers`, {\n params: { domain: options.domain, zip: options.zip },\n });\n }\n\n /**\n * Get product reviews for an ASIN.\n *\n * @param asin - The product ASIN.\n * @param options - Optional parameters (domain, page, sort_by, star, verified_only, media_only).\n * @returns Reviews response with reviews, aggregate rating, and breakdown.\n */\n async reviews(asin: string, options: AmazonReviewsParams = {}): Promise<ReviewsResponse> {\n return this.client.request<ReviewsResponse>(`/v1/amazon/products/${asin}/reviews`, {\n params: {\n domain: options.domain,\n page: options.page,\n sort_by: options.sort_by,\n star: options.star,\n verified_only: options.verified_only,\n media_only: options.media_only,\n },\n });\n }\n}\n","/**\n * Amazon Listings API client.\n *\n * Provides methods for bestsellers, new releases, deals, and category browse.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonListingsParams,\n AmazonDealsParams,\n AmazonCategoryParams,\n BestsellersResponse,\n NewReleasesResponse,\n DealsResponse,\n CategoryResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon listing endpoints (bestsellers, new releases, deals, category).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const top = await client.amazon.listings.bestsellers({ category: \"electronics\" });\n * for (const item of top.bestsellers) {\n * console.log(`#${item.rank}: ${item.title}`);\n * }\n * ```\n */\nexport class ListingsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get the bestsellers list for a marketplace / category.\n *\n * @param options - Optional parameters (domain, category, page).\n * @returns Bestsellers response with ranked products and pagination.\n */\n async bestsellers(options: AmazonListingsParams = {}): Promise<BestsellersResponse> {\n return this.client.request<BestsellersResponse>(\"/v1/amazon/bestsellers\", {\n params: {\n domain: options.domain,\n category: options.category,\n page: options.page,\n },\n });\n }\n\n /**\n * Get the new-releases list for a marketplace / category.\n *\n * @param options - Optional parameters (domain, category, page).\n * @returns New-releases response with ranked products and pagination.\n */\n async newReleases(options: AmazonListingsParams = {}): Promise<NewReleasesResponse> {\n return this.client.request<NewReleasesResponse>(\"/v1/amazon/new-releases\", {\n params: {\n domain: options.domain,\n category: options.category,\n page: options.page,\n },\n });\n }\n\n /**\n * Get current deals for a marketplace / category.\n *\n * @param options - Optional parameters (domain, category, page).\n * @returns Deals response with deal rows and pagination.\n */\n async deals(options: AmazonDealsParams = {}): Promise<DealsResponse> {\n return this.client.request<DealsResponse>(\"/v1/amazon/deals\", {\n params: {\n domain: options.domain,\n category: options.category,\n page: options.page,\n },\n });\n }\n\n /**\n * Browse a category / department by browse-node ID.\n *\n * @param params - Parameters including the required node ID.\n * @returns Category response with result rows and pagination.\n */\n async category(params: AmazonCategoryParams): Promise<CategoryResponse> {\n return this.client.request<CategoryResponse>(\"/v1/amazon/category\", {\n params: {\n node: params.node,\n domain: params.domain,\n page: params.page,\n sort_by: params.sort_by,\n },\n });\n }\n}\n","/**\n * Amazon Sellers API client.\n *\n * Provides methods for seller profile, storefront products, and buyer feedback.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonSellerParams,\n AmazonSellerListParams,\n SellerProfileResponse,\n SellerProductsResponse,\n SellerFeedbackResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon seller endpoints (profile, products, feedback).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.amazon.sellers.get(\"A2L77EE7U53NWQ\");\n * console.log(profile.seller.name);\n *\n * const products = await client.amazon.sellers.products(\"A2L77EE7U53NWQ\");\n * ```\n */\nexport class SellersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a seller's profile and ratings.\n *\n * @param sellerId - The seller ID.\n * @param options - Optional parameters (domain).\n * @returns Seller profile response.\n * @throws NotFoundError - If the seller doesn't exist.\n */\n async get(sellerId: string, options: AmazonSellerParams = {}): Promise<SellerProfileResponse> {\n return this.client.request<SellerProfileResponse>(`/v1/amazon/sellers/${sellerId}`, {\n params: { domain: options.domain },\n });\n }\n\n /**\n * Get a seller's storefront listings.\n *\n * @param sellerId - The seller ID.\n * @param options - Optional parameters (domain, page).\n * @returns Seller products response with result rows and pagination.\n */\n async products(\n sellerId: string,\n options: AmazonSellerListParams = {}\n ): Promise<SellerProductsResponse> {\n return this.client.request<SellerProductsResponse>(`/v1/amazon/sellers/${sellerId}/products`, {\n params: { domain: options.domain, page: options.page },\n });\n }\n\n /**\n * Get buyer feedback entries for a seller.\n *\n * @param sellerId - The seller ID.\n * @param options - Optional parameters (domain, page).\n * @returns Seller feedback response with feedback entries and pagination.\n */\n async feedback(\n sellerId: string,\n options: AmazonSellerListParams = {}\n ): Promise<SellerFeedbackResponse> {\n return this.client.request<SellerFeedbackResponse>(`/v1/amazon/sellers/${sellerId}/feedback`, {\n params: { domain: options.domain, page: options.page },\n });\n }\n}\n","/**\n * Amazon Reference Data API client.\n *\n * Provides methods for fetching the static marketplace and category lists.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse, CategoriesResponse } from \"./types.js\";\n\n/**\n * Client for Amazon reference data endpoints (markets, categories).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.amazon.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n *\n * const categories = await client.amazon.reference.categories();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported Amazon marketplaces.\n *\n * @returns Markets response with all supported marketplaces.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/amazon/markets\");\n }\n\n /**\n * Get the reference department / category aliases.\n *\n * @returns Categories response with all category aliases.\n */\n async categories(): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/amazon/categories\");\n }\n}\n","/**\n * Amazon API client.\n *\n * Provides access to all Amazon API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { ListingsClient } from \"./listings.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Amazon API client with access to all Amazon endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Keyword search and autocomplete\n * - `products` - Product detail, offers, and reviews\n * - `listings` - Bestsellers, new releases, deals, and category browse\n * - `sellers` - Seller profile, storefront products, and feedback\n * - `reference` - Reference data (markets, categories)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search products\n * const results = await client.amazon.search.search({ query: \"wireless headphones\" });\n *\n * // Get product detail\n * const detail = await client.amazon.products.get(\"B08N5WRWNW\");\n *\n * // Get bestsellers\n * const top = await client.amazon.listings.bestsellers({ category: \"electronics\" });\n *\n * // Get a seller profile\n * const seller = await client.amazon.sellers.get(\"A2L77EE7U53NWQ\");\n *\n * // Get reference data\n * const markets = await client.amazon.reference.markets();\n * ```\n */\nexport class AmazonClient {\n /** Client for keyword search and autocomplete */\n readonly search: SearchClient;\n\n /** Client for product detail, offers, and reviews */\n readonly products: ProductsClient;\n\n /** Client for bestsellers, new releases, deals, and category browse */\n readonly listings: ListingsClient;\n\n /** Client for seller profile, products, and feedback */\n readonly sellers: SellersClient;\n\n /** Client for reference data (markets, categories) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Amazon client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.products = new ProductsClient(client);\n this.listings = new ListingsClient(client);\n this.sellers = new SellersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Shopee Search API client.\n *\n * Provides methods for keyword search and category-item listing.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeSearchParams, ShopeeCategoryItemsParams, SearchResult } from \"./types.js\";\n\n/**\n * Client for Shopee search and category-items endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.shopee.search.search({\n * keyword: \"wireless headphones\",\n * market: \"sg\",\n * });\n * for (const item of results.items) {\n * console.log(`${item.name}: ${item.price} ${item.currency}`);\n * }\n *\n * const cat = await client.shopee.search.categoryItems(100001, { market: \"sg\" });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Shopee for products by keyword.\n *\n * @param params - Search parameters including keyword, market, pagination, and sort.\n * @returns Search result page with matched products and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: ShopeeSearchParams): Promise<SearchResult> {\n return this.client.request<SearchResult>(\"/v1/shopee/search\", {\n params: {\n keyword: params.keyword,\n market: params.market,\n limit: params.limit,\n offset: params.offset,\n sort_by: params.sort_by,\n },\n });\n }\n\n /**\n * List products within a specific Shopee category.\n *\n * @param categoryId - The Shopee category ID.\n * @param options - Optional parameters (market, limit, offset, sort_by).\n * @returns Search result page with products in the category.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the category ID or market is invalid.\n */\n async categoryItems(\n categoryId: number,\n options: ShopeeCategoryItemsParams = {}\n ): Promise<SearchResult> {\n return this.client.request<SearchResult>(`/v1/shopee/category/${categoryId}/items`, {\n params: {\n market: options.market,\n limit: options.limit,\n offset: options.offset,\n sort_by: options.sort_by,\n },\n });\n }\n}\n","/**\n * Shopee Products API client.\n *\n * Provides methods for fetching full product detail pages (PDP).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeProductParams, ShopeeProduct } from \"./types.js\";\n\n/**\n * Client for the Shopee product detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const product = await client.shopee.products.get(12345, 67890, { market: \"sg\" });\n * console.log(`${product.name}: ${product.price} ${product.currency}`);\n *\n * for (const model of product.models) {\n * console.log(` Variant: ${model.name} — ${model.price}`);\n * }\n * ```\n */\nexport class ProductsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full product detail (PDP) for a Shopee item.\n *\n * @param shopId - The Shopee shop identifier.\n * @param itemId - The Shopee item identifier.\n * @param options - Optional parameters (market).\n * @returns Full product detail including pricing, ratings, images, and variations.\n * @throws NotFoundError - If the product doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the market code is invalid.\n */\n async get(\n shopId: number,\n itemId: number,\n options: ShopeeProductParams = {}\n ): Promise<ShopeeProduct> {\n return this.client.request<ShopeeProduct>(`/v1/shopee/product/${shopId}/${itemId}`, {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Shopee Reviews API client.\n *\n * Provides methods for fetching product reviews and rating summaries.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeReviewsParams, ReviewsResult } from \"./types.js\";\n\n/**\n * Client for the Shopee product reviews endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const reviews = await client.shopee.reviews.get(12345, 67890, { market: \"sg\" });\n * console.log(`${reviews.summary?.rating_total} reviews`);\n * for (const review of reviews.reviews) {\n * console.log(`${review.author_username}: ${review.rating_star}* ${review.comment}`);\n * }\n * ```\n */\nexport class ReviewsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get product reviews for a Shopee item.\n *\n * @param shopId - The Shopee shop identifier.\n * @param itemId - The Shopee item identifier.\n * @param options - Optional parameters (market, limit, offset, rating, filter).\n * @returns Reviews result page with review items and aggregate summary.\n * @throws NotFoundError - If the product doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async get(\n shopId: number,\n itemId: number,\n options: ShopeeReviewsParams = {}\n ): Promise<ReviewsResult> {\n return this.client.request<ReviewsResult>(`/v1/shopee/product/${shopId}/${itemId}/reviews`, {\n params: {\n market: options.market,\n limit: options.limit,\n offset: options.offset,\n rating: options.rating,\n filter: options.filter,\n },\n });\n }\n}\n","/**\n * Shopee Reference Data API client.\n *\n * Provides methods for fetching the static category tree and markets list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeCategoriesParams, MarketsResponse, CategoryTree } from \"./types.js\";\n\n/**\n * Client for Shopee reference data endpoints (markets, categories).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.shopee.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n *\n * const tree = await client.shopee.reference.categories({ market: \"sg\" });\n * for (const cat of tree.categories) {\n * console.log(`${cat.category_id}: ${cat.display_name}`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported Shopee marketplaces.\n *\n * @returns Markets response with all supported Shopee markets (0 credits).\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/shopee/markets\");\n }\n\n /**\n * Get the full category tree for a Shopee market.\n *\n * @param options - Optional parameters (market).\n * @returns Category tree with all top-level and nested category nodes.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the market code is invalid.\n */\n async categories(options: ShopeeCategoriesParams = {}): Promise<CategoryTree> {\n return this.client.request<CategoryTree>(\"/v1/shopee/categories\", {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Shopee API client.\n *\n * Provides access to all Shopee API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { ReviewsClient } from \"./reviews.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Shopee API client with access to all Shopee endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Keyword search and category-item listing\n * - `products` - Full product detail pages (PDP)\n * - `reviews` - Product reviews and rating summaries\n * - `reference` - Reference data (markets, category tree)\n *\n * Supported markets: id, ph, vn, br, my, th, sg, tw, co, cl, mx.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search products\n * const results = await client.shopee.search.search({\n * keyword: \"wireless headphones\",\n * market: \"sg\",\n * });\n *\n * // Get product detail\n * const product = await client.shopee.products.get(12345, 67890, { market: \"sg\" });\n *\n * // Get reviews\n * const reviews = await client.shopee.reviews.get(12345, 67890, { rating: 5 });\n *\n * // Get reference data\n * const markets = await client.shopee.reference.markets();\n * const tree = await client.shopee.reference.categories({ market: \"sg\" });\n * ```\n */\nexport class ShopeeClient {\n /** Client for keyword search and category-item listing */\n readonly search: SearchClient;\n\n /** Client for full product detail pages */\n readonly products: ProductsClient;\n\n /** Client for product reviews and rating summaries */\n readonly reviews: ReviewsClient;\n\n /** Client for reference data (markets, category tree) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Shopee client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.products = new ProductsClient(client);\n this.reviews = new ReviewsClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * TikTok Users API client.\n *\n * Provides methods for user profiles and their cursor-paginated lists\n * (videos, followers, following, liked, reposts).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokUserParams,\n TikTokUserListParams,\n ProfileResponse,\n VideoListResponse,\n UserListResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok user endpoints (profile, videos, followers, following, liked, reposts).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.tiktok.users.get(\"charlidamelio\");\n * console.log(profile.user.stats.follower_count);\n *\n * const videos = await client.tiktok.users.videos(\"charlidamelio\", { count: 30 });\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a TikTok user's full profile.\n *\n * @param username - The user's @handle (without the leading '@').\n * @param options - Optional parameters (region).\n * @returns The user profile response.\n * @throws NotFoundError - If the user doesn't exist.\n */\n async get(username: string, options: TikTokUserParams = {}): Promise<ProfileResponse> {\n return this.client.request<ProfileResponse>(`/v1/tiktok/users/${username}`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get a TikTok user's posted videos.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of videos.\n */\n async videos(username: string, options: TikTokUserListParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/users/${username}/videos`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get a TikTok user's followers (best-effort; often guest-gated).\n *\n * @deprecated Requires an authenticated session; currently returns 410.\n * Kept for forward-compatibility — the endpoint may be re-enabled when\n * session-based access is supported.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of follower authors.\n */\n async followers(username: string, options: TikTokUserListParams = {}): Promise<UserListResponse> {\n return this.client.request<UserListResponse>(`/v1/tiktok/users/${username}/followers`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get accounts a TikTok user follows (best-effort).\n *\n * @deprecated Requires an authenticated session; currently returns 410.\n * Kept for forward-compatibility — the endpoint may be re-enabled when\n * session-based access is supported.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of followed authors.\n */\n async following(username: string, options: TikTokUserListParams = {}): Promise<UserListResponse> {\n return this.client.request<UserListResponse>(`/v1/tiktok/users/${username}/following`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get a TikTok user's liked videos (only if their Liked tab is public).\n *\n * @deprecated Requires an authenticated session; currently returns 410.\n * Kept for forward-compatibility — the endpoint may be re-enabled when\n * session-based access is supported.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of videos.\n */\n async liked(username: string, options: TikTokUserListParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/users/${username}/liked`, {\n params: { region: options.region, count: options.count },\n });\n }\n\n /**\n * Get videos a TikTok user has reposted.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of videos.\n */\n async reposts(username: string, options: TikTokUserListParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/users/${username}/reposts`, {\n params: { region: options.region, count: options.count },\n });\n }\n}\n","/**\n * TikTok Videos API client.\n *\n * Provides methods for video detail, comments, comment replies, related\n * videos, transcript, and oEmbed metadata.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokVideoParams,\n TikTokCommentsParams,\n TikTokCommentRepliesParams,\n TikTokRelatedParams,\n TikTokTranscriptParams,\n TikTokOEmbedParams,\n VideoResponse,\n CommentListResponse,\n VideoListResponse,\n TranscriptResponse,\n TikTokOEmbed,\n} from \"./types.js\";\n\n/**\n * Client for TikTok video endpoints (detail, comments, replies, related, transcript, oEmbed).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const video = await client.tiktok.videos.get(\"7372...\");\n * console.log(video.video.stats.play_count);\n *\n * const comments = await client.tiktok.videos.comments(\"7372...\");\n * ```\n */\nexport class VideosClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full metadata for a single TikTok video/post.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region, username).\n * @returns The video detail response.\n * @throws NotFoundError - If the video doesn't exist.\n */\n async get(videoId: string, options: TikTokVideoParams = {}): Promise<VideoResponse> {\n return this.client.request<VideoResponse>(`/v1/tiktok/videos/${videoId}`, {\n params: { region: options.region, username: options.username },\n });\n }\n\n /**\n * Get top-level comments on a TikTok video.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of comments.\n */\n async comments(\n videoId: string,\n options: TikTokCommentsParams = {}\n ): Promise<CommentListResponse> {\n return this.client.request<CommentListResponse>(`/v1/tiktok/videos/${videoId}/comments`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get replies to a TikTok comment (best-effort).\n *\n * @param commentId - The comment id.\n * @param options - Parameters including the required `videoId` (region, count, cursor).\n * @returns A cursor-paginated list of reply comments.\n */\n async commentReplies(\n commentId: string,\n options: TikTokCommentRepliesParams\n ): Promise<CommentListResponse> {\n return this.client.request<CommentListResponse>(`/v1/tiktok/comments/${commentId}/replies`, {\n params: {\n video_id: options.videoId,\n region: options.region,\n count: options.count,\n cursor: options.cursor,\n },\n });\n }\n\n /**\n * Get TikTok's related videos for a given video.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of related videos.\n */\n async related(videoId: string, options: TikTokRelatedParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/videos/${videoId}/related`, {\n params: { region: options.region, count: options.count },\n });\n }\n\n /**\n * Get subtitle/caption tracks for a TikTok video.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region).\n * @returns The transcript response with subtitle tracks and voice-to-text.\n */\n async transcript(\n videoId: string,\n options: TikTokTranscriptParams = {}\n ): Promise<TranscriptResponse> {\n return this.client.request<TranscriptResponse>(`/v1/tiktok/videos/${videoId}/transcript`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get cheap unauthenticated oEmbed metadata for a TikTok URL.\n *\n * @param url - Full TikTok video or profile URL.\n * @param options - Optional parameters (region).\n * @returns The oEmbed metadata.\n */\n async oembed(url: string, options: TikTokOEmbedParams = {}): Promise<TikTokOEmbed> {\n return this.client.request<TikTokOEmbed>(\"/v1/tiktok/oembed\", {\n params: { url, region: options.region },\n });\n }\n}\n","/**\n * TikTok Search API client.\n *\n * Provides keyword search across videos, users, and hashtags.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokSearchParams,\n VideoListResponse,\n UserSearchResponse,\n HashtagSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok search endpoints (general, videos, users, hashtags).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const top = await client.tiktok.search.search({ query: \"skincare\" });\n * const users = await client.tiktok.search.users({ query: \"skincare\" });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * General TikTok search — video results from the Top feed.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of videos.\n */\n async search(params: TikTokSearchParams): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(\"/v1/tiktok/search\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n\n /**\n * Search TikTok videos by keyword.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of videos.\n */\n async videos(params: TikTokSearchParams): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(\"/v1/tiktok/search/videos\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n\n /**\n * Search TikTok users by keyword.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of matching users.\n */\n async users(params: TikTokSearchParams): Promise<UserSearchResponse> {\n return this.client.request<UserSearchResponse>(\"/v1/tiktok/search/users\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n\n /**\n * Search TikTok hashtags by keyword.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of matching hashtags.\n */\n async hashtags(params: TikTokSearchParams): Promise<HashtagSearchResponse> {\n return this.client.request<HashtagSearchResponse>(\"/v1/tiktok/search/hashtags\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n}\n","/**\n * TikTok Music API client.\n *\n * Provides sound/music detail and the videos using a given sound.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokMusicParams,\n TikTokListVideosParams,\n MusicResponse,\n VideoListResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok music endpoints (detail, videos).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const music = await client.tiktok.music.get(\"6975...\");\n * const videos = await client.tiktok.music.videos(\"6975...\");\n * ```\n */\nexport class MusicClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get TikTok sound/music detail.\n *\n * @param musicId - The sound/music id.\n * @param options - Optional parameters (region).\n * @returns The music detail response.\n * @throws NotFoundError - If the music doesn't exist.\n */\n async get(musicId: string, options: TikTokMusicParams = {}): Promise<MusicResponse> {\n return this.client.request<MusicResponse>(`/v1/tiktok/music/${musicId}`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get videos using a given TikTok sound.\n *\n * @param musicId - The sound/music id.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of videos.\n */\n async videos(musicId: string, options: TikTokListVideosParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/music/${musicId}/videos`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n}\n","/**\n * TikTok Hashtags API client.\n *\n * Provides hashtag/challenge detail and the videos tagged with a hashtag.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokHashtagParams,\n TikTokListVideosParams,\n HashtagResponse,\n VideoListResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok hashtag endpoints (detail, videos).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const tag = await client.tiktok.hashtags.get(\"fyp\");\n * const videos = await client.tiktok.hashtags.videos(\"fyp\");\n * ```\n */\nexport class HashtagsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get TikTok hashtag/challenge detail.\n *\n * @param name - The hashtag name (without the leading '#').\n * @param options - Optional parameters (region).\n * @returns The hashtag detail response.\n * @throws NotFoundError - If the hashtag doesn't exist.\n */\n async get(name: string, options: TikTokHashtagParams = {}): Promise<HashtagResponse> {\n return this.client.request<HashtagResponse>(`/v1/tiktok/hashtags/${name}`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get videos tagged with a TikTok hashtag.\n *\n * @param name - The hashtag name (without the leading '#').\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of videos.\n */\n async videos(name: string, options: TikTokListVideosParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/hashtags/${name}/videos`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n}\n","/**\n * TikTok Trending API client.\n *\n * Provides trending videos, hashtags, and songs.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokTrendingVideosParams,\n TikTokTrendingParams,\n VideoListResponse,\n TrendingHashtagsResponse,\n TrendingSongsResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok trending endpoints (videos, hashtags, songs).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const videos = await client.tiktok.trending.videos({ region: \"US\" });\n * const hashtags = await client.tiktok.trending.hashtags({ region: \"US\", period: 7 });\n * const songs = await client.tiktok.trending.songs({ region: \"US\" });\n * ```\n */\nexport class TrendingClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get trending videos from the TikTok Explore feed.\n *\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of trending videos.\n */\n async videos(options: TikTokTrendingVideosParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(\"/v1/tiktok/trending/videos\", {\n params: { region: options.region, count: options.count },\n });\n }\n\n /**\n * Get trending hashtags (mobile Discover surface — view_count + creators).\n *\n * @param options - Optional parameters (region, period, count).\n * @returns The trending hashtags response.\n */\n async hashtags(options: TikTokTrendingParams = {}): Promise<TrendingHashtagsResponse> {\n return this.client.request<TrendingHashtagsResponse>(\"/v1/tiktok/trending/hashtags\", {\n params: { region: options.region, period: options.period, count: options.count },\n });\n }\n\n /**\n * Get trending songs/sounds (mobile hot-music feed — ranked by usage).\n *\n * @param options - Optional parameters (region, period, count).\n * @returns The trending songs response.\n */\n async songs(options: TikTokTrendingParams = {}): Promise<TrendingSongsResponse> {\n return this.client.request<TrendingSongsResponse>(\"/v1/tiktok/trending/songs\", {\n params: { region: options.region, period: options.period, count: options.count },\n });\n }\n}\n","/**\n * TikTok Ads API client.\n *\n * Provides access to TikTok's Commercial Content Library (EU-DSA ad\n * transparency) via keyword or advertiser search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokAdSearchParams,\n TikTokAdvertiserSearchParams,\n TikTokAdDetailParams,\n AdLibrarySearchResponse,\n AdvertiserSearchResponse,\n AdDetailResponse,\n} from \"./types.js\";\n\n/**\n * Client for the TikTok Ad Library (Commercial Content Library) endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const ads = await client.tiktok.ads.search({ query: \"shoes\", region: \"DE\" });\n * for (const ad of ads.ads) {\n * console.log(ad.name);\n * }\n * ```\n */\nexport class AdsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.\n *\n * @param params - Optional parameters (query, advertiser_id, region, days, sort, offset, search_id, count).\n * @returns The ad-library search response with ads and pagination.\n */\n async search(params: TikTokAdSearchParams = {}): Promise<AdLibrarySearchResponse> {\n return this.client.request<AdLibrarySearchResponse>(\"/v1/tiktok/ads/search\", {\n params: {\n query: params.query,\n advertiser_id: params.advertiser_id,\n region: params.region,\n days: params.days,\n sort: params.sort,\n offset: params.offset,\n search_id: params.search_id,\n count: params.count,\n },\n });\n }\n\n /**\n * Look up advertiser business ids by name.\n *\n * Feed the returned `id` into {@link search} as `advertiser_id` to list all of an\n * advertiser's ads. Matching is on the legal entity name, so a brand may appear under\n * several legal entities.\n *\n * @param params - `query` (required), plus optional `region` and `count`.\n * @returns Matching advertisers, each with a business `id`.\n */\n async searchAdvertisers(params: TikTokAdvertiserSearchParams): Promise<AdvertiserSearchResponse> {\n return this.client.request<AdvertiserSearchResponse>(\"/v1/tiktok/ads/advertisers\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n },\n });\n }\n\n /**\n * Get a single ad's advertiser, creatives, and full targeting/impression breakdown.\n *\n * @param adId - Ad id from a {@link search} result.\n * @param params - Optional `region` (EU-only, default \"DE\").\n * @returns The ad, its advertiser, and per-region age/gender impression targeting.\n */\n async getDetail(adId: string, params: TikTokAdDetailParams = {}): Promise<AdDetailResponse> {\n return this.client.request<AdDetailResponse>(`/v1/tiktok/ads/${adId}`, {\n params: { region: params.region },\n });\n }\n}\n","/**\n * TikTok Reference Data API client.\n *\n * Provides the supported-regions list and a service health check.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { RegionsResponse } from \"./types.js\";\n\n/**\n * Client for TikTok reference data endpoints (regions, health).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const regions = await client.tiktok.reference.regions();\n * for (const r of regions.regions) {\n * console.log(`${r.code}: ${r.name} (${r.locale})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List supported TikTok content regions.\n *\n * @returns The regions response with all supported content regions.\n */\n async regions(): Promise<RegionsResponse> {\n return this.client.request<RegionsResponse>(\"/v1/tiktok/regions\");\n }\n\n /**\n * Check the health of the TikTok scraper service.\n *\n * @returns The raw health payload from the scraper service.\n */\n async health(): Promise<unknown> {\n return this.client.request<unknown>(\"/v1/tiktok/health\");\n }\n}\n","/**\n * TikTok API client.\n *\n * Provides access to all TikTok API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { UsersClient } from \"./users.js\";\nimport { VideosClient } from \"./videos.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MusicClient } from \"./music.js\";\nimport { HashtagsClient } from \"./hashtags.js\";\nimport { TrendingClient } from \"./trending.js\";\nimport { AdsClient } from \"./ads.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * TikTok API client with access to all TikTok endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `users` - Profiles, videos, followers, following, liked, reposts\n * - `videos` - Detail, comments, replies, related, transcript, oEmbed\n * - `search` - Keyword search across videos, users, and hashtags\n * - `music` - Sound/music detail and videos using a sound\n * - `hashtags` - Hashtag detail and tagged videos\n * - `trending` - Trending videos, hashtags, and songs\n * - `ads` - The Commercial Content Library (ad transparency)\n * - `reference` - Reference data (regions) and service health\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get a user profile\n * const profile = await client.tiktok.users.get(\"charlidamelio\");\n *\n * // Get video detail\n * const video = await client.tiktok.videos.get(\"7372...\");\n *\n * // Search videos\n * const results = await client.tiktok.search.videos({ query: \"skincare\" });\n *\n * // Get trending songs\n * const songs = await client.tiktok.trending.songs({ region: \"US\" });\n *\n * // Search the ad library\n * const ads = await client.tiktok.ads.search({ query: \"shoes\", region: \"DE\" });\n *\n * // List regions\n * const regions = await client.tiktok.reference.regions();\n * ```\n */\nexport class TikTokClient {\n private readonly _gen: BaseClient;\n\n /** Client for profiles, videos, followers, following, liked, reposts */\n readonly users: UsersClient;\n\n /** Client for video detail, comments, replies, related, transcript, oEmbed */\n readonly videos: VideosClient;\n\n /** Client for keyword search across videos, users, and hashtags */\n readonly search: SearchClient;\n\n /** Client for sound/music detail and videos using a sound */\n readonly music: MusicClient;\n\n /** Client for hashtag detail and tagged videos */\n readonly hashtags: HashtagsClient;\n\n /** Client for trending videos, hashtags, and songs */\n readonly trending: TrendingClient;\n\n /** Client for the Commercial Content Library (ad transparency) */\n readonly ads: AdsClient;\n\n /** Client for reference data (regions) and service health */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new TikTok client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.users = new UsersClient(client);\n this.videos = new VideosClient(client);\n this.search = new SearchClient(client);\n this.music = new MusicClient(client);\n this.hashtags = new HashtagsClient(client);\n this.trending = new TrendingClient(client);\n this.ads = new AdsClient(client);\n this.reference = new ReferenceClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Search TikTok advertisers. Generated from the OpenAPI spec; returns the raw response object. */\n async searchTiktokAdvertisers(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/tiktok/ads/advertisers\", { params });\n }\n\n /** Get TikTok ad detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getTiktokAdDetail(\n adId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/tiktok/ads/${adId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * eBay Search API client.\n *\n * Provides methods for active search, completed/sold search, and keyword\n * autocomplete suggestions.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n EbaySearchParams,\n EbayCompletedParams,\n EbayAutocompleteParams,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for eBay search, completed-listings, and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.ebay.search.search({ query: \"nintendo switch\" });\n * for (const item of results.results) {\n * console.log(`${item.position}. ${item.title}`);\n * }\n *\n * const sold = await client.ebay.search.completed({ query: \"nintendo switch\" });\n *\n * const suggestions = await client.ebay.search.autocomplete(\"ipho\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search an eBay marketplace for active listings.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results with cards, facets, and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: EbaySearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/ebay/search\", {\n params: {\n query: params.query,\n domain: params.domain,\n category_id: params.category_id,\n page: params.page,\n per_page: params.per_page,\n sort_by: params.sort_by,\n condition: params.condition,\n buying_format: params.buying_format,\n min_price: params.min_price,\n max_price: params.max_price,\n free_shipping: params.free_shipping,\n },\n });\n }\n\n /**\n * Search completed / sold listings — eBay's sold-price history.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results (with `sold: true`), facets, and pagination.\n */\n async completed(params: EbayCompletedParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/ebay/completed\", {\n params: {\n query: params.query,\n domain: params.domain,\n category_id: params.category_id,\n page: params.page,\n per_page: params.per_page,\n sort_by: params.sort_by,\n condition: params.condition,\n min_price: params.min_price,\n max_price: params.max_price,\n },\n });\n }\n\n /**\n * Get eBay keyword autocomplete suggestions.\n *\n * @param query - Partial search query prefix.\n * @param options - Optional parameters (domain).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: EbayAutocompleteParams = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/ebay/autocomplete\", {\n params: { query, domain: options.domain },\n });\n }\n}\n","/**\n * eBay Items API client.\n *\n * Provides methods for fetching item detail and catalog product reviews.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n EbayItemParams,\n EbayReviewsParams,\n ItemDetailResponse,\n ReviewsResponse,\n} from \"./types.js\";\n\n/**\n * Client for eBay item endpoints (detail, reviews).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.ebay.items.get(\"123456789012\");\n * console.log(detail.item.title);\n *\n * const reviews = await client.ebay.items.reviews(\"123456789012\");\n * console.log(`${reviews.ratings_total} reviews`);\n * ```\n */\nexport class ItemsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single eBay listing's full detail.\n *\n * @param itemId - The eBay item id.\n * @param options - Optional parameters (domain).\n * @returns Item detail including specifics, shipping, and seller summary.\n * @throws NotFoundError - If the item doesn't exist.\n */\n async get(itemId: string, options: EbayItemParams = {}): Promise<ItemDetailResponse> {\n return this.client.request<ItemDetailResponse>(`/v1/ebay/items/${itemId}`, {\n params: { domain: options.domain },\n });\n }\n\n /**\n * Get the catalog product reviews shown on an eBay listing.\n *\n * @param itemId - The eBay item id.\n * @param options - Optional parameters (domain, page, productId).\n * @returns Reviews response with reviews, aggregate rating, and histogram.\n */\n async reviews(itemId: string, options: EbayReviewsParams = {}): Promise<ReviewsResponse> {\n return this.client.request<ReviewsResponse>(`/v1/ebay/items/${itemId}/reviews`, {\n params: {\n domain: options.domain,\n page: options.page,\n product_id: options.productId,\n },\n });\n }\n}\n","/**\n * eBay Sellers API client.\n *\n * Provides methods for seller profile, storefront listings, and feedback.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n EbaySellerParams,\n EbaySellerItemsParams,\n EbaySellerFeedbackParams,\n SellerProfileResponse,\n SellerItemsResponse,\n SellerFeedbackResponse,\n} from \"./types.js\";\n\n/**\n * Client for eBay seller endpoints (profile, items, feedback).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.ebay.sellers.get(\"musicmagpie\");\n * console.log(profile.seller.feedback_score);\n *\n * const items = await client.ebay.sellers.items(\"musicmagpie\");\n * const feedback = await client.ebay.sellers.feedback(\"musicmagpie\");\n * ```\n */\nexport class SellersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get an eBay seller's public profile.\n *\n * @param username - The seller username.\n * @param options - Optional parameters (domain).\n * @returns Seller profile response.\n * @throws NotFoundError - If the seller doesn't exist.\n */\n async get(username: string, options: EbaySellerParams = {}): Promise<SellerProfileResponse> {\n return this.client.request<SellerProfileResponse>(`/v1/ebay/sellers/${username}`, {\n params: { domain: options.domain },\n });\n }\n\n /**\n * List the active listings of a single eBay seller.\n *\n * @param username - The seller username.\n * @param options - Optional parameters (domain, query, page, per_page).\n * @returns Seller items response with result cards and pagination.\n */\n async items(username: string, options: EbaySellerItemsParams = {}): Promise<SellerItemsResponse> {\n return this.client.request<SellerItemsResponse>(`/v1/ebay/sellers/${username}/items`, {\n params: {\n domain: options.domain,\n query: options.query,\n page: options.page,\n per_page: options.per_page,\n },\n });\n }\n\n /**\n * Get a seller's recent feedback comments.\n *\n * @param username - The seller username.\n * @param options - Optional parameters (domain, page).\n * @returns Seller feedback response with feedback entries and pagination.\n */\n async feedback(\n username: string,\n options: EbaySellerFeedbackParams = {}\n ): Promise<SellerFeedbackResponse> {\n return this.client.request<SellerFeedbackResponse>(`/v1/ebay/sellers/${username}/feedback`, {\n params: { domain: options.domain, page: options.page },\n });\n }\n}\n","/**\n * eBay Categories API client.\n *\n * Provides methods for browsing a category's listings and listing the\n * reference category aliases.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { EbayCategoryParams, CategoryResponse, CategoriesResponse } from \"./types.js\";\n\n/**\n * Client for eBay category endpoints (browse, list).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const listings = await client.ebay.categories.browse(\"9355\");\n * for (const item of listings.results) {\n * console.log(item.title);\n * }\n *\n * const categories = await client.ebay.categories.list();\n * ```\n */\nexport class CategoriesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List active listings within an eBay category.\n *\n * @param categoryId - The eBay category id.\n * @param options - Optional parameters (domain, page, per_page, sort_by, min_price, max_price).\n * @returns Category response with result cards, facets, and pagination.\n */\n async browse(categoryId: string, options: EbayCategoryParams = {}): Promise<CategoryResponse> {\n return this.client.request<CategoryResponse>(`/v1/ebay/categories/${categoryId}/items`, {\n params: {\n domain: options.domain,\n page: options.page,\n per_page: options.per_page,\n sort_by: options.sort_by,\n min_price: options.min_price,\n max_price: options.max_price,\n },\n });\n }\n\n /**\n * List eBay's reference top-level category ids.\n *\n * @returns Categories response with all category aliases.\n */\n async list(): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/ebay/categories\");\n }\n}\n","/**\n * eBay Reference Data API client.\n *\n * Provides methods for fetching the static marketplace list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse } from \"./types.js\";\n\n/**\n * Client for eBay reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.ebay.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported eBay marketplaces.\n *\n * @returns Markets response with all supported marketplaces.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/ebay/markets\");\n }\n}\n","/**\n * eBay API client.\n *\n * Provides access to all eBay API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ItemsClient } from \"./items.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { CategoriesClient } from \"./categories.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * eBay API client with access to all eBay endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Active search, completed/sold search, and autocomplete\n * - `items` - Item detail and catalog product reviews\n * - `sellers` - Seller profile, storefront items, and feedback\n * - `categories` - Category browse and reference category list\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search active listings\n * const results = await client.ebay.search.search({ query: \"nintendo switch\" });\n *\n * // Sold-price history\n * const sold = await client.ebay.search.completed({ query: \"nintendo switch\" });\n *\n * // Get item detail\n * const item = await client.ebay.items.get(\"123456789012\");\n *\n * // Get item reviews\n * const reviews = await client.ebay.items.reviews(\"123456789012\");\n *\n * // Get a seller profile\n * const seller = await client.ebay.sellers.get(\"musicmagpie\");\n *\n * // Browse a category\n * const listings = await client.ebay.categories.browse(\"9355\");\n *\n * // Reference data\n * const markets = await client.ebay.reference.markets();\n * ```\n */\nexport class EbayClient {\n /** Client for active search, completed/sold search, and autocomplete */\n readonly search: SearchClient;\n\n /** Client for item detail and catalog product reviews */\n readonly items: ItemsClient;\n\n /** Client for seller profile, items, and feedback */\n readonly sellers: SellersClient;\n\n /** Client for category browse and the reference category list */\n readonly categories: CategoriesClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new eBay client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.items = new ItemsClient(client);\n this.sellers = new SellersClient(client);\n this.categories = new CategoriesClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Facebook API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Facebook API operations. (Generated from the OpenAPI spec.) */\nexport class FacebookClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Search advertiser pages. Generated from the OpenAPI spec; returns the raw response object. */\n async searchAdvertiserPages(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/ads/pages/search\", { params });\n }\n\n /** Get advertiser page info. Generated from the OpenAPI spec; returns the raw response object. */\n async getAdvertiserPageInfo(\n pageId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/ads/pages/${pageId}`, { params });\n }\n\n /** Search the Ad Library. Generated from the OpenAPI spec; returns the raw response object. */\n async searchTheAdLibrary(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/ads/search\", { params });\n }\n\n /** Get an ad. Generated from the OpenAPI spec; returns the raw response object. */\n async getAnAd(\n adArchiveId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/ads/${adArchiveId}`, { params });\n }\n\n /** Get group detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getGroupDetail(\n groupId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/groups/${groupId}`, { params });\n }\n\n /** Get group posts. Generated from the OpenAPI spec; returns the raw response object. */\n async getGroupPosts(\n groupId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/groups/${groupId}/posts`, { params });\n }\n\n /** List categories. Generated from the OpenAPI spec; returns the raw response object. */\n async listCategories(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/marketplace/categories\", { params });\n }\n\n /** Browse a Marketplace category. Generated from the OpenAPI spec; returns the raw response object. */\n async browseAMarketplaceCategory(\n category: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/marketplace/category/${category}`, { params });\n }\n\n /** Get a Marketplace item. Generated from the OpenAPI spec; returns the raw response object. */\n async getAMarketplaceItem(\n itemId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/marketplace/item/${itemId}`, { params });\n }\n\n /** List locations. Generated from the OpenAPI spec; returns the raw response object. */\n async listLocations(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/marketplace/locations\", { params });\n }\n\n /** Search Marketplace. Generated from the OpenAPI spec; returns the raw response object. */\n async searchMarketplace(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/marketplace/search\", { params });\n }\n\n /** Get page detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPageDetail(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/pages/${identifier}`, { params });\n }\n\n /** Get page posts. Generated from the OpenAPI spec; returns the raw response object. */\n async getPagePosts(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/pages/${identifier}/posts`, { params });\n }\n\n /** Get post detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPostDetail(\n postId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/posts/${postId}`, { params });\n }\n\n /** Get post comments. Generated from the OpenAPI spec; returns the raw response object. */\n async getPostComments(\n postId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/posts/${postId}/comments`, { params });\n }\n\n /** Get profile detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getProfileDetail(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/profiles/${identifier}`, { params });\n }\n\n /** Get profile posts. Generated from the OpenAPI spec; returns the raw response object. */\n async getProfilePosts(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/profiles/${identifier}/posts`, { params });\n }\n\n /** Search everything. Generated from the OpenAPI spec; returns the raw response object. */\n async searchEverything(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search\", { params });\n }\n\n /** Search events. Generated from the OpenAPI spec; returns the raw response object. */\n async searchEvents(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/events\", { params });\n }\n\n /** Search groups. Generated from the OpenAPI spec; returns the raw response object. */\n async searchGroups(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/groups\", { params });\n }\n\n /** Search Pages. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPages(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/pages\", { params });\n }\n\n /** Search people. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPeople(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/people\", { params });\n }\n\n /** Search places. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPlaces(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/places\", { params });\n }\n\n /** Search posts. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPosts(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/posts\", { params });\n }\n}\n","/**\n * Walmart Search API client.\n *\n * Search, category browse, the deals feed, and search-box autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n WalmartAutocompleteResponse,\n WalmartCategoryParams,\n WalmartDealsParams,\n WalmartSearchParams,\n WalmartSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for Walmart search, category, deals and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.walmart.search.search(\"laptop\", { sort: \"price_low\" });\n * for (const item of results.items) {\n * console.log(`${item.position}. ${item.name} — $${item.price}`);\n * }\n *\n * const browse = await client.walmart.search.category(\"electronics/3944\");\n * const deals = await client.walmart.search.deals();\n * const suggestions = await client.walmart.search.autocomplete(\"lapt\");\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search walmart.com.\n *\n * @param query - Search keywords, e.g. `\"laptop\"`.\n * @param params - Optional page (1-10), sort, price and facet filters.\n * @returns A page of ~40-60 organic products.\n *\n * @remarks\n * Results dry up after page 10 regardless of `total_results_reported`; bound\n * a crawl with `max_page`. Sponsored ad tiles are dropped, sponsored\n * *products* are returned and flagged `is_sponsored`.\n */\n async search(query: string, params: WalmartSearchParams = {}): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(\"/v1/walmart/search\", {\n params: {\n query,\n page: params.page,\n sort: params.sort,\n min_price: params.min_price,\n max_price: params.max_price,\n facet: params.facet,\n },\n });\n }\n\n /**\n * Browse a Walmart category. Same result shape as {@link search}.\n *\n * @param path - Browse path, e.g. `\"electronics/3944\"`, or a `/cp/...` path.\n * @param params - Optional page (1-11), price and facet filters.\n *\n * @remarks\n * No `sort`: Walmart's browse pages ignore it (verified). Sort on\n * {@link search} instead.\n */\n async category(path: string, params: WalmartCategoryParams = {}): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(\"/v1/walmart/category\", {\n params: {\n path,\n page: params.page,\n min_price: params.min_price,\n max_price: params.max_price,\n facet: params.facet,\n },\n });\n }\n\n /**\n * Walmart's current deals, rollbacks and clearance.\n *\n * @param params - Optional page (1-11) and price filters.\n */\n async deals(params: WalmartDealsParams = {}): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(\"/v1/walmart/deals\", {\n params: {\n page: params.page,\n min_price: params.min_price,\n max_price: params.max_price,\n },\n });\n }\n\n /**\n * Walmart search-box suggestions — the cheapest call in this API.\n *\n * @param query - Partial search term, e.g. `\"lapt\"`.\n */\n async autocomplete(query: string): Promise<WalmartAutocompleteResponse> {\n return this.client.request<WalmartAutocompleteResponse>(\"/v1/walmart/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Walmart Products API client.\n *\n * Product detail and paginated customer reviews.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { WalmartProduct, WalmartReviewsParams, WalmartReviewsResponse } from \"./types.js\";\n\n/**\n * Client for Walmart product endpoints (detail, reviews).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const product = await client.walmart.products.get(\"5689919121\");\n * console.log(product.name, product.price, product.seller?.seller_name);\n *\n * const reviews = await client.walmart.products.reviews(\"5689919121\", {\n * sort: \"helpful\",\n * });\n * ```\n */\nexport class ProductsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get full product detail.\n *\n * @param itemId - Walmart `usItemId`, e.g. `\"5689919121\"`.\n * @throws NotFoundError - If the item doesn't exist.\n *\n * @remarks\n * Only the numeric id is needed — the SEO slug is decorative and ignored by\n * Walmart's router. Prices and availability are store-specific; the resolved\n * store is on `location`.\n */\n async get(itemId: string): Promise<WalmartProduct> {\n return this.client.request<WalmartProduct>(`/v1/walmart/products/${itemId}`);\n }\n\n /**\n * Get paginated customer reviews with the full star histogram.\n *\n * @param itemId - Walmart `usItemId`.\n * @param params - Optional page (1-100) and sort.\n * @returns Reviews plus the rating breakdown, aspects, and the most-helpful\n * positive and negative reviews.\n *\n * @remarks 10 reviews per page — Walmart's page size, not adjustable.\n */\n async reviews(\n itemId: string,\n params: WalmartReviewsParams = {}\n ): Promise<WalmartReviewsResponse> {\n return this.client.request<WalmartReviewsResponse>(`/v1/walmart/products/${itemId}/reviews`, {\n params: { page: params.page, sort: params.sort },\n });\n }\n}\n","/**\n * Walmart Sellers API client.\n *\n * Marketplace seller profile and seller catalogue.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n WalmartSearchResponse,\n WalmartSellerProductsParams,\n WalmartSellerResponse,\n} from \"./types.js\";\n\n/**\n * Client for Walmart seller endpoints (profile, products).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const seller = await client.walmart.sellers.get(\"101040442\");\n * console.log(seller.seller.name, seller.seller.rating);\n *\n * // `query` is required — the seller facet alone returns nothing.\n * const catalogue = await client.walmart.sellers.products(\"101040442\", \"headphones\");\n * ```\n */\nexport class SellersClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get a marketplace seller's profile — contact details, address, rating,\n * policies.\n *\n * @param sellerId - Numeric catalog seller id, e.g. `\"101040442\"`. This is\n * the `seller.catalog_seller_id` on a product — NOT the 32-char hex\n * `seller_id`, which 404s as a storefront URL.\n *\n * @remarks\n * No page parameter and no product list: adding `?page=` makes Walmart's own\n * SSR throw. Use {@link products} for the catalogue.\n */\n async get(sellerId: string): Promise<WalmartSellerResponse> {\n return this.client.request<WalmartSellerResponse>(`/v1/walmart/sellers/${sellerId}`);\n }\n\n /**\n * List a marketplace seller's catalogue.\n *\n * @param sellerId - Numeric catalog seller id.\n * @param query - Search term scoping the catalogue. REQUIRED — this goes\n * through search with a `retailer_id` facet, and the facet alone returns\n * zero results.\n * @param params - Optional page (1-10) and sort.\n */\n async products(\n sellerId: string,\n query: string,\n params: WalmartSellerProductsParams = {}\n ): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(`/v1/walmart/sellers/${sellerId}/products`, {\n params: { query, page: params.page, sort: params.sort },\n });\n }\n}\n","/**\n * Walmart Stores API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { WalmartStoreResponse } from \"./types.js\";\n\n/**\n * Client for Walmart store endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const res = await client.walmart.stores.get(\"100\");\n * console.log(res.store.address1, res.store.hours);\n * for (const svc of res.store.services) {\n * console.log(svc.display_name, svc.phone);\n * }\n * ```\n */\nexport class StoresClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get store detail plus every store around it.\n *\n * @param storeId - Walmart store number, e.g. `\"100\"`.\n * @returns The store's address, geo, phone, opening hours and per-department\n * services (each with its own hours and phone), plus ~30 nearby stores.\n */\n async get(storeId: string): Promise<WalmartStoreResponse> {\n return this.client.request<WalmartStoreResponse>(`/v1/walmart/stores/${storeId}`);\n }\n}\n","/**\n * Walmart Reference Data API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { WalmartMarketsResponse } from \"./types.js\";\n\n/**\n * Client for Walmart reference data endpoints (markets, health).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.walmart.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Walmart markets.\n *\n * @remarks\n * Only walmart.com (US) is supported — walmart.ca and walmart.com.mx run on\n * different platforms with different payload shapes, so they are not claimed\n * here rather than shipped broken.\n */\n async markets(): Promise<WalmartMarketsResponse> {\n return this.client.request<WalmartMarketsResponse>(\"/v1/walmart/markets\");\n }\n\n /**\n * Check the health of the Walmart scraper service.\n *\n * @returns The raw health payload from the scraper service.\n */\n async health(): Promise<unknown> {\n return this.client.request<unknown>(\"/v1/walmart/health\");\n }\n}\n","/**\n * Walmart API client.\n *\n * Provides access to all Walmart API endpoints through specialized sub-clients.\n * US-only (walmart.com) — there is no market or country parameter.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { StoresClient } from \"./stores.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Walmart API client with access to all Walmart endpoints.\n *\n * Sub-clients:\n * - `search` - Search, category browse, deals, autocomplete\n * - `products` - Product detail and reviews\n * - `sellers` - Marketplace seller profile and catalogue\n * - `stores` - Store detail and nearby stores\n * - `reference` - Reference data (markets) and service health\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.walmart.search.search(\"laptop\");\n * const product = await client.walmart.products.get(\"5689919121\");\n * const reviews = await client.walmart.products.reviews(\"5689919121\");\n * const seller = await client.walmart.sellers.get(\"101040442\");\n * const store = await client.walmart.stores.get(\"100\");\n * const markets = await client.walmart.reference.markets();\n * ```\n */\nexport class WalmartClient {\n /** Client for search, category browse, deals and autocomplete */\n readonly search: SearchClient;\n\n /** Client for product detail and reviews */\n readonly products: ProductsClient;\n\n /** Client for marketplace seller profile and catalogue */\n readonly sellers: SellersClient;\n\n /** Client for store detail and nearby stores */\n readonly stores: StoresClient;\n\n /** Client for reference data (markets) and service health */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Walmart client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.products = new ProductsClient(client);\n this.sellers = new SellersClient(client);\n this.stores = new StoresClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * DuckDuckGo Search API client.\n *\n * Web search with the optional Instant-Answer abstract.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { DuckDuckGoSearchParams, DuckDuckGoSearchResponse } from \"./types.js\";\n\n/**\n * Client for the DuckDuckGo web-search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.duckduckgo.search.search(\"privacy\", { region: \"us-en\" });\n * for (const item of results.results) {\n * console.log(`${item.title} — ${item.url}`);\n * }\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search duckduckgo.com.\n *\n * @param query - Search keywords, e.g. `\"privacy\"`.\n * @param params - Optional region, safesearch, timelimit and page.\n * @returns A page of web results plus the optional abstract.\n */\n async search(\n query: string,\n params: DuckDuckGoSearchParams = {}\n ): Promise<DuckDuckGoSearchResponse> {\n return this.client.request<DuckDuckGoSearchResponse>(\"/v1/duckduckgo/search\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n timelimit: params.timelimit,\n page: params.page,\n },\n });\n }\n}\n","/**\n * DuckDuckGo Media API client.\n *\n * Image, news and video search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n DuckDuckGoImagesParams,\n DuckDuckGoImagesResponse,\n DuckDuckGoNewsParams,\n DuckDuckGoNewsResponse,\n DuckDuckGoVideosParams,\n DuckDuckGoVideosResponse,\n} from \"./types.js\";\n\n/**\n * Client for the DuckDuckGo image, news and video endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.duckduckgo.media.images(\"puppies\", { size: \"Large\" });\n * const news = await client.duckduckgo.media.news(\"elections\", { timelimit: \"d\" });\n * const videos = await client.duckduckgo.media.videos(\"lofi\", { duration: \"long\" });\n * ```\n */\nexport class MediaClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search DuckDuckGo Images.\n *\n * @param query - Search keywords.\n * @param params - Optional region, safesearch, page and image filters\n * (size, color, image_type, layout, license).\n */\n async images(\n query: string,\n params: DuckDuckGoImagesParams = {}\n ): Promise<DuckDuckGoImagesResponse> {\n return this.client.request<DuckDuckGoImagesResponse>(\"/v1/duckduckgo/images\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n page: params.page,\n size: params.size,\n color: params.color,\n image_type: params.image_type,\n layout: params.layout,\n license: params.license,\n },\n });\n }\n\n /**\n * Search DuckDuckGo News.\n *\n * @param query - Search keywords.\n * @param params - Optional region, safesearch, timelimit and page.\n */\n async news(query: string, params: DuckDuckGoNewsParams = {}): Promise<DuckDuckGoNewsResponse> {\n return this.client.request<DuckDuckGoNewsResponse>(\"/v1/duckduckgo/news\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n timelimit: params.timelimit,\n page: params.page,\n },\n });\n }\n\n /**\n * Search DuckDuckGo Videos.\n *\n * @param query - Search keywords.\n * @param params - Optional region, safesearch, page, duration and resolution.\n */\n async videos(\n query: string,\n params: DuckDuckGoVideosParams = {}\n ): Promise<DuckDuckGoVideosResponse> {\n return this.client.request<DuckDuckGoVideosResponse>(\"/v1/duckduckgo/videos\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n page: params.page,\n duration: params.duration,\n resolution: params.resolution,\n },\n });\n }\n}\n","/**\n * DuckDuckGo Reference API client.\n *\n * Autocomplete, the Instant Answer API, and the list of supported regions.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n DuckDuckGoAutocompleteParams,\n DuckDuckGoAutocompleteResponse,\n DuckDuckGoInstantResponse,\n DuckDuckGoRegionsResponse,\n} from \"./types.js\";\n\n/**\n * Client for DuckDuckGo autocomplete, instant answers and regions.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const suggestions = await client.duckduckgo.reference.autocomplete(\"weath\");\n * const instant = await client.duckduckgo.reference.instant(\"python\");\n * const regions = await client.duckduckgo.reference.regions();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search-box suggestions for a partial query.\n *\n * @param query - Partial search term, e.g. `\"weath\"`.\n * @param params - Optional region.\n */\n async autocomplete(\n query: string,\n params: DuckDuckGoAutocompleteParams = {}\n ): Promise<DuckDuckGoAutocompleteResponse> {\n return this.client.request<DuckDuckGoAutocompleteResponse>(\"/v1/duckduckgo/autocomplete\", {\n params: {\n query,\n region: params.region,\n },\n });\n }\n\n /**\n * DuckDuckGo Instant Answer (zero-click info) for a query.\n *\n * @param query - The query, e.g. `\"python\"`.\n */\n async instant(query: string): Promise<DuckDuckGoInstantResponse> {\n return this.client.request<DuckDuckGoInstantResponse>(\"/v1/duckduckgo/instant\", {\n params: { query },\n });\n }\n\n /**\n * Get the supported DuckDuckGo search regions.\n */\n async regions(): Promise<DuckDuckGoRegionsResponse> {\n return this.client.request<DuckDuckGoRegionsResponse>(\"/v1/duckduckgo/regions\");\n }\n}\n","/**\n * DuckDuckGo API client.\n *\n * Provides access to all DuckDuckGo API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MediaClient } from \"./media.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * DuckDuckGo API client with access to all DuckDuckGo endpoints.\n *\n * Sub-clients:\n * - `search` - Web search with the optional Instant-Answer abstract\n * - `media` - Image, news and video search\n * - `reference` - Autocomplete, instant answers and supported regions\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.duckduckgo.search.search(\"privacy\");\n * const images = await client.duckduckgo.media.images(\"puppies\");\n * const news = await client.duckduckgo.media.news(\"elections\");\n * const videos = await client.duckduckgo.media.videos(\"lofi\");\n * const suggestions = await client.duckduckgo.reference.autocomplete(\"weath\");\n * const instant = await client.duckduckgo.reference.instant(\"python\");\n * const regions = await client.duckduckgo.reference.regions();\n * ```\n */\nexport class DuckDuckGoClient {\n /** Client for web search with the optional Instant-Answer abstract */\n readonly search: SearchClient;\n\n /** Client for image, news and video search */\n readonly media: MediaClient;\n\n /** Client for autocomplete, instant answers and supported regions */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new DuckDuckGo client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.media = new MediaClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Bing Search API client.\n *\n * Web search and search-box autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n BingAutocompleteParams,\n BingAutocompleteResponse,\n BingSearchParams,\n BingSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for Bing web search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.bing.search.search(\"coffee machine\");\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title} — ${r.url}`);\n * }\n *\n * const suggestions = await client.bing.search.autocomplete(\"coff\");\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search bing.com — the web SERP.\n *\n * @param query - Search keywords, e.g. `\"coffee machine\"`.\n * @param params - Optional market, count, offset and safe-search filter.\n * @returns A page of organic results, ads and related searches.\n */\n async search(query: string, params: BingSearchParams = {}): Promise<BingSearchResponse> {\n return this.client.request<BingSearchResponse>(\"/v1/bing/search\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n offset: params.offset,\n safe_search: params.safe_search,\n },\n });\n }\n\n /**\n * Bing search-box suggestions — the cheapest call in this API.\n *\n * @param query - Partial search term, e.g. `\"coff\"`.\n * @param params - Optional market.\n */\n async autocomplete(\n query: string,\n params: BingAutocompleteParams = {}\n ): Promise<BingAutocompleteResponse> {\n return this.client.request<BingAutocompleteResponse>(\"/v1/bing/autocomplete\", {\n params: {\n query,\n market: params.market,\n },\n });\n }\n}\n","/**\n * Bing Media API client.\n *\n * Image search and video search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n BingImagesParams,\n BingImagesResponse,\n BingVideosParams,\n BingVideosResponse,\n} from \"./types.js\";\n\n/**\n * Client for Bing image and video search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.bing.media.images(\"cats\");\n * for (const img of images.results) {\n * console.log(img.image_url, img.width, img.height);\n * }\n *\n * const videos = await client.bing.media.videos(\"cats\");\n * ```\n */\nexport class MediaClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Bing images.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market, count and safe-search filter.\n * @returns Full-size image URLs, thumbnails, pixel dimensions and the\n * source page each image came from.\n */\n async images(query: string, params: BingImagesParams = {}): Promise<BingImagesResponse> {\n return this.client.request<BingImagesResponse>(\"/v1/bing/images\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n safe_search: params.safe_search,\n },\n });\n }\n\n /**\n * Search Bing videos.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market, count and safe-search filter.\n * @returns Video URLs, thumbnails, duration, publisher and view counts.\n */\n async videos(query: string, params: BingVideosParams = {}): Promise<BingVideosResponse> {\n return this.client.request<BingVideosResponse>(\"/v1/bing/videos\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n safe_search: params.safe_search,\n },\n });\n }\n}\n","/**\n * Bing News API client.\n *\n * The Bing news vertical.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BingNewsParams, BingNewsResponse } from \"./types.js\";\n\n/**\n * Client for the Bing news endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const news = await client.bing.news.news(\"artificial intelligence\");\n * for (const article of news.results) {\n * console.log(article.source, article.published_at, article.title);\n * }\n * ```\n */\nexport class NewsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search the Bing news vertical.\n *\n * @param query - Search keywords, e.g. `\"artificial intelligence\"`.\n * @param params - Optional market and freshness (`\"day\"`, `\"week\"`, `\"month\"`).\n * @returns Articles carrying publisher, publish dates and real URLs.\n */\n async news(query: string, params: BingNewsParams = {}): Promise<BingNewsResponse> {\n return this.client.request<BingNewsResponse>(\"/v1/bing/news\", {\n params: {\n query,\n market: params.market,\n freshness: params.freshness,\n },\n });\n }\n}\n","/**\n * Bing Reference Data API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BingMarketsResponse } from \"./types.js\";\n\n/**\n * Client for Bing reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.bing.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Bing markets.\n *\n * @returns Every Bing market code, name and country.\n */\n async markets(): Promise<BingMarketsResponse> {\n return this.client.request<BingMarketsResponse>(\"/v1/bing/markets\");\n }\n}\n","/**\n * Bing API client.\n *\n * Provides access to all Bing API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MediaClient } from \"./media.js\";\nimport { NewsClient } from \"./news.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Bing API client with access to all Bing endpoints.\n *\n * Sub-clients:\n * - `search` - Web search and search-box autocomplete\n * - `media` - Image search and video search\n * - `news` - The news vertical\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.bing.search.search(\"coffee machine\");\n * const images = await client.bing.media.images(\"cats\");\n * const videos = await client.bing.media.videos(\"cats\");\n * const news = await client.bing.news.news(\"ai\", { freshness: \"day\" });\n * const suggestions = await client.bing.search.autocomplete(\"coff\");\n * const markets = await client.bing.reference.markets();\n * ```\n */\nexport class BingClient {\n /** Client for web search and search-box autocomplete */\n readonly search: SearchClient;\n\n /** Client for image search and video search */\n readonly media: MediaClient;\n\n /** Client for the news vertical */\n readonly news: NewsClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Bing client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.media = new MediaClient(client);\n this.news = new NewsClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Booking API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Booking API operations. (Generated from the OpenAPI spec.) */\nexport class BookingClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Search destinations. Generated from the OpenAPI spec; returns the raw response object. */\n async searchDestinations(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/booking/destinations\", { params });\n }\n\n /** Get property detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetail(\n countryCode: string,\n slug: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/booking/properties/${countryCode}/${slug}`, { params });\n }\n\n /** Get property reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyReviews(\n countryCode: string,\n slug: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/booking/properties/${countryCode}/${slug}/reviews`, { params });\n }\n\n /** Get room types and live rates. Generated from the OpenAPI spec; returns the raw response object. */\n async getRoomTypesAndLiveRates(\n countryCode: string,\n slug: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/booking/properties/${countryCode}/${slug}/rooms`, { params });\n }\n\n /** Search properties. Generated from the OpenAPI spec; returns the raw response object. */\n async searchProperties(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/booking/search\", { params });\n }\n}\n","/**\n * Baidu API client.\n *\n * Baidu endpoints: search (web SERP), news (news vertical), images (image\n * search) and autocomplete (search-box suggestions).\n *\n * Baidu is China's #1 search engine (~60% of the market). Every request is\n * served from ScrapeBadger's own exits — no China-based proxy of your own is\n * needed.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n BaiduSearchParams,\n BaiduNewsParams,\n BaiduImagesParams,\n BaiduSearchResponse,\n BaiduNewsResponse,\n BaiduImagesResponse,\n BaiduAutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Baidu API operations.\n *\n * Organic and news results carry the **real target URL** in `url` (decoded\n * from Baidu's `mu` attribute), not just the `baidu.com/link?url=` tracking\n * redirect that competing APIs return — `baidu_url` holds that redirect\n * separately.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Web search\n * const results = await client.baidu.search(\"咖啡机\", { num: 20, language: \"zh-cn\" });\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title} — ${r.url}`);\n * }\n *\n * // News, most recent first\n * const news = await client.baidu.news(\"人工智能\", { sort: \"time\" });\n *\n * // Images\n * const images = await client.baidu.images(\"猫\");\n *\n * // Search-box suggestions\n * const suggestions = await client.baidu.autocomplete(\"咖啡\");\n * ```\n */\nexport class BaiduClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search baidu.com — the web SERP.\n *\n * Costs 5 credits.\n *\n * @param query - Search keywords, e.g. `\"咖啡机\"` or `\"coffee machine\"` (required).\n * @param options - Optional parameters (page, num, language, timeFrom, timeTo).\n * @returns Search response with organic results and Baidu's related searches.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(query: string, options: BaiduSearchParams = {}): Promise<BaiduSearchResponse> {\n return this.client.request<BaiduSearchResponse>(\"/v1/baidu/search\", {\n params: {\n query,\n page: options.page,\n num: options.num,\n language: options.language,\n time_from: options.timeFrom,\n time_to: options.timeTo,\n },\n });\n }\n\n /**\n * Search the Baidu news vertical.\n *\n * Costs 5 credits.\n *\n * @param query - Search keywords, e.g. `\"人工智能\"` (required).\n * @param options - Optional parameters (page, sort).\n * @returns News response with articles carrying publisher, date and real URLs.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async news(query: string, options: BaiduNewsParams = {}): Promise<BaiduNewsResponse> {\n return this.client.request<BaiduNewsResponse>(\"/v1/baidu/news\", {\n params: { query, page: options.page, sort: options.sort },\n });\n }\n\n /**\n * Search Baidu images.\n *\n * Costs 5 credits.\n *\n * @param query - Search keywords, e.g. `\"猫\"` (required).\n * @param options - Optional parameters (page). Baidu serves 30 images per page.\n * @returns Images response with full-size image URLs, Baidu-hosted thumbnail\n * copies, pixel dimensions and the source page each image came from.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async images(query: string, options: BaiduImagesParams = {}): Promise<BaiduImagesResponse> {\n return this.client.request<BaiduImagesResponse>(\"/v1/baidu/images\", {\n params: { query, page: options.page },\n });\n }\n\n /**\n * Baidu search-box suggestions — the cheapest call in this API.\n *\n * Costs 1 credit.\n *\n * @param query - Partial search term, e.g. `\"咖啡\"` or `\"coff\"` (required).\n * @returns Autocomplete response with Baidu's suggestions for the term.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async autocomplete(query: string): Promise<BaiduAutocompleteResponse> {\n return this.client.request<BaiduAutocompleteResponse>(\"/v1/baidu/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Yahoo Search API client.\n *\n * Web search and search-box autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YahooAutocompleteParams,\n YahooAutocompleteResponse,\n YahooSearchParams,\n YahooSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for Yahoo web search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yahoo.search.search(\"coffee machine\");\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title} — ${r.url}`);\n * }\n *\n * const suggestions = await client.yahoo.search.autocomplete(\"coff\");\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search yahoo.com — the web SERP.\n *\n * Yahoo serves 7 organic results per page, so `offset` moves in steps of 7\n * (page 2 is `offset: 7`). There is no page-size parameter.\n *\n * @param query - Search keywords, e.g. `\"coffee machine\"`.\n * @param params - Optional market, offset and safe-search filter.\n * @returns A page of organic results, ads and related searches.\n */\n async search(query: string, params: YahooSearchParams = {}): Promise<YahooSearchResponse> {\n return this.client.request<YahooSearchResponse>(\"/v1/yahoo/search\", {\n params: {\n query,\n market: params.market,\n offset: params.offset,\n safe_search: params.safe_search,\n },\n });\n }\n\n /**\n * Yahoo search-box suggestions — the cheapest call in this API.\n *\n * @param query - Partial search term, e.g. `\"coff\"`.\n * @param params - Optional market.\n */\n async autocomplete(\n query: string,\n params: YahooAutocompleteParams = {}\n ): Promise<YahooAutocompleteResponse> {\n return this.client.request<YahooAutocompleteResponse>(\"/v1/yahoo/autocomplete\", {\n params: {\n query,\n market: params.market,\n },\n });\n }\n}\n","/**\n * Yahoo Media API client.\n *\n * Image search and video search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YahooImagesParams,\n YahooImagesResponse,\n YahooVideosParams,\n YahooVideosResponse,\n} from \"./types.js\";\n\n/**\n * Client for Yahoo image and video search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.yahoo.media.images(\"cats\");\n * for (const img of images.results) {\n * console.log(img.image_url, img.width, img.height);\n * }\n *\n * const videos = await client.yahoo.media.videos(\"cats\");\n * ```\n */\nexport class MediaClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Yahoo images.\n *\n * Yahoo renders ~60 tiles server-side with no native page-size parameter,\n * so `count` trims the list rather than paginating.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market and count.\n * @returns Full-size image URLs, thumbnails, pixel dimensions and the\n * source page each image came from.\n */\n async images(query: string, params: YahooImagesParams = {}): Promise<YahooImagesResponse> {\n return this.client.request<YahooImagesResponse>(\"/v1/yahoo/images\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n },\n });\n }\n\n /**\n * Search Yahoo videos.\n *\n * Like images, Yahoo has no native page-size parameter here, so `count`\n * trims the returned list.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market and count.\n * @returns Video URLs, thumbnails, duration, host platform and view counts.\n */\n async videos(query: string, params: YahooVideosParams = {}): Promise<YahooVideosResponse> {\n return this.client.request<YahooVideosResponse>(\"/v1/yahoo/videos\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n },\n });\n }\n}\n","/**\n * Yahoo News API client.\n *\n * The Yahoo news vertical.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YahooNewsParams, YahooNewsResponse } from \"./types.js\";\n\n/**\n * Client for the Yahoo news endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const news = await client.yahoo.news.news(\"artificial intelligence\");\n * for (const article of news.results) {\n * console.log(article.source, article.published, article.title);\n * }\n * ```\n */\nexport class NewsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search the Yahoo news vertical.\n *\n * @param query - Search keywords, e.g. `\"artificial intelligence\"`.\n * @param params - Optional market.\n * @returns Articles carrying publisher, syndication source and real URLs.\n * `published` is a relative age string (`\"26 minutes ago\"`) — Yahoo\n * renders no absolute date.\n */\n async news(query: string, params: YahooNewsParams = {}): Promise<YahooNewsResponse> {\n return this.client.request<YahooNewsResponse>(\"/v1/yahoo/news\", {\n params: {\n query,\n market: params.market,\n },\n });\n }\n}\n","/**\n * Yahoo Reference Data API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YahooMarketsResponse } from \"./types.js\";\n\n/**\n * Client for Yahoo reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.yahoo.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Yahoo markets.\n *\n * Yahoo Japan (`search.yahoo.co.jp`) is a separate engine and is not\n * covered by this API.\n *\n * @returns Every Yahoo market code, name, country and regional search host.\n */\n async markets(): Promise<YahooMarketsResponse> {\n return this.client.request<YahooMarketsResponse>(\"/v1/yahoo/markets\");\n }\n}\n","/**\n * Yahoo API client.\n *\n * Provides access to all Yahoo API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MediaClient } from \"./media.js\";\nimport { NewsClient } from \"./news.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Yahoo API client with access to all Yahoo endpoints.\n *\n * Sub-clients:\n * - `search` - Web search and search-box autocomplete\n * - `media` - Image search and video search\n * - `news` - The news vertical\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yahoo.search.search(\"coffee machine\");\n * const images = await client.yahoo.media.images(\"cats\");\n * const videos = await client.yahoo.media.videos(\"cats\");\n * const news = await client.yahoo.news.news(\"ai\");\n * const suggestions = await client.yahoo.search.autocomplete(\"coff\");\n * const markets = await client.yahoo.reference.markets();\n * ```\n */\nexport class YahooClient {\n /** Client for web search and search-box autocomplete */\n readonly search: SearchClient;\n\n /** Client for image search and video search */\n readonly media: MediaClient;\n\n /** Client for the news vertical */\n readonly news: NewsClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Yahoo client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.media = new MediaClient(client);\n this.news = new NewsClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Yandex Search API client.\n *\n * Web search — organic results, ads, sitelinks, inline media, related\n * searches, and pagination.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YandexSearchParams, YandexSearchResponse } from \"./types.js\";\n\n/**\n * Client for the Yandex web-search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yandex.search.search(\"python asyncio\", { domain: \"com\" });\n * for (const item of results.organic_results) {\n * console.log(`${item.position}. ${item.title} — ${item.url}`);\n * }\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search yandex.<domain>.\n *\n * @param query - Search keywords, e.g. `\"python asyncio\"`.\n * @param params - Optional domain, page, lr (region id) and lang.\n * @returns A page of web results with organic results, ads and pagination.\n */\n async search(query: string, params: YandexSearchParams = {}): Promise<YandexSearchResponse> {\n return this.client.request<YandexSearchResponse>(\"/v1/yandex/search\", {\n params: {\n query,\n domain: params.domain,\n page: params.page,\n lr: params.lr,\n lang: params.lang,\n },\n });\n }\n}\n","/**\n * Yandex Images API client.\n *\n * Forward image search and reverse-image (CBIR) search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YandexImagesParams,\n YandexImagesResponse,\n YandexReverseImageResponse,\n YandexReverseParams,\n} from \"./types.js\";\n\n/**\n * Client for the Yandex image search and reverse-image endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.yandex.images.search(\"golden retriever\");\n * const reverse = await client.yandex.images.reverse(\"https://example.com/photo.jpg\");\n * ```\n */\nexport class ImagesClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Yandex Images.\n *\n * @param query - Search keywords.\n * @param params - Optional domain and page.\n */\n async search(query: string, params: YandexImagesParams = {}): Promise<YandexImagesResponse> {\n return this.client.request<YandexImagesResponse>(\"/v1/yandex/images/search\", {\n params: {\n query,\n domain: params.domain,\n page: params.page,\n },\n });\n }\n\n /**\n * Reverse-image (CBIR) search for a given image URL.\n *\n * @param imageUrl - The publicly reachable URL of the query image.\n * @param params - Optional domain.\n */\n async reverse(\n imageUrl: string,\n params: YandexReverseParams = {}\n ): Promise<YandexReverseImageResponse> {\n return this.client.request<YandexReverseImageResponse>(\"/v1/yandex/images/reverse\", {\n params: {\n image_url: imageUrl,\n domain: params.domain,\n },\n });\n }\n}\n","/**\n * Yandex Reference API client.\n *\n * The list of supported Yandex markets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YandexMarketsResponse } from \"./types.js\";\n\n/**\n * Client for the Yandex markets endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.yandex.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (lr ${m.default_lr})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Yandex markets.\n */\n async markets(): Promise<YandexMarketsResponse> {\n return this.client.request<YandexMarketsResponse>(\"/v1/yandex/markets\");\n }\n}\n","/**\n * Yandex API client.\n *\n * Provides access to all Yandex API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ImagesClient } from \"./images.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Yandex API client with access to all Yandex endpoints.\n *\n * Sub-clients:\n * - `search` - Web search (organic + ads + sitelinks + inline media)\n * - `images` - Image search and reverse-image (CBIR) search\n * - `reference` - The supported-markets list\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yandex.search.search(\"privacy\");\n * const images = await client.yandex.images.search(\"puppies\");\n * const reverse = await client.yandex.images.reverse(\"https://example.com/photo.jpg\");\n * const markets = await client.yandex.reference.markets();\n * ```\n */\nexport class YandexClient {\n /** Client for web search (organic + ads + sitelinks + inline media) */\n readonly search: SearchClient;\n\n /** Client for image search and reverse-image (CBIR) search */\n readonly images: ImagesClient;\n\n /** Client for the supported-markets list */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Yandex client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.images = new ImagesClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * YouTube Search API client.\n *\n * Provides methods for full-matrix search and keyword autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeSearchParams,\n YoutubeAutocompleteParams,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.youtube.search.search({ query: \"lofi beats\" });\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title}`);\n * }\n *\n * const suggestions = await client.youtube.search.autocomplete(\"lofi\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search YouTube videos / channels / playlists with the full filter matrix.\n *\n * @param params - Search parameters including query, filters, and continuation.\n * @returns A page of search results with chips, refinements, and a continuation token.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: YoutubeSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/youtube/search\", {\n params: {\n query: params.query,\n type: params.type,\n sort_by: params.sort_by,\n upload_date: params.upload_date,\n duration: params.duration,\n features: params.features,\n gl: params.gl,\n hl: params.hl,\n continuation: params.continuation,\n },\n });\n }\n\n /**\n * Get YouTube keyword autocomplete suggestions.\n *\n * @param query - Partial search query prefix.\n * @param options - Optional region parameters (gl, hl).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: YoutubeAutocompleteParams = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/youtube/autocomplete\", {\n params: { query, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Videos API client.\n *\n * Provides methods for video detail, related videos, comments, replies,\n * transcript, captions, stream formats, live chat, batch detail, and oEmbed.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeVideoParams,\n YoutubeRelatedParams,\n YoutubeCommentsParams,\n YoutubeRepliesParams,\n YoutubeTranscriptParams,\n YoutubeCaptionsParams,\n YoutubeStreamsParams,\n YoutubeLiveChatParams,\n YoutubeBatchParams,\n YoutubeOEmbedParams,\n Video,\n RelatedResponse,\n CommentsResponse,\n RepliesResponse,\n Transcript,\n CaptionsResponse,\n StreamingData,\n LiveChatResponse,\n BatchResponse,\n OEmbed,\n} from \"./types.js\";\n\n/**\n * Client for YouTube video endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const video = await client.youtube.videos.get(\"dQw4w9WgXcQ\");\n * console.log(`${video.title} — ${video.view_count} views`);\n *\n * const comments = await client.youtube.videos.comments(\"dQw4w9WgXcQ\");\n * const transcript = await client.youtube.videos.transcript(\"dQw4w9WgXcQ\");\n * ```\n */\nexport class VideosClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single video's full detail (merged `player` + `next`).\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional region parameters (gl, hl).\n * @returns Full video detail including engagement, channel, chapters, and heatmap.\n * @throws NotFoundError - If the video doesn't exist or is unavailable.\n */\n async get(videoId: string, options: YoutubeVideoParams = {}): Promise<Video> {\n return this.client.request<Video>(`/v1/youtube/videos/${videoId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get related / recommended videos for a video.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional region parameters and a continuation token.\n * @returns Related results with a continuation token.\n */\n async related(videoId: string, options: YoutubeRelatedParams = {}): Promise<RelatedResponse> {\n return this.client.request<RelatedResponse>(`/v1/youtube/videos/${videoId}/related`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of top-level comments for a video.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional sort order, continuation token, and region.\n * @returns A page of comments with sorting tokens and a continuation token.\n */\n async comments(videoId: string, options: YoutubeCommentsParams = {}): Promise<CommentsResponse> {\n return this.client.request<CommentsResponse>(`/v1/youtube/videos/${videoId}/comments`, {\n params: {\n sort_by: options.sort_by,\n continuation: options.continuation,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Get a page of replies to a single comment.\n *\n * @param videoId - The YouTube video id.\n * @param commentId - The comment id whose replies to fetch.\n * @param options - The required replies continuation token plus region.\n * @returns A page of replies with a continuation token.\n */\n async replies(\n videoId: string,\n commentId: string,\n options: YoutubeRepliesParams\n ): Promise<RepliesResponse> {\n return this.client.request<RepliesResponse>(\n `/v1/youtube/videos/${videoId}/comments/${commentId}/replies`,\n { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }\n );\n }\n\n /**\n * Get a video's transcript in the selected language.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional language and region parameters.\n * @returns The transcript with timed segments and full text.\n */\n async transcript(videoId: string, options: YoutubeTranscriptParams = {}): Promise<Transcript> {\n return this.client.request<Transcript>(`/v1/youtube/videos/${videoId}/transcript`, {\n params: { language: options.language, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * List a video's available caption tracks.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional region parameters.\n * @returns The available caption tracks and translation languages.\n */\n async captions(videoId: string, options: YoutubeCaptionsParams = {}): Promise<CaptionsResponse> {\n return this.client.request<CaptionsResponse>(`/v1/youtube/videos/${videoId}/captions`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a video's stream / format metadata (best-effort; URLs may be PO-token gated).\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional content region and player client.\n * @returns Streaming metadata with muxed and adaptive formats.\n */\n async streams(videoId: string, options: YoutubeStreamsParams = {}): Promise<StreamingData> {\n return this.client.request<StreamingData>(`/v1/youtube/videos/${videoId}/streams`, {\n params: { gl: options.gl, client: options.client },\n });\n }\n\n /**\n * Get a page of live-chat (or chat-replay) messages for a video.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional continuation token, replay flag, and region.\n * @returns A page of live-chat messages with a continuation token.\n */\n async liveChat(videoId: string, options: YoutubeLiveChatParams = {}): Promise<LiveChatResponse> {\n return this.client.request<LiveChatResponse>(`/v1/youtube/videos/${videoId}/live_chat`, {\n params: {\n continuation: options.continuation,\n replay: options.replay,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Fetch detail for up to 50 videos concurrently.\n *\n * @param params - The video ids (≤50) plus optional region parameters.\n * @returns Successfully fetched videos plus per-id errors.\n */\n async batch(params: YoutubeBatchParams): Promise<BatchResponse> {\n return this.client.request<BatchResponse>(\"/v1/youtube/videos/batch\", {\n method: \"POST\",\n body: { video_ids: params.video_ids, gl: params.gl, hl: params.hl },\n });\n }\n\n /**\n * Get public oEmbed metadata for a YouTube URL (no proxy/InnerTube needed).\n *\n * @param url - A YouTube video/playlist/channel URL.\n * @returns The oEmbed metadata.\n */\n async oembed(url: string): Promise<OEmbed>;\n async oembed(params: YoutubeOEmbedParams): Promise<OEmbed>;\n async oembed(arg: string | YoutubeOEmbedParams): Promise<OEmbed> {\n const url = typeof arg === \"string\" ? arg : arg.url;\n return this.client.request<OEmbed>(\"/v1/youtube/oembed\", { params: { url } });\n }\n}\n","/**\n * YouTube Channels API client.\n *\n * Provides methods for channel detail, tab feeds (videos/shorts/streams/\n * playlists/community), about, subscriber count, in-channel search, and resolve.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeChannelParams,\n YoutubeChannelTabParams,\n YoutubeChannelSearchParams,\n YoutubeResolveParams,\n Channel,\n ChannelAbout,\n ChannelTabResponse,\n CommunityResponse,\n SubscriberCount,\n SearchResponse,\n ResolveResult,\n} from \"./types.js\";\n\n/**\n * Client for YouTube channel endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const channel = await client.youtube.channels.get(\"@MrBeast\");\n * console.log(`${channel.title} — ${channel.number_of_subscribers} subs`);\n *\n * const videos = await client.youtube.channels.videos(\"@MrBeast\");\n * const id = await client.youtube.channels.resolve({ handle: \"@MrBeast\" });\n * ```\n */\nexport class ChannelsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full channel detail (accepts a UC id, @handle, or custom URL).\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional region parameters.\n * @returns Full channel detail.\n * @throws NotFoundError - If the channel doesn't exist.\n */\n async get(channelId: string, options: YoutubeChannelParams = {}): Promise<Channel> {\n return this.client.request<Channel>(`/v1/youtube/channels/${channelId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's long-form videos.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of video cards with a continuation token.\n */\n async videos(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/videos`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's Shorts.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of Shorts cards with a continuation token.\n */\n async shorts(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/shorts`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's live streams.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of stream cards with a continuation token.\n */\n async streams(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/streams`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's playlists.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of playlist cards with a continuation token.\n */\n async playlists(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/playlists`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's community posts.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of community posts with a continuation token.\n */\n async community(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<CommunityResponse> {\n return this.client.request<CommunityResponse>(`/v1/youtube/channels/${channelId}/community`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a channel's lightweight about payload.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional region parameters.\n * @returns The channel about payload.\n */\n async about(channelId: string, options: YoutubeChannelParams = {}): Promise<ChannelAbout> {\n return this.client.request<ChannelAbout>(`/v1/youtube/channels/${channelId}/about`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a channel's subscriber count (fast).\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional region parameters.\n * @returns The subscriber count.\n */\n async subscriberCount(\n channelId: string,\n options: YoutubeChannelParams = {}\n ): Promise<SubscriberCount> {\n return this.client.request<SubscriberCount>(\n `/v1/youtube/channels/${channelId}/subscriber_count`,\n { params: { gl: options.gl, hl: options.hl } }\n );\n }\n\n /**\n * Search within a single channel.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - The required query plus optional continuation and region.\n * @returns A page of search results scoped to the channel.\n */\n async search(channelId: string, options: YoutubeChannelSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(`/v1/youtube/channels/${channelId}/search`, {\n params: {\n query: options.query,\n continuation: options.continuation,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Resolve a @handle or URL to canonical YouTube ids.\n *\n * @param options - A `handle` or `url` (one is required) plus optional region.\n * @returns The resolved channel / video / playlist ids.\n */\n async resolve(options: YoutubeResolveParams = {}): Promise<ResolveResult> {\n return this.client.request<ResolveResult>(\"/v1/youtube/channels/resolve\", {\n params: { handle: options.handle, url: options.url, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Playlists API client.\n *\n * Provides methods for playlist detail, playlist items pagination, and mixes.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubePlaylistParams,\n YoutubePlaylistItemsParams,\n Playlist,\n PlaylistItemsResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube playlist and mix endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const playlist = await client.youtube.playlists.get(\"PL1234567890\");\n * console.log(`${playlist.title} — ${playlist.video_count} videos`);\n *\n * const page = await client.youtube.playlists.items(\"PL1234567890\", {\n * continuation: playlist.continuation ?? undefined,\n * });\n *\n * const mix = await client.youtube.playlists.mix(\"RDQM1234567890\");\n * ```\n */\nexport class PlaylistsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full playlist detail plus the first page of items.\n *\n * @param playlistId - The playlist id.\n * @param options - Optional region parameters.\n * @returns Full playlist detail with a continuation token.\n * @throws NotFoundError - If the playlist doesn't exist.\n */\n async get(playlistId: string, options: YoutubePlaylistParams = {}): Promise<Playlist> {\n return this.client.request<Playlist>(`/v1/youtube/playlists/${playlistId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a continuation page of a playlist's items.\n *\n * @param playlistId - The playlist id.\n * @param options - Optional continuation token and region.\n * @returns A page of playlist items with a continuation token.\n */\n async items(\n playlistId: string,\n options: YoutubePlaylistItemsParams = {}\n ): Promise<PlaylistItemsResponse> {\n return this.client.request<PlaylistItemsResponse>(`/v1/youtube/playlists/${playlistId}/items`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Resolve an auto-generated mix / radio (RD…) queue.\n *\n * @param mixId - The mix / radio playlist id.\n * @param options - Optional region parameters.\n * @returns The mix as a playlist queue.\n */\n async mix(mixId: string, options: YoutubePlaylistParams = {}): Promise<Playlist> {\n return this.client.request<Playlist>(`/v1/youtube/mixes/${mixId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Community API client.\n *\n * Provides methods for community post detail and post comments.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubePostParams,\n YoutubePostCommentsParams,\n CommunityPost,\n CommentsResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube community post endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const post = await client.youtube.community.get(\"Ugkx1234567890\");\n * console.log(post.text);\n *\n * const comments = await client.youtube.community.comments(\"Ugkx1234567890\");\n * ```\n */\nexport class CommunityClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single community post's detail.\n *\n * @param postId - The community post id.\n * @param options - Optional region parameters.\n * @returns The community post.\n * @throws NotFoundError - If the post doesn't exist.\n */\n async get(postId: string, options: YoutubePostParams = {}): Promise<CommunityPost> {\n return this.client.request<CommunityPost>(`/v1/youtube/posts/${postId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of comments on a community post.\n *\n * @param postId - The community post id.\n * @param options - Optional continuation token and region.\n * @returns A page of comments with a continuation token.\n */\n async comments(\n postId: string,\n options: YoutubePostCommentsParams = {}\n ): Promise<CommentsResponse> {\n return this.client.request<CommentsResponse>(`/v1/youtube/posts/${postId}/comments`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Shorts API client.\n *\n * Provides methods for a single Short's detail and Shorts attributed to a sound.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeShortParams,\n YoutubeShortsBySoundParams,\n Short,\n ChannelTabResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube Shorts endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const short = await client.youtube.shorts.get(\"abc123XYZ\");\n * console.log(`${short.title} — ${short.sound_title}`);\n *\n * const bySound = await client.youtube.shorts.bySound(\"sound-id-123\");\n * ```\n */\nexport class ShortsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single Short's detail.\n *\n * @param videoId - The Short's video id.\n * @param options - Optional region parameters.\n * @returns The Short detail.\n * @throws NotFoundError - If the Short doesn't exist or is unavailable.\n */\n async get(videoId: string, options: YoutubeShortParams = {}): Promise<Short> {\n return this.client.request<Short>(`/v1/youtube/shorts/${videoId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of Shorts attributed to a given sound / music id (best-effort).\n *\n * @param soundId - The sound / music id.\n * @param options - Optional continuation token and region.\n * @returns A page of Shorts cards with a continuation token.\n */\n async bySound(\n soundId: string,\n options: YoutubeShortsBySoundParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/shorts/by_sound/${soundId}`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Trending API client.\n *\n * Provides methods for the trending feed, trending shorts, hashtag feed, and\n * the guest home feed.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeTrendingParams,\n YoutubeTrendingShortsParams,\n YoutubeHashtagParams,\n YoutubeHomeParams,\n TrendingResponse,\n HashtagResponse,\n HomeResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube trending, hashtag, and home-feed endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const trending = await client.youtube.trending.get({ gl: \"US\", type: \"music\" });\n * const shorts = await client.youtube.trending.shorts({ gl: \"US\" });\n * const tagged = await client.youtube.trending.hashtag(\"minecraft\");\n * const home = await client.youtube.trending.home();\n * ```\n */\nexport class TrendingClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a page of the trending feed.\n *\n * @param options - Optional feed type, continuation token, and region.\n * @returns A page of trending items with a continuation token.\n */\n async get(options: YoutubeTrendingParams = {}): Promise<TrendingResponse> {\n return this.client.request<TrendingResponse>(\"/v1/youtube/trending\", {\n params: {\n type: options.type,\n continuation: options.continuation,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Get a page of trending Shorts.\n *\n * @param options - Optional continuation token and region.\n * @returns A page of trending Shorts with a continuation token.\n */\n async shorts(options: YoutubeTrendingShortsParams = {}): Promise<TrendingResponse> {\n return this.client.request<TrendingResponse>(\"/v1/youtube/trending/shorts\", {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of videos under a hashtag.\n *\n * @param tag - The hashtag (with or without a leading `#`).\n * @param options - Optional continuation token and region.\n * @returns A page of hashtag results with a continuation token.\n */\n async hashtag(tag: string, options: YoutubeHashtagParams = {}): Promise<HashtagResponse> {\n return this.client.request<HashtagResponse>(`/v1/youtube/hashtags/${tag}`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of the guest home / recommendations feed (best-effort).\n *\n * @param options - Optional continuation token and region.\n * @returns A page of home-feed results with a continuation token.\n */\n async home(options: YoutubeHomeParams = {}): Promise<HomeResponse> {\n return this.client.request<HomeResponse>(\"/v1/youtube/home\", {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Music API client.\n *\n * Provides a method for searching YouTube Music (WEB_REMIX client).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YoutubeMusicSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for YouTube Music endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.youtube.music.search({ query: \"daft punk\" });\n * for (const r of results.results) {\n * console.log(r.title);\n * }\n * ```\n */\nexport class MusicClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search YouTube Music (songs / albums / artists / playlists).\n *\n * @param params - The required query plus optional continuation and region.\n * @returns A page of search results with a continuation token.\n */\n async search(params: YoutubeMusicSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/youtube/music/search\", {\n params: {\n query: params.query,\n continuation: params.continuation,\n gl: params.gl,\n hl: params.hl,\n },\n });\n }\n}\n","/**\n * YouTube Reference Data API client.\n *\n * Provides methods for the static categories, languages, regions, and the\n * geo-targeted scraper market list (all zero-credit).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeCategoriesParams,\n CategoriesResponse,\n LanguagesResponse,\n RegionsResponse,\n MarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube reference data endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const categories = await client.youtube.reference.categories({ gl: \"US\" });\n * const languages = await client.youtube.reference.languages();\n * const regions = await client.youtube.reference.regions();\n * const markets = await client.youtube.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List YouTube video categories (Data-API parity).\n *\n * @param options - Optional content region (default: \"US\").\n * @returns The categories for the region.\n */\n async categories(options: YoutubeCategoriesParams = {}): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/youtube/categories\", {\n params: { gl: options.gl },\n });\n }\n\n /**\n * List supported UI languages (hl codes).\n *\n * @returns The supported UI languages.\n */\n async languages(): Promise<LanguagesResponse> {\n return this.client.request<LanguagesResponse>(\"/v1/youtube/languages\");\n }\n\n /**\n * List supported content regions (gl codes).\n *\n * @returns The supported content regions.\n */\n async regions(): Promise<RegionsResponse> {\n return this.client.request<RegionsResponse>(\"/v1/youtube/regions\");\n }\n\n /**\n * List the regions the scraper explicitly geo-targets (proxy-pinned).\n *\n * @returns The supported scraper markets.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/youtube/markets\");\n }\n}\n","/**\n * YouTube API client.\n *\n * Provides access to all YouTube API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { VideosClient } from \"./videos.js\";\nimport { ChannelsClient } from \"./channels.js\";\nimport { PlaylistsClient } from \"./playlists.js\";\nimport { CommunityClient } from \"./community.js\";\nimport { ShortsClient } from \"./shorts.js\";\nimport { TrendingClient } from \"./trending.js\";\nimport { MusicClient } from \"./music.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * YouTube API client with access to all YouTube endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Full-matrix search and keyword autocomplete\n * - `videos` - Detail, related, comments, replies, transcript, captions, streams, live chat, batch, oEmbed\n * - `channels` - Detail, tab feeds, about, subscriber count, in-channel search, resolve\n * - `playlists` - Playlist detail, items pagination, mixes\n * - `community` - Community post detail and post comments\n * - `shorts` - Single Short detail and Shorts by sound\n * - `trending` - Trending feed, trending shorts, hashtag feed, home feed\n * - `music` - YouTube Music search\n * - `reference` - Reference data (categories, languages, regions, markets)\n *\n * All list endpoints paginate via an opaque `continuation` token (no page\n * numbers). Region is controlled by `gl` (content region) + `hl` (UI language).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search\n * const results = await client.youtube.search.search({ query: \"lofi beats\" });\n *\n * // Video detail\n * const video = await client.youtube.videos.get(\"dQw4w9WgXcQ\");\n *\n * // Channel detail (accepts a UC id, @handle, or custom URL)\n * const channel = await client.youtube.channels.get(\"@MrBeast\");\n *\n * // Playlist items\n * const playlist = await client.youtube.playlists.get(\"PL1234567890\");\n *\n * // Trending\n * const trending = await client.youtube.trending.get({ gl: \"US\" });\n *\n * // Reference data\n * const markets = await client.youtube.reference.markets();\n * ```\n */\nexport class YoutubeClient {\n /** Client for full-matrix search and keyword autocomplete */\n readonly search: SearchClient;\n\n /** Client for video detail, comments, transcript, captions, streams, live chat, batch, and oEmbed */\n readonly videos: VideosClient;\n\n /** Client for channel detail, tab feeds, about, subscriber count, search, and resolve */\n readonly channels: ChannelsClient;\n\n /** Client for playlist detail, items pagination, and mixes */\n readonly playlists: PlaylistsClient;\n\n /** Client for community post detail and post comments */\n readonly community: CommunityClient;\n\n /** Client for single-Short detail and Shorts by sound */\n readonly shorts: ShortsClient;\n\n /** Client for the trending feed, trending shorts, hashtag feed, and home feed */\n readonly trending: TrendingClient;\n\n /** Client for YouTube Music search */\n readonly music: MusicClient;\n\n /** Client for reference data (categories, languages, regions, markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new YouTube client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.videos = new VideosClient(client);\n this.channels = new ChannelsClient(client);\n this.playlists = new PlaylistsClient(client);\n this.community = new CommunityClient(client);\n this.shorts = new ShortsClient(client);\n this.trending = new TrendingClient(client);\n this.music = new MusicClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Realtor Search API client.\n *\n * Provides methods for property search and location autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n RealtorSearchOptions,\n RealtorAutocompleteOptions,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for realtor search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.realtor.search.search(\"Austin, TX\");\n * for (const p of results.results) {\n * console.log(`${p.address?.line} — ${p.list_price_formatted}`);\n * }\n *\n * const suggestions = await client.realtor.search.autocomplete(\"Miami\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search a market for properties.\n *\n * @param location - Freetext location (\"Austin, TX\" / ZIP / \"Toronto, ON\").\n * Required unless a CA bounding box is provided.\n * @param options - Filters, sorting, and pagination.\n * @returns Search results with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(location?: string, options: RealtorSearchOptions = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/realtor/search\", {\n params: {\n location,\n market: options.market,\n status: options.status,\n price_min: options.priceMin,\n price_max: options.priceMax,\n beds_min: options.bedsMin,\n baths_min: options.bathsMin,\n sqft_min: options.sqftMin,\n sqft_max: options.sqftMax,\n property_type: options.propertyType,\n sort: options.sort,\n page: options.page,\n limit: options.limit,\n lat_min: options.latMin,\n lat_max: options.latMax,\n lng_min: options.lngMin,\n lng_max: options.lngMax,\n },\n });\n }\n\n /**\n * Get location autocomplete suggestions.\n *\n * @param query - Partial location query.\n * @param options - Optional parameters (market, limit).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: RealtorAutocompleteOptions = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/realtor/autocomplete\", {\n params: { query, market: options.market, limit: options.limit },\n });\n }\n}\n","/**\n * Realtor Properties API client.\n *\n * Provides a method for fetching full property detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { RealtorPropertyOptions, PropertyDetail } from \"./types.js\";\n\n/**\n * Client for the realtor property detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.realtor.properties.getProperty(\"1234567890\");\n * console.log(detail.address?.line, detail.list_price);\n * ```\n */\nexport class PropertiesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single property's full detail.\n *\n * @param propertyId - The property id.\n * @param options - Optional parameters (market).\n * @returns Property detail including details, amenities, and history.\n * @throws NotFoundError - If the property doesn't exist.\n */\n async getProperty(\n propertyId: string,\n options: RealtorPropertyOptions = {}\n ): Promise<PropertyDetail> {\n return this.client.request<PropertyDetail>(`/v1/realtor/properties/${propertyId}`, {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Realtor Reference Data API client.\n *\n * Provides a method for fetching the static market list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse } from \"./types.js\";\n\n/**\n * Client for realtor reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.realtor.reference.listMarkets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported realtor markets.\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/realtor/markets\");\n }\n}\n","/**\n * Realtor API client.\n *\n * Provides access to all Realtor API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { PropertiesClient } from \"./properties.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Realtor API client with access to all Realtor endpoints.\n *\n * Unified real-estate API over realtor.com (US) + realtor.ca (Canada).\n *\n * Provides sub-clients for different resource types:\n * - `search` - Property search and location autocomplete\n * - `properties` - Full property detail\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search properties\n * const results = await client.realtor.search.search(\"Austin, TX\");\n *\n * // Location autocomplete\n * const suggestions = await client.realtor.search.autocomplete(\"Miami\");\n *\n * // Get property detail\n * const detail = await client.realtor.properties.getProperty(\"1234567890\");\n *\n * // Reference data\n * const markets = await client.realtor.reference.listMarkets();\n * ```\n */\nexport class RealtorClient {\n /** Client for property search and location autocomplete */\n readonly search: SearchClient;\n\n /** Client for full property detail */\n readonly properties: PropertiesClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Realtor client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.properties = new PropertiesClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Leboncoin Search API client.\n *\n * Provides ad search across the single France marketplace, scoped by\n * category, geography, price, seller type, and ad type.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { LeboncoinSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for the Leboncoin search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.leboncoin.search.search({ text: \"velo\" });\n * for (const ad of results.ads) {\n * console.log(`${ad.subject} — ${ad.price_eur} EUR`);\n * }\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Leboncoin classified ads.\n *\n * France is a single market; scope results with `region_id` /\n * `department_id` / `city` (DOM-TOM are region values).\n *\n * @param params - Search parameters including text, filters, and pagination.\n * @returns Search results with ads, totals, and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: LeboncoinSearchParams = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/leboncoin/search\", {\n params: {\n text: params.text,\n category: params.category,\n region_id: params.region_id,\n department_id: params.department_id,\n city: params.city,\n zipcode: params.zipcode,\n price_min: params.price_min,\n price_max: params.price_max,\n owner_type: params.owner_type,\n ad_type: params.ad_type,\n sort: params.sort,\n page: params.page,\n limit: params.limit,\n },\n });\n }\n}\n","/**\n * Leboncoin Ads API client.\n *\n * Provides methods for fetching a single ad's detail and the ads Leboncoin\n * surfaces as similar to it.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { LeboncoinSimilarParams, AdResponse, SimilarResponse } from \"./types.js\";\n\n/**\n * Client for Leboncoin ad endpoints (detail, similar).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.leboncoin.ads.get(2934857123);\n * console.log(detail.ad.subject);\n *\n * const similar = await client.leboncoin.ads.similar(2934857123);\n * console.log(`${similar.ads.length} similar ads`);\n * ```\n */\nexport class AdsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single Leboncoin ad's full detail.\n *\n * @param listId - The Leboncoin ad list id.\n * @returns Ad detail response.\n * @throws NotFoundError - If the ad doesn't exist.\n */\n async get(listId: number | string): Promise<AdResponse> {\n return this.client.request<AdResponse>(`/v1/leboncoin/ads/${listId}`);\n }\n\n /**\n * Get the ads Leboncoin surfaces as similar to a given ad.\n *\n * @param listId - The Leboncoin ad list id.\n * @param options - Optional parameters (limit).\n * @returns Similar-ads response.\n */\n async similar(\n listId: number | string,\n options: LeboncoinSimilarParams = {}\n ): Promise<SimilarResponse> {\n return this.client.request<SimilarResponse>(`/v1/leboncoin/ads/${listId}/similar`, {\n params: { limit: options.limit },\n });\n }\n}\n","/**\n * Leboncoin Sellers API client.\n *\n * Provides methods for a seller's public profile and their active listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n LeboncoinSellerListingsParams,\n SellerResponse,\n SellerListingsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Leboncoin seller endpoints (profile, listings).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.leboncoin.sellers.get(\"a1b2c3d4-...\");\n * console.log(profile.seller.name);\n *\n * const listings = await client.leboncoin.sellers.listings(\"a1b2c3d4-...\");\n * console.log(`${listings.total} ads`);\n * ```\n */\nexport class SellersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a Leboncoin seller's public profile.\n *\n * @param userId - The seller user id.\n * @returns Seller profile response.\n * @throws NotFoundError - If the seller doesn't exist.\n */\n async get(userId: string): Promise<SellerResponse> {\n return this.client.request<SellerResponse>(`/v1/leboncoin/sellers/${userId}`);\n }\n\n /**\n * List a Leboncoin seller's active ads.\n *\n * @param userId - The seller user id.\n * @param options - Optional parameters (page, limit).\n * @returns Seller listings response with ads and pagination.\n */\n async listings(\n userId: string,\n options: LeboncoinSellerListingsParams = {}\n ): Promise<SellerListingsResponse> {\n return this.client.request<SellerListingsResponse>(`/v1/leboncoin/sellers/${userId}/listings`, {\n params: { page: options.page, limit: options.limit },\n });\n }\n}\n","/**\n * Leboncoin Reference Data API client.\n *\n * Provides the static category / region / department lists, the market list,\n * and location autocomplete for building search filters.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n LeboncoinDepartmentsParams,\n CategoriesResponse,\n RegionsResponse,\n DepartmentsResponse,\n LocationSearchResponse,\n MarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Leboncoin reference endpoints (categories, regions, departments,\n * location autocomplete, markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const { categories } = await client.leboncoin.reference.categories();\n * const { regions } = await client.leboncoin.reference.regions();\n * const { departments } = await client.leboncoin.reference.departments({ region_id: \"12\" });\n * const { suggestions } = await client.leboncoin.reference.locations(\"Paris\");\n * const { markets } = await client.leboncoin.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List all Leboncoin categories.\n *\n * @returns Categories response.\n */\n async categories(): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/leboncoin/categories\");\n }\n\n /**\n * List all Leboncoin regions.\n *\n * @returns Regions response.\n */\n async regions(): Promise<RegionsResponse> {\n return this.client.request<RegionsResponse>(\"/v1/leboncoin/regions\");\n }\n\n /**\n * List Leboncoin departments, optionally filtered by region.\n *\n * @param options - Optional parameters (region_id).\n * @returns Departments response.\n */\n async departments(options: LeboncoinDepartmentsParams = {}): Promise<DepartmentsResponse> {\n return this.client.request<DepartmentsResponse>(\"/v1/leboncoin/departments\", {\n params: { region_id: options.region_id },\n });\n }\n\n /**\n * Resolve a place name to Leboncoin location ids (for building filters).\n *\n * @param query - Place name to resolve.\n * @returns Location search response with suggestions.\n */\n async locations(query: string): Promise<LocationSearchResponse> {\n return this.client.request<LocationSearchResponse>(\"/v1/leboncoin/locations/search\", {\n params: { q: query },\n });\n }\n\n /**\n * List the supported Leboncoin markets (France is the single market).\n *\n * @returns Markets response.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/leboncoin/markets\");\n }\n}\n","/**\n * Leboncoin API client.\n *\n * Provides access to all Leboncoin API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { AdsClient } from \"./ads.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Leboncoin API client with access to all Leboncoin endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Ad search across the single France marketplace\n * - `ads` - Ad detail and similar ads\n * - `sellers` - Seller profile and their active listings\n * - `reference` - Reference data (categories, regions, departments,\n * location autocomplete, markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search ads\n * const results = await client.leboncoin.search.search({ text: \"velo\" });\n *\n * // Get an ad\n * const ad = await client.leboncoin.ads.get(2934857123);\n *\n * // Similar ads\n * const similar = await client.leboncoin.ads.similar(2934857123);\n *\n * // Seller profile + listings\n * const seller = await client.leboncoin.sellers.get(\"a1b2c3d4-...\");\n * const listings = await client.leboncoin.sellers.listings(\"a1b2c3d4-...\");\n *\n * // Reference data\n * const { categories } = await client.leboncoin.reference.categories();\n * ```\n */\nexport class LeboncoinClient {\n /** Client for ad search */\n readonly search: SearchClient;\n\n /** Client for ad detail and similar ads */\n readonly ads: AdsClient;\n\n /** Client for seller profile and listings */\n readonly sellers: SellersClient;\n\n /** Client for reference data (categories, regions, departments, locations, markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Leboncoin client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.ads = new AdsClient(client);\n this.sellers = new SellersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Zillow Search API client.\n *\n * Provides methods for property search and location autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ZillowSearchOptions, SearchResponse, AutocompleteResponse } from \"./types.js\";\n\n/**\n * Client for zillow search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.zillow.search.search(\"Austin, TX\", { bedsMin: 3 });\n * for (const l of results.results) {\n * console.log(`${l.address} — ${l.price_raw}`);\n * }\n *\n * const suggestions = await client.zillow.search.autocomplete(\"Miami\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Zillow for properties.\n *\n * Beat the ~820-result (20-page) cap by re-issuing the search over\n * subdivided `north/south/east/west` map-bound boxes returned in\n * `map_bounds`.\n *\n * @param location - City/state, ZIP, address, or neighborhood (\"Austin, TX\").\n * @param options - Filters, sorting, pagination, and map bounds.\n * @returns Search results with pagination and map metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(location: string, options: ZillowSearchOptions = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/zillow/search\", {\n params: {\n location,\n status: options.status,\n page: options.page,\n sort: options.sort,\n price_min: options.priceMin,\n price_max: options.priceMax,\n beds_min: options.bedsMin,\n baths_min: options.bathsMin,\n home_type: options.homeType,\n sqft_min: options.sqftMin,\n sqft_max: options.sqftMax,\n lot_min: options.lotMin,\n lot_max: options.lotMax,\n year_built_min: options.yearBuiltMin,\n year_built_max: options.yearBuiltMax,\n hoa_max: options.hoaMax,\n keywords: options.keywords,\n days_on: options.daysOn,\n north: options.north,\n south: options.south,\n east: options.east,\n west: options.west,\n },\n });\n }\n\n /**\n * Resolve a search term to Zillow regions/addresses (regionId, lat/lng).\n *\n * @param query - Partial location — city, ZIP, address, or neighborhood.\n * @returns Autocomplete suggestions.\n */\n async autocomplete(query: string): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/zillow/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Zillow Properties API client.\n *\n * Provides a method for fetching full property detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { PropertyResponse } from \"./types.js\";\n\n/**\n * Client for the zillow property detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const { property } = await client.zillow.properties.getProperty(\"2078029085\");\n * console.log(property.street_address, property.price);\n * ```\n */\nexport class PropertiesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single Zillow property's full detail by its zpid.\n *\n * Returns price/valuation, specs, resoFacts (home_facts), price & tax\n * history, schools, listing agent, mortgage rates and photos.\n *\n * @param zpid - The Zillow property id.\n * @returns Property detail wrapped in `{ property }`.\n * @throws NotFoundError - If the property doesn't exist.\n */\n async getProperty(zpid: string): Promise<PropertyResponse> {\n return this.client.request<PropertyResponse>(`/v1/zillow/property/${zpid}`);\n }\n}\n","/**\n * Zillow Agent API client.\n *\n * Provides a method for fetching an agent profile and their listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ZillowAgentOptions, AgentResponse } from \"./types.js\";\n\n/**\n * Client for the zillow agent profile endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const { agent } = await client.zillow.agent.getAgent({ username: \"some-agent\" });\n * console.log(agent.name, agent.review_count, agent.listings.length);\n * ```\n */\nexport class AgentClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a Zillow real-estate professional's profile and their active listings.\n *\n * Provide either a `username` (screen name) or a full `url`.\n *\n * @param options - The agent `username` or profile `url`.\n * @returns Agent profile wrapped in `{ agent }`.\n * @throws NotFoundError - If the agent doesn't exist.\n * @throws ValidationError - If neither username nor url is provided.\n */\n async getAgent(options: ZillowAgentOptions = {}): Promise<AgentResponse> {\n return this.client.request<AgentResponse>(\"/v1/zillow/agent\", {\n params: { username: options.username, url: options.url },\n });\n }\n}\n","/**\n * Zillow Reference Data API client.\n *\n * Provides a method for fetching the coverage market list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse } from \"./types.js\";\n\n/**\n * Client for zillow reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.zillow.reference.listMarkets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List Zillow coverage regions (US + Canada, all served via zillow.com).\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/zillow/markets\");\n }\n}\n","/**\n * Zillow API client.\n *\n * Provides access to all Zillow API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { PropertiesClient } from \"./properties.js\";\nimport { AgentClient } from \"./agent.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Zillow API client with access to all Zillow endpoints.\n *\n * Maximal-coverage real-estate API over zillow.com (US + Canadian inventory,\n * all served from zillow.com behind a US IP).\n *\n * Provides sub-clients for different resource types:\n * - `search` - Property search and location autocomplete\n * - `properties` - Full property detail\n * - `agent` - Agent profile + their listings\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search properties\n * const results = await client.zillow.search.search(\"Austin, TX\");\n *\n * // Location autocomplete\n * const suggestions = await client.zillow.search.autocomplete(\"Miami\");\n *\n * // Get property detail\n * const { property } = await client.zillow.properties.getProperty(\"2078029085\");\n *\n * // Get an agent profile\n * const { agent } = await client.zillow.agent.getAgent({ username: \"some-agent\" });\n *\n * // Reference data\n * const markets = await client.zillow.reference.listMarkets();\n * ```\n */\nexport class ZillowClient {\n private readonly _gen: BaseClient;\n\n /** Client for property search and location autocomplete */\n readonly search: SearchClient;\n\n /** Client for full property detail */\n readonly properties: PropertiesClient;\n\n /** Client for agent profile + listings */\n readonly agent: AgentClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Zillow client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.search = new SearchClient(client);\n this.properties = new PropertiesClient(client);\n this.agent = new AgentClient(client);\n this.reference = new ReferenceClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get property detail by URL. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetailByUrl(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/zillow/property\", { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Immobiliare API client.\n *\n * Immobiliare endpoints: autocomplete (resolve a free-text place to geography\n * ids), search (list listings by location or explicit ids), getListing (full\n * single-listing detail), getAgency / getAgencyListings (agency profile +\n * active listings), priceStats (€/m² time series per area), markets, and\n * reference (filter enums). Markets: it, es, gr, lu (the Immobiliare Group).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n ImmobiliareAutocompleteParams,\n ImmobiliareSearchParams,\n ImmobiliareListingParams,\n ImmobiliareAgencyParams,\n ImmobiliareAgencyListingsParams,\n ImmobiliarePriceStatsParams,\n SuggestResponse,\n SearchResponse,\n Listing,\n AgencyProfile,\n AgencyListingsResponse,\n PriceStatsResponse,\n MarketsResponse,\n ReferenceResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Immobiliare API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Resolve a place name to geography ids\n * const hits = await client.immobiliare.autocomplete(\"Milano\");\n * const city = hits.suggestions[0];\n *\n * // Search listings\n * const results = await client.immobiliare.search({\n * city_id: city.city_id ?? undefined,\n * price_max: 500000,\n * });\n * for (const listing of results.listings) {\n * console.log(`${listing.id}: ${listing.title}`);\n * }\n *\n * // Full single-listing detail\n * const detail = await client.immobiliare.getListing(123456789);\n * console.log(detail.price?.formatted);\n *\n * // Supported markets\n * const markets = await client.immobiliare.markets();\n * ```\n */\nexport class ImmobiliareClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Resolve a free-text place name into geography ids for search.\n *\n * @param query - Free-text place name, e.g. \"Milano\".\n * @param options - Optional parameters (market).\n * @returns Suggest response with region/province/city/zone id candidates.\n */\n async autocomplete(\n query: string,\n options: ImmobiliareAutocompleteParams = {}\n ): Promise<SuggestResponse> {\n return this.client.request<SuggestResponse>(\"/v1/immobiliare/autocomplete\", {\n params: { query, market: options.market },\n });\n }\n\n /**\n * Search Immobiliare-group listings.\n *\n * Scope the search by `location` (free text, auto-resolved) OR explicit\n * `region_id` / `province_id` / `city_id` from {@link autocomplete}.\n *\n * @param options - Search parameters (market, location/ids, contract,\n * category, price/surface/room/bathroom filters, sort, page).\n * @returns Search response with `listings` and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(options: ImmobiliareSearchParams = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/immobiliare/search\", {\n params: {\n market: options.market,\n location: options.location,\n region_id: options.region_id,\n province_id: options.province_id,\n city_id: options.city_id,\n contract: options.contract,\n category: options.category,\n price_min: options.price_min,\n price_max: options.price_max,\n surface_min: options.surface_min,\n surface_max: options.surface_max,\n rooms_min: options.rooms_min,\n rooms_max: options.rooms_max,\n bathrooms_min: options.bathrooms_min,\n sort: options.sort,\n page: options.page,\n },\n });\n }\n\n /**\n * Get the full detail for a single Immobiliare listing.\n *\n * @param listingId - The Immobiliare listing id.\n * @param options - Optional parameters (market).\n * @returns The full listing detail.\n * @throws NotFoundError - If the listing doesn't exist.\n */\n async getListing(listingId: number, options: ImmobiliareListingParams = {}): Promise<Listing> {\n return this.client.request<Listing>(`/v1/immobiliare/listings/${listingId}`, {\n params: { market: options.market },\n });\n }\n\n /**\n * Get an agency/advertiser profile.\n *\n * @param agencyId - The Immobiliare agency id.\n * @param options - Optional parameters (market).\n * @returns The full agency profile.\n * @throws NotFoundError - If the agency doesn't exist.\n */\n async getAgency(agencyId: number, options: ImmobiliareAgencyParams = {}): Promise<AgencyProfile> {\n return this.client.request<AgencyProfile>(`/v1/immobiliare/agencies/${agencyId}`, {\n params: { market: options.market },\n });\n }\n\n /**\n * Get an agency's active listings (25 per page).\n *\n * @param agencyId - The Immobiliare agency id.\n * @param options - Optional parameters (market, page).\n * @returns Agency-listings response with `listings` and pagination.\n */\n async getAgencyListings(\n agencyId: number,\n options: ImmobiliareAgencyListingsParams = {}\n ): Promise<AgencyListingsResponse> {\n return this.client.request<AgencyListingsResponse>(\n `/v1/immobiliare/agencies/${agencyId}/listings`,\n {\n params: { market: options.market, page: options.page },\n }\n );\n }\n\n /**\n * Get the historical average €/m² time series for an area.\n *\n * @param regionId - Region id, e.g. \"lom\" (required).\n * @param options - Optional parameters (province_id, city_id, market, contract).\n * @returns Price-stats response with monthly `points` (label + EUR/m² value).\n */\n async priceStats(\n regionId: string,\n options: ImmobiliarePriceStatsParams = {}\n ): Promise<PriceStatsResponse> {\n return this.client.request<PriceStatsResponse>(\"/v1/immobiliare/market-insights/prices\", {\n params: {\n market: options.market,\n region_id: regionId,\n province_id: options.province_id,\n city_id: options.city_id,\n contract: options.contract,\n },\n });\n }\n\n /**\n * Get all supported Immobiliare-group markets (it, es, gr, lu).\n *\n * @returns A bare array of supported markets (code, domain, country,\n * locale, currency, name).\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/immobiliare/markets\");\n }\n\n /**\n * Get the filter enums accepted by {@link search}.\n *\n * @returns Reference response with `contracts`, `categories`, and `sorts`.\n */\n async reference(): Promise<ReferenceResponse> {\n return this.client.request<ReferenceResponse>(\"/v1/immobiliare/reference\");\n }\n}\n","/**\n * LoopNet Search API client.\n *\n * Provides commercial-listing search for for-lease / for-sale / auction\n * listings across 5 markets (us, ca, uk, fr, es).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { LoopNetSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for the LoopNet listing search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.loopnet.search.search({ location: \"Houston, TX\" });\n * for (const listing of results.results) {\n * console.log(`${listing.position}. ${listing.address} — ${listing.price_text}`);\n * }\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search LoopNet for for-lease / for-sale / auction commercial listings.\n *\n * Costs 10 credits.\n *\n * @param params - Search parameters including location, filters, and pagination.\n * @returns Search results with listing cards and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: LoopNetSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/loopnet/search\", {\n params: {\n location: params.location,\n market: params.market,\n listing_type: params.listing_type,\n property_type: params.property_type,\n page: params.page,\n min_price: params.min_price,\n max_price: params.max_price,\n price_type: params.price_type,\n min_size: params.min_size,\n max_size: params.max_size,\n },\n });\n }\n}\n","/**\n * LoopNet Listings API client.\n *\n * Provides full listing detail lookup by listing id.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ListingResponse, LoopNetMarket } from \"./types.js\";\n\n/** Options for the listing detail endpoint. */\nexport interface LoopNetListingParams {\n /** Coverage market (default: \"us\") */\n market?: LoopNetMarket;\n}\n\n/**\n * Client for the LoopNet listing detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.loopnet.listings.get(\"12345678\");\n * console.log(detail.listing.address, detail.listing.price_text);\n * ```\n */\nexport class ListingsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single LoopNet listing's full detail by listing id.\n *\n * Costs 12 credits.\n *\n * @param listingId - The LoopNet listing id.\n * @param params - Optional market selector.\n * @returns Listing detail response.\n * @throws NotFoundError - If the listing doesn't exist.\n */\n async get(listingId: string, params: LoopNetListingParams = {}): Promise<ListingResponse> {\n return this.client.request<ListingResponse>(`/v1/loopnet/listings/${listingId}`, {\n params: { market: params.market },\n });\n }\n}\n","/**\n * LoopNet Brokers API client.\n *\n * Provides a commercial broker's profile and their active listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BrokerResponse, LoopNetMarket } from \"./types.js\";\n\n/** Options for the broker profile endpoint. */\nexport interface LoopNetBrokerParams {\n /** Coverage market (default: \"us\") */\n market?: LoopNetMarket;\n}\n\n/**\n * Client for the LoopNet broker profile endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.loopnet.brokers.get(\"jane-doe\", \"w7x2k9\");\n * console.log(profile.broker.name, profile.broker.listing_count);\n * ```\n */\nexport class BrokersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a LoopNet broker's profile and their active listings.\n *\n * Costs 8 credits.\n *\n * @param slug - The broker's profile URL slug.\n * @param brokerId - The LoopNet broker id.\n * @param params - Optional market selector.\n * @returns Broker profile response with the broker and their listings.\n * @throws NotFoundError - If the broker doesn't exist.\n */\n async get(\n slug: string,\n brokerId: string,\n params: LoopNetBrokerParams = {}\n ): Promise<BrokerResponse> {\n return this.client.request<BrokerResponse>(`/v1/loopnet/brokers/${slug}/${brokerId}`, {\n params: { market: params.market },\n });\n }\n}\n","/**\n * LoopNet Reference Data API client.\n *\n * Provides the static coverage-market and property-type lists.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse, PropertyTypesResponse } from \"./types.js\";\n\n/**\n * Client for LoopNet reference endpoints (markets, property types).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.loopnet.reference.markets();\n * const types = await client.loopnet.reference.propertyTypes();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List LoopNet coverage markets (us, ca, uk, fr, es).\n *\n * Free — costs 0 credits.\n *\n * @returns Markets response with all supported coverage markets.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/loopnet/markets\");\n }\n\n /**\n * List LoopNet property-type facets (Office, Retail, Industrial, …).\n *\n * Free — costs 0 credits.\n *\n * @returns Property-types response with all searchable property-type slugs.\n */\n async propertyTypes(): Promise<PropertyTypesResponse> {\n return this.client.request<PropertyTypesResponse>(\"/v1/loopnet/property-types\");\n }\n}\n","/**\n * LoopNet API client.\n *\n * Provides access to all LoopNet API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ListingsClient } from \"./listings.js\";\nimport { BrokersClient } from \"./brokers.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * LoopNet API client with access to all LoopNet endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - For-lease / for-sale / auction commercial-listing search\n * - `listings` - Listing detail (by listing id)\n * - `brokers` - Broker profile and their active listings\n * - `reference` - Reference data (markets, property types)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search listings\n * const results = await client.loopnet.search.search({ location: \"Houston, TX\" });\n *\n * // Get listing detail\n * const detail = await client.loopnet.listings.get(\"12345678\");\n *\n * // Get a broker profile\n * const broker = await client.loopnet.brokers.get(\"jane-doe\", \"w7x2k9\");\n *\n * // Reference data\n * const markets = await client.loopnet.reference.markets();\n * ```\n */\nexport class LoopNetClient {\n /** Client for for-lease / for-sale / auction commercial-listing search */\n readonly search: SearchClient;\n\n /** Client for listing detail (by listing id) */\n readonly listings: ListingsClient;\n\n /** Client for broker profile and their active listings */\n readonly brokers: BrokersClient;\n\n /** Client for reference data (markets, property types) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new LoopNet client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.listings = new ListingsClient(client);\n this.brokers = new BrokersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Perplexity API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Perplexity API operations. (Generated from the OpenAPI spec.) */\nexport class PerplexityClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Ask Perplexity a question. Generated from the OpenAPI spec; returns the raw response object. */\n async askPerplexityAQuestion(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/ask\", { params });\n }\n\n /** Ask Perplexity a question (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async askPerplexityAQuestionPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/ask\", { method: \"POST\", params, body });\n }\n\n /** Measure a brand's visibility in a Perplexity answer. Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAPerplexityAnswer(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/brand-visibility\", { params });\n }\n\n /** Measure a brand's visibility in a Perplexity answer (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAPerplexityAnswerPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/brand-visibility\", { method: \"POST\", params, body });\n }\n}\n","/**\n * Depop API client.\n *\n * Depop endpoints: search (product search), getProduct (full single-product\n * detail, by slug), getUser (shop / seller profile, by username),\n * getUserProducts (a seller's products), and listMarkets. Single host\n * (www.depop.com) localised by a `market` param → country + currency.\n *\n * Data is browser-rendered (cloakbrowser), so each call takes a few seconds\n * to return.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n DepopSearchParams,\n DepopProductParams,\n DepopUserParams,\n DepopUserProductsParams,\n DepopSearchResponse,\n DepopProductDetail,\n DepopShopProfile,\n DepopUserProductsResponse,\n DepopMarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Depop API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search products\n * const results = await client.depop.search(\"vintage denim jacket\", { market: \"gb\" });\n * for (const product of results.products) {\n * console.log(`${product.brand} — ${product.price} ${product.currency}`);\n * }\n *\n * // Full single-product detail\n * const detail = await client.depop.getProduct(\"some-product-slug\");\n * console.log(detail.title);\n *\n * // Shop profile\n * const shop = await client.depop.getUser(\"someseller\");\n *\n * // A seller's products\n * const items = await client.depop.getUserProducts(\"someseller\");\n *\n * // Supported markets\n * const markets = await client.depop.listMarkets();\n * ```\n */\nexport class DepopClient {\n private readonly _gen: BaseClient;\n\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.client = client;\n }\n\n /**\n * Search Depop for products.\n *\n * Costs 10 credits.\n *\n * @param query - Search keywords (required).\n * @param options - Optional parameters (market, perPage, page, price/brand/\n * size/colour/condition/gender filters, sort).\n * @returns Search response with matching product cards and pagination meta.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(query: string, options: DepopSearchParams = {}): Promise<DepopSearchResponse> {\n return this.client.request<DepopSearchResponse>(\"/v1/depop/search\", {\n params: {\n query,\n market: options.market ?? \"us\",\n per_page: options.perPage,\n page: options.page,\n price_min: options.priceMin,\n price_max: options.priceMax,\n brands: options.brands,\n sizes: options.sizes,\n colours: options.colours,\n conditions: options.conditions,\n gender: options.gender,\n sort: options.sort,\n },\n });\n }\n\n /**\n * Get a single Depop product's full detail by slug.\n *\n * Costs 10 credits.\n *\n * @param slug - The Depop product slug.\n * @param options - Optional parameters (market).\n * @returns Full product detail.\n * @throws NotFoundError - If the product doesn't exist.\n */\n async getProduct(slug: string, options: DepopProductParams = {}): Promise<DepopProductDetail> {\n return this.client.request<DepopProductDetail>(`/v1/depop/products/${slug}`, {\n params: { market: options.market ?? \"us\" },\n });\n }\n\n /**\n * Get a Depop shop / seller profile by username.\n *\n * Costs 10 credits.\n *\n * @param username - The Depop seller username.\n * @param options - Optional parameters (market).\n * @returns Shop profile.\n * @throws NotFoundError - If the user doesn't exist.\n */\n async getUser(username: string, options: DepopUserParams = {}): Promise<DepopShopProfile> {\n return this.client.request<DepopShopProfile>(`/v1/depop/users/${username}`, {\n params: { market: options.market ?? \"us\" },\n });\n }\n\n /**\n * Get a Depop seller's products.\n *\n * Costs 10 credits.\n *\n * @param username - The Depop seller username.\n * @param options - Optional parameters (market, perPage, page).\n * @returns User products response with product cards and pagination meta.\n * @throws NotFoundError - If the user doesn't exist.\n */\n async getUserProducts(\n username: string,\n options: DepopUserProductsParams = {}\n ): Promise<DepopUserProductsResponse> {\n return this.client.request<DepopUserProductsResponse>(`/v1/depop/users/${username}/products`, {\n params: {\n market: options.market ?? \"us\",\n per_page: options.perPage,\n page: options.page,\n },\n });\n }\n\n /**\n * Get all supported Depop markets.\n *\n * Free — this endpoint costs no credits.\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<DepopMarketsResponse> {\n return this.client.request<DepopMarketsResponse>(\"/v1/depop/markets\");\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get product detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getProductDetail(\n productId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/depop/products/${productId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * LinkedIn API client.\n *\n * LinkedIn endpoints cover the public, logged-out surface: guest job search +\n * detail + company jobs, public company / school / profile pages, public\n * posts / articles, LinkedIn Learning courses, and a geo/company typeahead.\n * Requests are localised by a `country` residential-proxy param.\n *\n * Company/school/profile/post/course data is SSR-rendered, so those calls take\n * a few seconds to return; the guest job APIs are faster HTML fragments.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n LinkedInJobsSearchParams,\n LinkedInCompanyJobsParams,\n LinkedInCountryParams,\n LinkedInJobsSearchResponse,\n JobDetail,\n Company,\n School,\n Profile,\n Post,\n LearningCourse,\n LinkedInGeoSuggestResponse,\n LinkedInHealthResponse,\n} from \"./types.js\";\n\n/**\n * Client for all LinkedIn API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search jobs\n * const results = await client.linkedin.jobsSearch({ keywords: \"python\", location: \"New York\" });\n * for (const job of results.jobs) {\n * console.log(`${job.title} — ${job.company}`);\n * }\n *\n * // Single job detail\n * const job = await client.linkedin.getJob(\"3901234567\");\n *\n * // Company / school / profile\n * const company = await client.linkedin.getCompany(\"microsoft\");\n * const school = await client.linkedin.getSchool(\"stanford-university\");\n * const profile = await client.linkedin.getProfile(\"williamhgates\");\n *\n * // Posts, articles, courses\n * const post = await client.linkedin.getPost(\"some-post-slug\");\n * const course = await client.linkedin.getCourse(\"learning-python\");\n *\n * // Geo / company typeahead\n * const geo = await client.linkedin.geoSuggest(\"London\");\n * ```\n */\nexport class LinkedInClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search LinkedIn jobs (guest search API).\n *\n * @param options - Optional parameters (keywords, location, geoId, companyId,\n * datePosted, experience, jobType, workplace, sort, start, country).\n * @returns Jobs search response with matching job cards and pagination meta.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async jobsSearch(options: LinkedInJobsSearchParams = {}): Promise<LinkedInJobsSearchResponse> {\n return this.client.request<LinkedInJobsSearchResponse>(\"/v1/linkedin/jobs/search\", {\n params: {\n keywords: options.keywords,\n location: options.location,\n geo_id: options.geoId,\n company_id: options.companyId,\n date_posted: options.datePosted,\n experience: options.experience,\n job_type: options.jobType,\n workplace: options.workplace,\n sort: options.sort,\n start: options.start ?? 0,\n country: options.country ?? \"us\",\n },\n });\n }\n\n /**\n * Get full detail for one LinkedIn job posting.\n *\n * @param jobId - The numeric LinkedIn job id.\n * @param options - Optional parameters (country).\n * @returns Full job detail.\n * @throws NotFoundError - If the job doesn't exist.\n */\n async getJob(jobId: string, options: LinkedInCountryParams = {}): Promise<JobDetail> {\n return this.client.request<JobDetail>(`/v1/linkedin/jobs/${jobId}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a company's job postings.\n *\n * @param companyId - The numeric LinkedIn company id.\n * @param options - Optional parameters (start, country).\n * @returns Jobs search response with the company's job cards and pagination meta.\n * @throws NotFoundError - If the company doesn't exist.\n */\n async companyJobs(\n companyId: string,\n options: LinkedInCompanyJobsParams = {}\n ): Promise<LinkedInJobsSearchResponse> {\n return this.client.request<LinkedInJobsSearchResponse>(\n `/v1/linkedin/companies/${companyId}/jobs`,\n {\n params: {\n start: options.start ?? 0,\n country: options.country ?? \"us\",\n },\n }\n );\n }\n\n /**\n * Get a public LinkedIn company page.\n *\n * @param universalName - The company's universal name (URL slug).\n * @param options - Optional parameters (country).\n * @returns Company profile.\n * @throws NotFoundError - If the company doesn't exist.\n */\n async getCompany(universalName: string, options: LinkedInCountryParams = {}): Promise<Company> {\n return this.client.request<Company>(`/v1/linkedin/companies/${universalName}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn school page.\n *\n * @param universalName - The school's universal name (URL slug).\n * @param options - Optional parameters (country).\n * @returns School profile.\n * @throws NotFoundError - If the school doesn't exist.\n */\n async getSchool(universalName: string, options: LinkedInCountryParams = {}): Promise<School> {\n return this.client.request<School>(`/v1/linkedin/schools/${universalName}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn profile.\n *\n * @param publicId - The profile's public id (URL slug).\n * @param options - Optional parameters (country).\n * @returns Public profile.\n * @throws NotFoundError - If the profile doesn't exist.\n */\n async getProfile(publicId: string, options: LinkedInCountryParams = {}): Promise<Profile> {\n return this.client.request<Profile>(`/v1/linkedin/profiles/${publicId}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn post (activity share).\n *\n * @param postSlug - The post slug (last URL segment).\n * @param options - Optional parameters (country).\n * @returns Post detail.\n * @throws NotFoundError - If the post doesn't exist.\n */\n async getPost(postSlug: string, options: LinkedInCountryParams = {}): Promise<Post> {\n return this.client.request<Post>(`/v1/linkedin/posts/${postSlug}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn article (`/pulse/`).\n *\n * @param articleSlug - The article slug (last URL segment).\n * @param options - Optional parameters (country).\n * @returns Article detail (Post shape).\n * @throws NotFoundError - If the article doesn't exist.\n */\n async getArticle(articleSlug: string, options: LinkedInCountryParams = {}): Promise<Post> {\n return this.client.request<Post>(`/v1/linkedin/articles/${articleSlug}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn Learning course.\n *\n * @param courseSlug - The course slug (last URL segment).\n * @param options - Optional parameters (country).\n * @returns Course detail.\n * @throws NotFoundError - If the course doesn't exist.\n */\n async getCourse(\n courseSlug: string,\n options: LinkedInCountryParams = {}\n ): Promise<LearningCourse> {\n return this.client.request<LearningCourse>(`/v1/linkedin/learning/${courseSlug}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Suggest geo / company ids for a query (typeahead).\n *\n * @param query - Location or company name, e.g. \"London\".\n * @param type - \"geo\" | \"company\" (default: \"geo\").\n * @returns Geo-suggest response with matching suggestions.\n */\n async geoSuggest(query: string, type = \"geo\"): Promise<LinkedInGeoSuggestResponse> {\n return this.client.request<LinkedInGeoSuggestResponse>(\"/v1/linkedin/geo/suggest\", {\n params: { query, type },\n });\n }\n\n /**\n * LinkedIn scraper health check.\n *\n * Free — this endpoint costs no credits.\n *\n * @returns Health payload (status, service, version, products).\n */\n async health(): Promise<LinkedInHealthResponse> {\n return this.client.request<LinkedInHealthResponse>(\"/v1/linkedin/health\");\n }\n}\n","/**\n * ChatGPT Ask API client.\n *\n * Sends a prompt to the real chatgpt.com and returns the answer as structured\n * JSON, including the web sources ChatGPT cited.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ChatGPTAskParams, ChatGPTAskResponse } from \"./types.js\";\n\n/**\n * Client for the ChatGPT ask endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.chatgpt.ask.ask({\n * prompt: \"best running shoes 2026\",\n * });\n * console.log(result.answer);\n * for (const citation of result.citations) {\n * console.log(`${citation.domain}: ${citation.url}`);\n * }\n * ```\n */\nexport class AskClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Ask ChatGPT a question and get the answer with its sources.\n *\n * Costs 20 credits. Typical latency is 20-25s ungrounded, 30-70s with web search.\n *\n * @param params - Ask parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"auto\").\n * @returns The answer, its citations, and the full retrieved search set.\n *\n * @example\n * ```typescript\n * const result = await client.chatgpt.ask.ask({\n * prompt: \"what is the best CRM for a 10-person startup?\",\n * country: \"GB\",\n * web_search: \"force\",\n * });\n * console.log(result.web_search_triggered, result.model);\n * for (const source of result.search_results) {\n * console.log(`${source.cited ? \"*\" : \" \"} ${source.url}`);\n * }\n * ```\n */\n async ask(params: ChatGPTAskParams): Promise<ChatGPTAskResponse> {\n return this.client.request<ChatGPTAskResponse>(\"/v1/chatgpt/ask\", {\n params: {\n prompt: params.prompt,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * ChatGPT Brand Visibility API client.\n *\n * Answer-engine-optimisation (AEO/GEO) analysis: ask ChatGPT a prompt and get\n * back how a brand fares in the answer, next to its competitors.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ChatGPTBrandVisibilityParams, ChatGPTBrandVisibilityResponse } from \"./types.js\";\n\n/**\n * Client for the ChatGPT brand-visibility endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.chatgpt.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * competitors: [\"Bright Data\", \"Apify\"],\n * });\n * console.log(result.mentioned, result.share_of_voice_pct);\n * ```\n */\nexport class BrandClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Analyse how a brand shows up in ChatGPT's answer to a prompt.\n *\n * Costs 25 credits.\n *\n * @param params - Brand-visibility parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.brand - The brand name to look for in the answer.\n * @param params.domain - The brand's domain, used to detect brand citations.\n * @param params.aliases - Other spellings that should count as mentions.\n * @param params.competitors - Competitors to measure share of voice against.\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"force\").\n * @returns The brand analysis plus the answer and its citations.\n *\n * @example\n * ```typescript\n * const result = await client.chatgpt.brand.visibility({\n * prompt: \"which proxy provider should I use?\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * aliases: [\"Scrape Badger\"],\n * competitors: [\"Bright Data\", \"Oxylabs\"],\n * country: \"DE\",\n * });\n * console.log(`position score: ${result.position_score}`);\n * for (const competitor of result.competitors) {\n * console.log(`${competitor.name}: ${competitor.mention_count}`);\n * }\n * ```\n */\n async visibility(params: ChatGPTBrandVisibilityParams): Promise<ChatGPTBrandVisibilityResponse> {\n return this.client.request<ChatGPTBrandVisibilityResponse>(\"/v1/chatgpt/brand-visibility\", {\n params: {\n prompt: params.prompt,\n brand: params.brand,\n domain: params.domain,\n aliases: params.aliases?.length ? params.aliases.join(\",\") : undefined,\n competitors: params.competitors?.length ? params.competitors.join(\",\") : undefined,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * ChatGPT Reference Data API client.\n *\n * Provides the list of models chatgpt.com currently offers.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ChatGPTModelsParams, ChatGPTModelsResponse } from \"./types.js\";\n\n/**\n * Client for ChatGPT reference data endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.chatgpt.reference.models();\n * for (const model of result.models) {\n * console.log(`${model.slug}: ${model.title}`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get the models chatgpt.com currently offers.\n *\n * Costs 1 credit.\n *\n * @param params - Optional parameters.\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @returns The available models.\n *\n * @example\n * ```typescript\n * const result = await client.chatgpt.reference.models({ country: \"GB\" });\n * console.log(`${result.count} models`);\n * for (const model of result.models) {\n * console.log(`${model.slug}: ${model.max_tokens} tokens`);\n * }\n * ```\n */\n async models(params: ChatGPTModelsParams = {}): Promise<ChatGPTModelsResponse> {\n return this.client.request<ChatGPTModelsResponse>(\"/v1/chatgpt/models\", {\n params: { country: params.country },\n });\n }\n}\n","/**\n * ChatGPT API client.\n *\n * Provides access to all ChatGPT API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { AskClient } from \"./ask.js\";\nimport { BrandClient } from \"./brand.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * ChatGPT API client with access to all ChatGPT endpoints.\n *\n * Prompts the real chatgpt.com — not the OpenAI API — anonymously, and returns\n * the answer as structured JSON including the web sources ChatGPT cited.\n *\n * Sub-clients:\n * - `ask` - Send a prompt and get the answer with its sources\n * - `brand` - AEO/GEO brand-visibility analysis\n * - `reference` - Reference data (available models)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Ask a question\n * const result = await client.chatgpt.ask.ask({ prompt: \"best running shoes 2026\" });\n *\n * // Brand visibility\n * const brand = await client.chatgpt.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * competitors: [\"Bright Data\"],\n * });\n *\n * // Available models\n * const models = await client.chatgpt.reference.models();\n * ```\n */\nexport class ChatGPTClient {\n private readonly _gen: BaseClient;\n\n /** Client for asking ChatGPT a question */\n readonly ask: AskClient;\n\n /** Client for AEO/GEO brand-visibility analysis */\n readonly brand: BrandClient;\n\n /** Client for reference data (available models) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new ChatGPT client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.ask = new AskClient(client);\n this.brand = new BrandClient(client);\n this.reference = new ReferenceClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Ask ChatGPT a question (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async askChatgptAQuestionPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/chatgpt/ask\", { method: \"POST\", params, body });\n }\n\n /** Measure a brand's visibility in a ChatGPT answer (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAChatgptAnswerPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/chatgpt/brand-visibility\", { method: \"POST\", params, body });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Gemini Ask API client.\n *\n * Sends a prompt to the real gemini.google.com and returns the answer as\n * structured JSON, including the web sources Gemini cited.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GeminiAskParams, GeminiAskResponse } from \"./types.js\";\n\n/**\n * Client for the Gemini ask endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.gemini.ask.ask({\n * prompt: \"best running shoes 2026\",\n * });\n * console.log(result.answer);\n * for (const citation of result.citations) {\n * console.log(`${citation.domain}: ${citation.url}`);\n * }\n * ```\n */\nexport class AskClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Ask Gemini a question and get the answer with its sources.\n *\n * @param params - Ask parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"auto\").\n * @returns The answer, its citations, and the full retrieved search set.\n *\n * @example\n * ```typescript\n * const result = await client.gemini.ask.ask({\n * prompt: \"what is the best CRM for a 10-person startup?\",\n * country: \"GB\",\n * web_search: \"force\",\n * });\n * console.log(result.web_search_triggered, result.model);\n * for (const source of result.search_results) {\n * console.log(`${source.cited ? \"*\" : \" \"} ${source.url}`);\n * }\n * ```\n */\n async ask(params: GeminiAskParams): Promise<GeminiAskResponse> {\n return this.client.request<GeminiAskResponse>(\"/v1/gemini/ask\", {\n params: {\n prompt: params.prompt,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * Gemini Brand Visibility API client.\n *\n * Answer-engine-optimisation (AEO/GEO) analysis: ask Gemini a prompt and get\n * back how a brand fares in the answer, next to its competitors.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GeminiBrandVisibilityParams, GeminiBrandVisibilityResponse } from \"./types.js\";\n\n/**\n * Client for the Gemini brand-visibility endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.gemini.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * competitors: [\"Bright Data\", \"Apify\"],\n * });\n * console.log(result.mentioned, result.share_of_voice_pct);\n * ```\n */\nexport class BrandClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Analyse how a brand shows up in Gemini's answer to a prompt.\n *\n * @param params - Brand-visibility parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.brand - The brand name to look for in the answer.\n * @param params.domain - The brand's domain, used to detect brand citations.\n * @param params.aliases - Other spellings that should count as mentions.\n * @param params.competitors - Competitors to measure share of voice against.\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"force\").\n * @returns The brand analysis plus the answer and its citations.\n *\n * @example\n * ```typescript\n * const result = await client.gemini.brand.visibility({\n * prompt: \"which proxy provider should I use?\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * aliases: [\"Scrape Badger\"],\n * competitors: [\"Bright Data\", \"Oxylabs\"],\n * country: \"DE\",\n * });\n * console.log(`position score: ${result.position_score}`);\n * for (const competitor of result.competitors) {\n * console.log(`${competitor.name}: ${competitor.mention_count}`);\n * }\n * ```\n */\n async visibility(params: GeminiBrandVisibilityParams): Promise<GeminiBrandVisibilityResponse> {\n return this.client.request<GeminiBrandVisibilityResponse>(\"/v1/gemini/brand-visibility\", {\n params: {\n prompt: params.prompt,\n brand: params.brand,\n domain: params.domain,\n aliases: params.aliases?.length ? params.aliases.join(\",\") : undefined,\n competitors: params.competitors?.length ? params.competitors.join(\",\") : undefined,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * Gemini API client.\n *\n * Provides access to all Gemini API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { AskClient } from \"./ask.js\";\nimport { BrandClient } from \"./brand.js\";\n\n/**\n * Gemini API client with access to all Gemini endpoints.\n *\n * Prompts the real gemini.google.com — not the Gemini API — anonymously, and\n * returns the answer as structured JSON including the web sources Gemini\n * cited.\n *\n * Sub-clients:\n * - `ask` - Send a prompt and get the answer with its sources\n * - `brand` - AEO/GEO brand-visibility analysis\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Ask a question\n * const result = await client.gemini.ask.ask({ prompt: \"best running shoes 2026\" });\n *\n * // Brand visibility\n * const brand = await client.gemini.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * competitors: [\"Bright Data\"],\n * });\n * ```\n */\nexport class GeminiClient {\n private readonly _gen: BaseClient;\n\n /** Client for asking Gemini a question */\n readonly ask: AskClient;\n\n /** Client for AEO/GEO brand-visibility analysis */\n readonly brand: BrandClient;\n\n /**\n * Create a new Gemini client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.ask = new AskClient(client);\n this.brand = new BrandClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Ask Gemini a question (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async askGeminiAQuestionPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/gemini/ask\", { method: \"POST\", params, body });\n }\n\n /** Measure a brand's visibility in a Gemini answer (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAGeminiAnswerPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/gemini/brand-visibility\", { method: \"POST\", params, body });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Main ScrapeBadger client.\n *\n * This is the primary entry point for the ScrapeBadger SDK.\n */\n\nimport { BaseClient } from \"./internal/client.js\";\nimport { type ScrapeBadgerConfig, resolveConfig, getApiKeyFromEnv } from \"./internal/config.js\";\nimport { TwitterClient } from \"./twitter/client.js\";\nimport { WebClient } from \"./web/client.js\";\nimport { VintedClient } from \"./vinted/client.js\";\nimport { GoogleClient } from \"./google/client.js\";\nimport { GooglePlayClient } from \"./google_play/client.js\";\nimport { IdealistaClient } from \"./idealista/client.js\";\nimport { RedditClient } from \"./reddit/client.js\";\nimport { ApartmentsClient } from \"./apartments/client.js\";\nimport { AppStoreClient } from \"./app_store/client.js\";\nimport { InstagramClient } from \"./instagram/client.js\";\nimport { RedfinClient } from \"./redfin/client.js\";\nimport { AccountClient } from \"./account/client.js\";\nimport { AirbnbClient } from \"./airbnb/client.js\";\nimport { AmazonClient } from \"./amazon/client.js\";\nimport { ShopeeClient } from \"./shopee/client.js\";\nimport { TikTokClient } from \"./tiktok/client.js\";\nimport { EbayClient } from \"./ebay/client.js\";\nimport { FacebookClient } from \"./facebook/client.js\";\nimport { WalmartClient } from \"./walmart/client.js\";\nimport { DuckDuckGoClient } from \"./duckduckgo/client.js\";\nimport { BingClient } from \"./bing/client.js\";\nimport { BookingClient } from \"./booking/client.js\";\nimport { BaiduClient } from \"./baidu/client.js\";\nimport { YahooClient } from \"./yahoo/client.js\";\nimport { YandexClient } from \"./yandex/client.js\";\nimport { YoutubeClient } from \"./youtube/client.js\";\nimport { RealtorClient } from \"./realtor/client.js\";\nimport { LeboncoinClient } from \"./leboncoin/client.js\";\nimport { ZillowClient } from \"./zillow/client.js\";\nimport { ImmobiliareClient } from \"./immobiliare/client.js\";\nimport { LoopNetClient } from \"./loopnet/client.js\";\nimport { PerplexityClient } from \"./perplexity/client.js\";\nimport { DepopClient } from \"./depop/client.js\";\nimport { LinkedInClient } from \"./linkedin/client.js\";\nimport { ChatGPTClient } from \"./chatgpt/client.js\";\nimport { GeminiClient } from \"./gemini/client.js\";\n\n/**\n * ScrapeBadger API client.\n *\n * The main client for interacting with the ScrapeBadger API.\n * Provides access to all available scrapers through typed sub-clients.\n *\n * @example\n * ```typescript\n * import { ScrapeBadger } from \"scrapebadger\";\n *\n * // Create client with API key\n * const client = new ScrapeBadger({ apiKey: \"your-api-key\" });\n *\n * // Or use environment variable (SCRAPEBADGER_API_KEY)\n * const client = new ScrapeBadger();\n *\n * // Access Twitter API\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n *\n * // Search with automatic pagination\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\")) {\n * console.log(tweet.text);\n * }\n *\n * // Collect all results into an array\n * import { collectAll } from \"scrapebadger\";\n * const tweets = await collectAll(\n * client.twitter.tweets.searchAll(\"python\", { maxItems: 100 })\n * );\n * ```\n */\nexport class ScrapeBadger {\n private readonly baseClient: BaseClient;\n\n /** Twitter API client */\n readonly twitter: TwitterClient;\n\n /** Web scraping API client */\n readonly web: WebClient;\n\n /** Vinted scraper API client */\n readonly vinted: VintedClient;\n\n /** Google Scraper API client — 19 Google product APIs */\n readonly google: GoogleClient;\n /** Google_Play API client. (Generated from the OpenAPI spec.) */\n readonly google_play: GooglePlayClient;\n /** Idealista API client. (Generated from the OpenAPI spec.) */\n readonly idealista: IdealistaClient;\n\n /** Reddit scraper API client */\n readonly reddit: RedditClient;\n\n /** Apartments.com scraper API client — search + property with unit-level pricing (US) */\n readonly apartments: ApartmentsClient;\n /** App_Store API client. (Generated from the OpenAPI spec.) */\n readonly app_store: AppStoreClient;\n\n /** Instagram scraper API client — users, media, search, hashtags, locations, audio */\n readonly instagram: InstagramClient;\n\n /** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */\n readonly redfin: RedfinClient;\n\n /** Amazon scraper API client — 14 endpoints */\n /** Account API client. (Generated from the OpenAPI spec.) */\n readonly account: AccountClient;\n /** Airbnb API client. (Generated from the OpenAPI spec.) */\n readonly airbnb: AirbnbClient;\n readonly amazon: AmazonClient;\n\n /** Shopee scraper API client — 6 endpoints across 11 markets */\n readonly shopee: ShopeeClient;\n\n /** TikTok scraper API client — 26 endpoints */\n readonly tiktok: TikTokClient;\n\n /** eBay scraper API client — 12 endpoints across 18 markets */\n readonly ebay: EbayClient;\n /** Facebook API client. (Generated from the OpenAPI spec.) */\n readonly facebook: FacebookClient;\n\n /** Walmart scraper API client — 11 endpoints (walmart.com, US-only) */\n readonly walmart: WalmartClient;\n\n /** DuckDuckGo scraper API client — search, images, news, videos, autocomplete, instant, regions */\n readonly duckduckgo: DuckDuckGoClient;\n\n /** Bing scraper API client — 6 endpoints (search, images, videos, news, autocomplete, markets) */\n readonly bing: BingClient;\n /** Booking API client. (Generated from the OpenAPI spec.) */\n readonly booking: BookingClient;\n\n /** Baidu scraper API client — search, news, images, autocomplete (baidu.com, China's #1 search engine) */\n readonly baidu: BaiduClient;\n\n /** Yahoo scraper API client — 6 endpoints (search, images, videos, news, autocomplete, markets) across 35 markets */\n readonly yahoo: YahooClient;\n\n /** Yandex scraper API client — web search, image search, reverse-image (CBIR), markets (tr/com/ru/by/kz/uz) */\n readonly yandex: YandexClient;\n\n /** YouTube scraper API client — 39 endpoints */\n readonly youtube: YoutubeClient;\n\n /** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */\n readonly realtor: RealtorClient;\n\n /** Leboncoin scraper API client — 10 endpoints (France) */\n readonly leboncoin: LeboncoinClient;\n\n /** Zillow scraper API client — 5 endpoints (search, property, agent, autocomplete, markets) */\n readonly zillow: ZillowClient;\n\n /** Immobiliare scraper API client — 8 endpoints across 4 markets (it, es, gr, lu) */\n readonly immobiliare: ImmobiliareClient;\n\n /** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */\n readonly loopnet: LoopNetClient;\n /** Perplexity API client. (Generated from the OpenAPI spec.) */\n readonly perplexity: PerplexityClient;\n\n /** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */\n readonly depop: DepopClient;\n\n /** LinkedIn scraper API client — 11 no-auth endpoints (jobs, company, school, profile, post, article, learning, geo) */\n readonly linkedin: LinkedInClient;\n\n /** ChatGPT scraper API client — ask, brand visibility, models (the real chatgpt.com, anonymous) */\n readonly chatgpt: ChatGPTClient;\n\n /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */\n readonly gemini: GeminiClient;\n\n /**\n * Create a new ScrapeBadger client.\n *\n * @param config - Configuration options. If apiKey is not provided,\n * it will be read from the SCRAPEBADGER_API_KEY environment variable.\n * @throws Error if no API key is provided or found in environment.\n *\n * @example\n * ```typescript\n * // With explicit API key\n * const client = new ScrapeBadger({ apiKey: \"your-api-key\" });\n *\n * // With custom options\n * const client = new ScrapeBadger({\n * apiKey: \"your-api-key\",\n * baseUrl: \"https://custom.api.com\",\n * timeout: 60000,\n * maxRetries: 5\n * });\n *\n * // Using environment variable\n * // Set SCRAPEBADGER_API_KEY=your-api-key\n * const client = new ScrapeBadger();\n * ```\n */\n constructor(config: Partial<ScrapeBadgerConfig> = {}) {\n // Use provided API key or fall back to environment variable\n const apiKey = config.apiKey ?? getApiKeyFromEnv();\n\n if (!apiKey) {\n throw new Error(\n \"API key is required. Pass it in the config or set SCRAPEBADGER_API_KEY environment variable.\"\n );\n }\n\n const resolvedConfig = resolveConfig({ ...config, apiKey });\n this.baseClient = new BaseClient(resolvedConfig);\n\n // Initialize sub-clients\n this.twitter = new TwitterClient(this.baseClient);\n this.web = new WebClient(this.baseClient);\n this.vinted = new VintedClient(this.baseClient);\n this.google = new GoogleClient(this.baseClient);\n this.google_play = new GooglePlayClient(this.baseClient);\n this.idealista = new IdealistaClient(this.baseClient);\n this.reddit = new RedditClient(this.baseClient);\n this.apartments = new ApartmentsClient(this.baseClient);\n this.app_store = new AppStoreClient(this.baseClient);\n this.instagram = new InstagramClient(this.baseClient);\n this.redfin = new RedfinClient(this.baseClient);\n this.account = new AccountClient(this.baseClient);\n this.airbnb = new AirbnbClient(this.baseClient);\n this.amazon = new AmazonClient(this.baseClient);\n this.shopee = new ShopeeClient(this.baseClient);\n this.tiktok = new TikTokClient(this.baseClient);\n this.ebay = new EbayClient(this.baseClient);\n this.facebook = new FacebookClient(this.baseClient);\n this.walmart = new WalmartClient(this.baseClient);\n this.duckduckgo = new DuckDuckGoClient(this.baseClient);\n this.bing = new BingClient(this.baseClient);\n this.booking = new BookingClient(this.baseClient);\n this.baidu = new BaiduClient(this.baseClient);\n this.yahoo = new YahooClient(this.baseClient);\n this.yandex = new YandexClient(this.baseClient);\n this.youtube = new YoutubeClient(this.baseClient);\n this.realtor = new RealtorClient(this.baseClient);\n this.leboncoin = new LeboncoinClient(this.baseClient);\n this.zillow = new ZillowClient(this.baseClient);\n this.immobiliare = new ImmobiliareClient(this.baseClient);\n this.loopnet = new LoopNetClient(this.baseClient);\n this.perplexity = new PerplexityClient(this.baseClient);\n this.depop = new DepopClient(this.baseClient);\n this.linkedin = new LinkedInClient(this.baseClient);\n this.chatgpt = new ChatGPTClient(this.baseClient);\n this.gemini = new GeminiClient(this.baseClient);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/internal/version.ts","../src/internal/exceptions.ts","../src/internal/client.ts","../src/internal/config.ts","../src/internal/pagination.ts","../src/twitter/tweets.ts","../src/twitter/users.ts","../src/twitter/lists.ts","../src/twitter/communities.ts","../src/twitter/trends.ts","../src/twitter/geo.ts","../src/twitter/stream.ts","../src/twitter/spaces.ts","../src/twitter/client.ts","../src/web/client.ts","../src/vinted/search.ts","../src/vinted/items.ts","../src/vinted/users.ts","../src/vinted/reference.ts","../src/vinted/client.ts","../src/google/ai-mode.ts","../src/google/autocomplete.ts","../src/google/finance.ts","../src/google/flights.ts","../src/google/hotels.ts","../src/google/images.ts","../src/google/jobs.ts","../src/google/lens.ts","../src/google/maps.ts","../src/google/news.ts","../src/google/patents.ts","../src/google/products.ts","../src/google/scholar.ts","../src/google/search.ts","../src/google/shopping.ts","../src/google/shorts.ts","../src/google/trends.ts","../src/google/videos.ts","../src/google/client.ts","../src/google_play/client.ts","../src/idealista/client.ts","../src/reddit/search.ts","../src/reddit/posts.ts","../src/reddit/subreddits.ts","../src/reddit/users.ts","../src/reddit/client.ts","../src/apartments/client.ts","../src/app_store/client.ts","../src/instagram/users.ts","../src/instagram/media.ts","../src/instagram/search.ts","../src/instagram/reference.ts","../src/instagram/client.ts","../src/redfin/client.ts","../src/account/client.ts","../src/airbnb/client.ts","../src/amazon/search.ts","../src/amazon/products.ts","../src/amazon/listings.ts","../src/amazon/sellers.ts","../src/amazon/reference.ts","../src/amazon/client.ts","../src/shopee/search.ts","../src/shopee/products.ts","../src/shopee/reviews.ts","../src/shopee/reference.ts","../src/shopee/client.ts","../src/tiktok/users.ts","../src/tiktok/videos.ts","../src/tiktok/search.ts","../src/tiktok/music.ts","../src/tiktok/hashtags.ts","../src/tiktok/trending.ts","../src/tiktok/ads.ts","../src/tiktok/reference.ts","../src/tiktok/client.ts","../src/ebay/search.ts","../src/ebay/items.ts","../src/ebay/sellers.ts","../src/ebay/categories.ts","../src/ebay/reference.ts","../src/ebay/client.ts","../src/facebook/client.ts","../src/walmart/search.ts","../src/walmart/products.ts","../src/walmart/sellers.ts","../src/walmart/stores.ts","../src/walmart/reference.ts","../src/walmart/client.ts","../src/duckduckgo/search.ts","../src/duckduckgo/media.ts","../src/duckduckgo/reference.ts","../src/duckduckgo/client.ts","../src/bing/search.ts","../src/bing/media.ts","../src/bing/news.ts","../src/bing/reference.ts","../src/bing/client.ts","../src/booking/client.ts","../src/baidu/client.ts","../src/yahoo/search.ts","../src/yahoo/media.ts","../src/yahoo/news.ts","../src/yahoo/reference.ts","../src/yahoo/client.ts","../src/yandex/search.ts","../src/yandex/images.ts","../src/yandex/reference.ts","../src/yandex/client.ts","../src/youtube/search.ts","../src/youtube/videos.ts","../src/youtube/channels.ts","../src/youtube/playlists.ts","../src/youtube/community.ts","../src/youtube/shorts.ts","../src/youtube/trending.ts","../src/youtube/music.ts","../src/youtube/reference.ts","../src/youtube/client.ts","../src/realtor/search.ts","../src/realtor/properties.ts","../src/realtor/reference.ts","../src/realtor/client.ts","../src/leboncoin/search.ts","../src/leboncoin/ads.ts","../src/leboncoin/sellers.ts","../src/leboncoin/reference.ts","../src/leboncoin/client.ts","../src/zillow/search.ts","../src/zillow/properties.ts","../src/zillow/agent.ts","../src/zillow/reference.ts","../src/zillow/client.ts","../src/immobiliare/client.ts","../src/loopnet/search.ts","../src/loopnet/listings.ts","../src/loopnet/brokers.ts","../src/loopnet/reference.ts","../src/loopnet/client.ts","../src/perplexity/client.ts","../src/depop/client.ts","../src/linkedin/client.ts","../src/chatgpt/ask.ts","../src/chatgpt/brand.ts","../src/chatgpt/reference.ts","../src/chatgpt/client.ts","../src/gemini/ask.ts","../src/gemini/brand.ts","../src/gemini/client.ts","../src/client.ts"],"names":["EventEmitter","WebSocket","createHmac","timingSafeEqual","UsersClient","SearchClient","TrendsClient","ProductsClient","ReferenceClient","VideosClient","HashtagsClient","ItemsClient","SellersClient","MediaClient","NewsClient","ImagesClient","ShortsClient","TrendingClient","MusicClient","AdsClient","PropertiesClient","ListingsClient","AskClient","BrandClient"],"mappings":";;;;;;;;;;;AAQO,IAAM,WAAA,GAAc,QAAA;;;ACDpB,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0B,KAAA,CAAM;AAAA,EAC3C,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,mBAAA;AACZ,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,kBAAA,CAAkB,SAAS,CAAA;AAAA,EACzD;AACF;AAKO,IAA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A,CAAc,IAAA,CAAK,UAAU,CAAA;AAChD,IAAA,IAAA,CAAK,OAAA,GAAU,IAAI,aAAA,CAAc,IAAA,CAAK,UAAU,CAAA;AAChD,IAAA,IAAA,CAAK,SAAA,GAAY,IAAI,eAAA,CAAgB,IAAA,CAAK,UAAU,CAAA;AACpD,IAAA,IAAA,CAAK,MAAA,GAAS,IAAI,YAAA,CAAa,IAAA,CAAK,UAAU,CAAA;AAC9C,IAAA,IAAA,CAAK,WAAA,GAAc,IAAI,iBAAA,CAAkB,IAAA,CAAK,UAAU,CAAA;AACxD,IAAA,IAAA,CAAK,OAAA,GAAU,IAAI,aAAA,CAAc,IAAA,CAAK,UAAU,CAAA;AAChD,IAAA,IAAA,CAAK,UAAA,GAAa,IAAI,gBAAA,CAAiB,IAAA,CAAK,UAAU,CAAA;AACtD,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAI,WAAA,CAAY,IAAA,CAAK,UAAU,CAAA;AAC5C,IAAA,IAAA,CAAK,QAAA,GAAW,IAAI,cAAA,CAAe,IAAA,CAAK,UAAU,CAAA;AAClD,IAAA,IAAA,CAAK,OAAA,GAAU,IAAI,aAAA,CAAc,IAAA,CAAK,UAAU,CAAA;AAChD,IAAA,IAAA,CAAK,MAAA,GAAS,IAAI,YAAA,CAAa,IAAA,CAAK,UAAU,CAAA;AAAA,EAChD;AACF","file":"index.js","sourcesContent":["/**\n * Single source-of-truth for the SDK version string.\n *\n * This constant is kept in sync with package.json by the release workflow.\n * It is used to set the User-Agent header on all outgoing requests.\n *\n * @internal\n */\nexport const SDK_VERSION = \"0.40.1\";\n","/**\n * Custom exceptions for the ScrapeBadger SDK.\n */\n\n/**\n * Base error class for all ScrapeBadger errors.\n */\nexport class ScrapeBadgerError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ScrapeBadgerError\";\n Object.setPrototypeOf(this, ScrapeBadgerError.prototype);\n }\n}\n\n/**\n * Raised when authentication fails (invalid or missing API key).\n */\nexport class AuthenticationError extends ScrapeBadgerError {\n constructor(message = \"Authentication failed. Check your API key.\") {\n super(message);\n this.name = \"AuthenticationError\";\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n}\n\n/**\n * Raised when rate limit is exceeded.\n */\nexport class RateLimitError extends ScrapeBadgerError {\n /** Unix timestamp when the rate limit resets */\n readonly retryAfter: number | undefined;\n /** Maximum requests per minute for this tier */\n readonly limit: number | undefined;\n /** Remaining requests in the current window */\n readonly remaining: number | undefined;\n\n constructor(\n message = \"Rate limit exceeded.\",\n options?: { retryAfter?: number; limit?: number; remaining?: number }\n ) {\n super(message);\n this.name = \"RateLimitError\";\n this.retryAfter = options?.retryAfter;\n this.limit = options?.limit;\n this.remaining = options?.remaining;\n Object.setPrototypeOf(this, RateLimitError.prototype);\n }\n}\n\n/**\n * Raised when the requested resource is not found.\n */\nexport class NotFoundError extends ScrapeBadgerError {\n /** The resource type that was not found */\n readonly resourceType: string | undefined;\n /** The resource ID that was not found */\n readonly resourceId: string | undefined;\n\n constructor(message = \"Resource not found.\", resourceType?: string, resourceId?: string) {\n super(message);\n this.name = \"NotFoundError\";\n this.resourceType = resourceType;\n this.resourceId = resourceId;\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n\n/**\n * Raised when the request is invalid.\n */\nexport class ValidationError extends ScrapeBadgerError {\n /** Validation errors by field */\n readonly errors: Record<string, string[]> | undefined;\n\n constructor(message = \"Validation error.\", errors?: Record<string, string[]>) {\n super(message);\n this.name = \"ValidationError\";\n this.errors = errors;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\n/**\n * Raised when an internal server error occurs.\n */\nexport class ServerError extends ScrapeBadgerError {\n /** HTTP status code */\n readonly statusCode: number;\n\n constructor(message = \"Internal server error.\", statusCode = 500) {\n super(message);\n this.name = \"ServerError\";\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n\n/**\n * Raised when the request times out.\n */\nexport class TimeoutError extends ScrapeBadgerError {\n /** Timeout duration in milliseconds */\n readonly timeout: number;\n\n constructor(message = \"Request timed out.\", timeout: number) {\n super(message);\n this.name = \"TimeoutError\";\n this.timeout = timeout;\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\n/**\n * Raised when the account has insufficient credits.\n */\nexport class InsufficientCreditsError extends ScrapeBadgerError {\n /** Current credit balance */\n readonly creditsBalance: number | undefined;\n\n constructor(message = \"Insufficient credits.\", creditsBalance?: number) {\n super(message);\n this.name = \"InsufficientCreditsError\";\n this.creditsBalance = creditsBalance;\n Object.setPrototypeOf(this, InsufficientCreditsError.prototype);\n }\n}\n\n/**\n * Raised when the account is restricted.\n */\nexport class AccountRestrictedError extends ScrapeBadgerError {\n /** Reason for the restriction */\n readonly reason: string | undefined;\n\n constructor(message = \"Account restricted.\", reason?: string) {\n super(message);\n this.name = \"AccountRestrictedError\";\n this.reason = reason;\n Object.setPrototypeOf(this, AccountRestrictedError.prototype);\n }\n}\n\n/**\n * Raised when a resource conflict occurs (e.g. duplicate monitor name).\n *\n * Maps to HTTP 409 Conflict.\n *\n * @example\n * ```typescript\n * import { ConflictError } from \"scrapebadger\";\n *\n * try {\n * await client.twitter.stream.createMonitor({\n * name: \"Existing Monitor\",\n * usernames: [\"elonmusk\"],\n * pollIntervalSeconds: 10,\n * });\n * } catch (err) {\n * if (err instanceof ConflictError) {\n * console.error(\"Monitor name already exists:\", err.message);\n * }\n * }\n * ```\n */\nexport class ConflictError extends ScrapeBadgerError {\n constructor(message = \"Resource conflict.\") {\n super(message);\n this.name = \"ConflictError\";\n Object.setPrototypeOf(this, ConflictError.prototype);\n }\n}\n\n/**\n * Raised when the WebSocket stream connection fails or is terminated.\n *\n * Common codes:\n * - 4001 -- Invalid or missing API key (auth failure)\n * - 4003 -- Connection limit exceeded (max 5 per API key)\n * - 1001 -- Server closed due to pong timeout\n * - 0 -- Unknown/parse error\n *\n * @example\n * ```typescript\n * import { WebSocketStreamError } from \"scrapebadger\";\n *\n * try {\n * for await (const event of client.twitter.stream.connectIter()) {\n * // ...\n * }\n * } catch (err) {\n * if (err instanceof WebSocketStreamError && err.code === 4001) {\n * console.error(\"API key rejected -- check your key\");\n * }\n * }\n * ```\n */\nexport class WebSocketStreamError extends ScrapeBadgerError {\n /** WebSocket close code or server error code */\n readonly code: number | undefined;\n\n constructor(message = \"WebSocket stream error\", code?: number) {\n super(message);\n this.name = \"WebSocketStreamError\";\n this.code = code;\n Object.setPrototypeOf(this, WebSocketStreamError.prototype);\n }\n}\n","/**\n * Base HTTP client with retry logic and error handling.\n */\n\nimport type { ResolvedConfig } from \"./config.js\";\nimport { SDK_VERSION } from \"./version.js\";\nimport {\n AuthenticationError,\n RateLimitError,\n NotFoundError,\n ValidationError,\n ServerError,\n TimeoutError,\n InsufficientCreditsError,\n AccountRestrictedError,\n ConflictError,\n ScrapeBadgerError,\n} from \"./exceptions.js\";\n\n/**\n * Server-side status codes worth retrying.\n *\n * A transient 500 is no more permanent than a 502, and both clear on a retry\n * far more often than not. Kept in step with the Python SDK's `retry_on_status`.\n */\nconst RETRYABLE_STATUS_CODES = [500, 502, 503, 504];\n\nexport interface RateLimit {\n limit: number;\n remaining: number;\n reset: number; // unix timestamp\n}\n\nexport interface ResponseWithHeaders<T> {\n data: T;\n rateLimit?: RateLimit;\n}\n\nexport interface RequestOptions {\n method?: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\";\n params?: Record<string, string | number | boolean | undefined>;\n body?: unknown;\n headers?: Record<string, string>;\n}\n\ninterface ErrorResponse {\n detail?: string;\n message?: string;\n errors?: Record<string, string[]>;\n limit?: number;\n remaining?: number;\n reset_at?: number;\n reason?: string;\n credits_balance?: number;\n}\n\n/**\n * Base HTTP client for making API requests.\n */\nexport class BaseClient {\n readonly config: ResolvedConfig;\n\n constructor(config: ResolvedConfig) {\n this.config = config;\n }\n\n /**\n * Make an HTTP request to the API.\n */\n async request<T>(path: string, options: RequestOptions = {}): Promise<T> {\n const { data } = await this.requestRaw<T>(path, options);\n return data;\n }\n\n /**\n * POST and return the undecoded response body.\n *\n * For endpoints that answer with something other than JSON — currently\n * `/v1/web/scrape` with `raw_content: true`, which returns the scraped body\n * itself. The normal path funnels a non-JSON response into\n * `{ detail: await response.text() }`, which both loses the result and, for\n * a binary payload, corrupts it: `text()` decodes bytes as UTF-8.\n *\n * Returns the raw bytes plus the response headers.\n */\n async postBinary(\n path: string,\n options: RequestOptions = {}\n ): Promise<{ bytes: Uint8Array; headers: Headers; status: number }> {\n const url = new URL(path, this.config.baseUrl);\n const { body, headers = {} } = options;\n\n const response = await this.fetchWithTimeout(url.toString(), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-API-Key\": this.config.apiKey,\n \"User-Agent\": `scrapebadger-node/${SDK_VERSION}`,\n ...headers,\n },\n body: body ? JSON.stringify(body) : undefined,\n });\n\n if (!response.ok) {\n // Let the shared error mapping raise the right typed error.\n await this.handleResponse<unknown>(response);\n }\n\n return {\n bytes: new Uint8Array(await response.arrayBuffer()),\n headers: response.headers,\n status: response.status,\n };\n }\n\n /**\n * Make an HTTP request and return both data and rate limit headers.\n */\n async requestWithHeaders<T>(\n path: string,\n options: RequestOptions = {}\n ): Promise<ResponseWithHeaders<T>> {\n return this.requestRaw<T>(path, options);\n }\n\n /**\n * Internal method that builds the request and executes it, returning data and rate limit info.\n */\n private async requestRaw<T>(\n path: string,\n options: RequestOptions = {}\n ): Promise<ResponseWithHeaders<T>> {\n const { method = \"GET\", params, body, headers = {} } = options;\n\n // Build URL with query parameters\n const url = new URL(path, this.config.baseUrl);\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n // Build headers\n const requestHeaders: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"X-API-Key\": this.config.apiKey,\n \"User-Agent\": `scrapebadger-node/${SDK_VERSION}`,\n ...headers,\n };\n\n // Build request options\n const fetchOptions: RequestInit = {\n method,\n headers: requestHeaders,\n };\n\n if (body && method !== \"GET\") {\n fetchOptions.body = JSON.stringify(body);\n }\n\n // Execute with retry logic\n return this.executeWithRetry<T>(url.toString(), fetchOptions);\n }\n\n /**\n * Execute request with exponential backoff retry logic.\n */\n private async executeWithRetry<T>(\n url: string,\n options: RequestInit\n ): Promise<ResponseWithHeaders<T>> {\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {\n try {\n const httpResponse = await this.fetchWithTimeout(url, options);\n const data = await this.handleResponse<T>(httpResponse);\n const rateLimit = this.parseRateLimitHeaders(httpResponse.headers);\n return { data, rateLimit };\n } catch (error) {\n lastError = error as Error;\n\n // Client errors (auth, validation, not-found) are final — retrying only\n // delays the throw. Transient server failures and timeouts fall through.\n if (!BaseClient.isRetryable(error)) {\n throw error;\n }\n\n // Don't retry after exhausting attempts\n if (attempt === this.config.maxRetries) {\n break;\n }\n\n // Calculate delay with exponential backoff\n const delay = this.config.retryDelay * Math.pow(2, attempt);\n const delaySec = Math.round(delay / 1000);\n const attemptNum = attempt + 1;\n const maxRetries = this.config.maxRetries;\n\n // Warn with ANSI yellow coloring\n if (error instanceof RateLimitError) {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: 429 Rate Limited — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n // For rate limits, use retry-after if available\n if (error.retryAfter) {\n const retryDelay = (error.retryAfter - Date.now() / 1000) * 1000;\n if (retryDelay > 0 && retryDelay < 60000) {\n await this.sleep(retryDelay);\n continue;\n }\n }\n } else if (error instanceof TimeoutError) {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: TimeoutError — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n } else if (error instanceof ServerError) {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: ${error.statusCode} ${error.message} — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n } else {\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: ${(error as Error).name} — retrying in ${delaySec}s (attempt ${attemptNum}/${maxRetries})\\x1b[0m`\n );\n }\n\n await this.sleep(delay);\n }\n }\n\n throw lastError ?? new ScrapeBadgerError(\"Request failed after retries\");\n }\n\n /**\n * Parse rate limit headers from an HTTP response.\n */\n private parseRateLimitHeaders(headers: Headers): RateLimit | undefined {\n const limit = headers.get(\"X-RateLimit-Limit\");\n const remaining = headers.get(\"X-RateLimit-Remaining\");\n const reset = headers.get(\"X-RateLimit-Reset\");\n\n if (limit === null || remaining === null || reset === null) {\n return undefined;\n }\n\n const parsedLimit = parseInt(limit, 10);\n const parsedRemaining = parseInt(remaining, 10);\n const parsedReset = parseInt(reset, 10);\n\n if (isNaN(parsedLimit) || isNaN(parsedRemaining) || isNaN(parsedReset)) {\n return undefined;\n }\n\n return { limit: parsedLimit, remaining: parsedRemaining, reset: parsedReset };\n }\n\n /**\n * Fetch with timeout support.\n */\n private async fetchWithTimeout(url: string, options: RequestInit): Promise<Response> {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);\n\n try {\n const response = await fetch(url, {\n ...options,\n signal: controller.signal,\n });\n return response;\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n throw new TimeoutError(\n `Request timed out after ${this.config.timeout}ms`,\n this.config.timeout\n );\n }\n throw error;\n } finally {\n clearTimeout(timeoutId);\n }\n }\n\n /**\n * Handle HTTP response and convert errors.\n */\n private async handleResponse<T>(response: Response): Promise<T> {\n // Parse response body\n let data: T | ErrorResponse;\n const contentType = response.headers.get(\"content-type\");\n\n if (contentType?.includes(\"application/json\")) {\n data = (await response.json()) as T | ErrorResponse;\n } else {\n const text = await response.text();\n data = { detail: text } as ErrorResponse;\n }\n\n // Handle success\n if (response.ok) {\n return data as T;\n }\n\n // Handle errors\n const errorData = data as ErrorResponse;\n const message = errorData.detail ?? errorData.message ?? \"Request failed\";\n\n switch (response.status) {\n case 401:\n throw new AuthenticationError(message);\n\n case 402:\n throw new InsufficientCreditsError(message, errorData.credits_balance);\n\n case 403:\n if (message.toLowerCase().includes(\"restricted\")) {\n throw new AccountRestrictedError(message, errorData.reason);\n }\n throw new AuthenticationError(message);\n\n case 404:\n throw new NotFoundError(message);\n\n case 409:\n throw new ConflictError(message);\n\n case 422:\n throw new ValidationError(message, errorData.errors);\n\n case 429:\n throw new RateLimitError(message, {\n retryAfter: errorData.reset_at,\n limit: errorData.limit,\n remaining: errorData.remaining,\n });\n\n default:\n if (response.status >= 500) {\n throw new ServerError(message, response.status);\n }\n throw new ScrapeBadgerError(message);\n }\n }\n\n /**\n * Whether a failed request is worth another attempt.\n *\n * Retryable: transient server failures (500/502/503/504), request timeouts,\n * rate limits, and raw network faults thrown by `fetch` itself. Everything\n * else — auth, validation, not-found, conflict — is final.\n */\n private static isRetryable(error: unknown): boolean {\n if (error instanceof ServerError) {\n return RETRYABLE_STATUS_CODES.includes(error.statusCode);\n }\n if (error instanceof RateLimitError || error instanceof TimeoutError) {\n return true;\n }\n // Anything that isn't one of ours is a network-level fault from fetch.\n return !(error instanceof ScrapeBadgerError);\n }\n\n /**\n * Sleep for a given duration.\n */\n private sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n}\n","/**\n * Configuration management for the ScrapeBadger SDK.\n */\n\nexport interface ScrapeBadgerConfig {\n /** API key for authentication */\n apiKey: string;\n /** Base URL for the API (default: https://scrapebadger.com) */\n baseUrl?: string;\n /** Request timeout in milliseconds (default: 30000) */\n timeout?: number;\n /** Maximum number of retry attempts (default: 3) */\n maxRetries?: number;\n /** Initial retry delay in milliseconds (default: 1000) */\n retryDelay?: number;\n}\n\nexport interface ResolvedConfig {\n apiKey: string;\n baseUrl: string;\n timeout: number;\n maxRetries: number;\n retryDelay: number;\n}\n\nconst DEFAULT_BASE_URL = \"https://scrapebadger.com\";\nconst DEFAULT_TIMEOUT = 30000;\nconst DEFAULT_MAX_RETRIES = 10;\nconst DEFAULT_RETRY_DELAY = 1000;\n\n/**\n * Resolve configuration with defaults.\n */\nexport function resolveConfig(config: ScrapeBadgerConfig): ResolvedConfig {\n if (!config.apiKey) {\n throw new Error(\"API key is required\");\n }\n\n return {\n apiKey: config.apiKey,\n baseUrl: config.baseUrl ?? DEFAULT_BASE_URL,\n timeout: config.timeout ?? DEFAULT_TIMEOUT,\n maxRetries: config.maxRetries ?? DEFAULT_MAX_RETRIES,\n retryDelay: config.retryDelay ?? DEFAULT_RETRY_DELAY,\n };\n}\n\n/**\n * Load API key from environment variable.\n */\nexport function getApiKeyFromEnv(): string | undefined {\n if (typeof process !== \"undefined\" && process.env) {\n return process.env.SCRAPEBADGER_API_KEY;\n }\n return undefined;\n}\n","/**\n * Pagination utilities for the ScrapeBadger SDK.\n */\n\nimport type { RateLimit } from \"./client.js\";\n\n/**\n * Response wrapper for paginated API responses.\n */\nexport interface PaginatedResponse<T> {\n /** Array of items in the current page */\n data: T[];\n /** Cursor for the next page, if available */\n nextCursor?: string;\n /** Whether there are more pages available */\n hasMore: boolean;\n}\n\n/**\n * Options for paginated requests.\n */\nexport interface PaginationOptions {\n /** Maximum number of items to fetch per request (default: 20) */\n count?: number;\n /** Cursor for pagination */\n cursor?: string;\n}\n\n/**\n * Options for async iteration.\n */\nexport interface IteratorOptions extends PaginationOptions {\n /** Maximum total number of items to fetch (default: unlimited) */\n maxItems?: number;\n}\n\n/**\n * Page result returned by fetchPage callbacks passed to paginate().\n */\nexport interface PageResult<T> {\n response: PaginatedResponse<T>;\n rateLimit?: RateLimit;\n}\n\n/**\n * Create a paginated response from API response data.\n */\nexport function createPaginatedResponse<T>(data: T[], cursor?: string): PaginatedResponse<T> {\n return {\n data,\n nextCursor: cursor,\n hasMore: !!cursor,\n };\n}\n\nconst RATE_LIMIT_WARN_THRESHOLD = 0.2;\n\n/**\n * Async generator for paginating through API results.\n *\n * Automatically throttles when fewer than 20% of rate limit requests remain,\n * spreading requests across the remaining reset window.\n *\n * @param fetchPage - Function to fetch a single page; returns response + optional rate limit info\n * @param options - Pagination options\n * @yields Individual items from each page\n *\n * @example\n * ```typescript\n * // Iterate through all results\n * for await (const tweet of client.twitter.tweets.searchAll(\"query\")) {\n * console.log(tweet.text);\n * }\n *\n * // With max items limit\n * for await (const tweet of client.twitter.tweets.searchAll(\"query\", { maxItems: 100 })) {\n * console.log(tweet.text);\n * }\n * ```\n */\nexport async function* paginate<T>(\n fetchPage: (cursor?: string) => Promise<PageResult<T>>,\n options: IteratorOptions = {}\n): AsyncGenerator<T, void, undefined> {\n const { maxItems } = options;\n let cursor: string | undefined;\n let totalYielded = 0;\n\n do {\n const { response, rateLimit } = await fetchPage(cursor);\n\n // Throttle pagination when approaching rate limit\n if (rateLimit) {\n const { limit, remaining, reset } = rateLimit;\n if (limit > 0 && remaining / limit < RATE_LIMIT_WARN_THRESHOLD) {\n const nowSec = Date.now() / 1000;\n const windowRemainingSec = Math.max(reset - nowSec, 1);\n const delayMs =\n remaining > 0 ? (windowRemainingSec / remaining) * 1000 : windowRemainingSec * 1000;\n const resetInSec = Math.round(windowRemainingSec);\n console.warn(\n `\\x1b[33m⚠ ScrapeBadger: Rate limit: ${remaining}/${limit} remaining (resets in ${resetInSec}s), throttling pagination\\x1b[0m`\n );\n await sleep(delayMs);\n }\n }\n\n for (const item of response.data) {\n yield item;\n totalYielded++;\n\n if (maxItems !== undefined && totalYielded >= maxItems) {\n return;\n }\n }\n\n cursor = response.nextCursor;\n } while (cursor);\n}\n\n/**\n * Collect all items from an async generator into an array.\n *\n * @param generator - Async generator to collect from\n * @returns Array of all yielded items\n *\n * @example\n * ```typescript\n * const tweets = await collectAll(client.twitter.tweets.searchAll(\"query\", { maxItems: 100 }));\n * console.log(`Fetched ${tweets.length} tweets`);\n * ```\n */\nexport async function collectAll<T>(generator: AsyncGenerator<T, void, undefined>): Promise<T[]> {\n const items: T[] = [];\n for await (const item of generator) {\n items.push(item);\n }\n return items;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/**\n * Twitter Tweets API client.\n *\n * Provides methods for fetching tweets, searching, and getting tweet metadata.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { Tweet, User, QueryType, Article, CommunityNote } from \"./types.js\";\n\n/**\n * Client for Twitter tweets endpoints.\n *\n * Provides async methods for fetching individual tweets, searching tweets,\n * and getting tweet engagement data (retweeters, favoriters, replies).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get single tweet\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n *\n * // Search tweets\n * const results = await client.twitter.tweets.search(\"python programming\");\n * for (const tweet of results.data) {\n * console.log(tweet.text);\n * }\n *\n * // Iterate through all results\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\")) {\n * console.log(tweet.text);\n * }\n * ```\n */\nexport class TweetsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single tweet by ID.\n *\n * @param tweetId - The tweet ID to fetch.\n * @returns The tweet data.\n * @throws NotFoundError - If the tweet doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n * console.log(`@${tweet.username}: ${tweet.text}`);\n * ```\n */\n async getById(tweetId: string): Promise<Tweet> {\n return this.client.request<Tweet>(`/v1/twitter/tweets/tweet/${tweetId}`);\n }\n\n /**\n * Get multiple tweets by their IDs.\n *\n * @param tweetIds - List of tweet IDs to fetch.\n * @returns Paginated response containing the tweets.\n *\n * @example\n * ```typescript\n * const tweets = await client.twitter.tweets.getByIds([\n * \"1234567890\",\n * \"0987654321\"\n * ]);\n * for (const tweet of tweets.data) {\n * console.log(tweet.text);\n * }\n * ```\n */\n async getByIds(tweetIds: string[]): Promise<PaginatedResponse<Tweet>> {\n const tweetsParam = tweetIds.join(\",\");\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n \"/v1/twitter/tweets/\",\n { params: { tweets: tweetsParam } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get replies to a tweet.\n *\n * @param tweetId - The tweet ID to get replies for.\n * @param options - Pagination options.\n * @returns Paginated response containing reply tweets.\n *\n * @example\n * ```typescript\n * const replies = await client.twitter.tweets.getReplies(\"1234567890\");\n * for (const reply of replies.data) {\n * console.log(`@${reply.username}: ${reply.text}`);\n * }\n *\n * // Get next page\n * if (replies.hasMore) {\n * const more = await client.twitter.tweets.getReplies(\"1234567890\", {\n * cursor: replies.nextCursor\n * });\n * }\n * ```\n */\n async getReplies(\n tweetId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/replies`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get users who retweeted a tweet.\n *\n * @param tweetId - The tweet ID to get retweeters for.\n * @param options - Pagination options.\n * @returns Paginated response containing users who retweeted.\n *\n * @example\n * ```typescript\n * const retweeters = await client.twitter.tweets.getRetweeters(\"1234567890\");\n * for (const user of retweeters.data) {\n * console.log(`@${user.username} retweeted`);\n * }\n * ```\n */\n async getRetweeters(\n tweetId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/retweeters`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get users who liked/favorited a tweet.\n *\n * @param tweetId - The tweet ID to get favoriters for.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing users who liked.\n *\n * @example\n * ```typescript\n * const likers = await client.twitter.tweets.getFavoriters(\"1234567890\");\n * console.log(`${likers.data.length} users liked this tweet`);\n * ```\n */\n async getFavoriters(\n tweetId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/favoriters`,\n { params: { count: options.count ?? 40, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get tweets similar to a given tweet.\n *\n * @param tweetId - The tweet ID to find similar tweets for.\n * @returns Paginated response containing similar tweets.\n *\n * @example\n * ```typescript\n * const similar = await client.twitter.tweets.getSimilar(\"1234567890\");\n * for (const tweet of similar.data) {\n * console.log(`Similar: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getSimilar(tweetId: string): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/similar`\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get tweets that quote a specific tweet.\n *\n * @param tweetId - The tweet ID to get quote tweets for.\n * @param options - Pagination options.\n * @returns Paginated response containing tweets that quote this tweet.\n *\n * @example\n * ```typescript\n * const quotes = await client.twitter.tweets.getQuotes(\"1234567890\");\n * for (const quote of quotes.data) {\n * console.log(`@${quote.username} quoted: ${quote.text.slice(0, 100)}...`);\n * }\n *\n * // Get next page\n * if (quotes.hasMore) {\n * const more = await client.twitter.tweets.getQuotes(\"1234567890\", {\n * cursor: quotes.nextCursor\n * });\n * }\n * ```\n */\n async getQuotes(\n tweetId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/tweets/tweet/${tweetId}/quotes`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all quote tweets with automatic pagination.\n *\n * This is a convenience method that automatically handles pagination,\n * yielding quote tweets one at a time.\n *\n * @param tweetId - The tweet ID to get quote tweets for.\n * @param options - Iteration options.\n * @yields Tweet objects that quote the specified tweet.\n *\n * @example\n * ```typescript\n * // Get all quote tweets (up to 500)\n * for await (const quote of client.twitter.tweets.getQuotesAll(\"1234567890\", {\n * maxItems: 500\n * })) {\n * console.log(`@${quote.username}: ${quote.text}`);\n * }\n *\n * // Collect into an array\n * import { collectAll } from \"scrapebadger\";\n * const quotes = await collectAll(\n * client.twitter.tweets.getQuotesAll(\"1234567890\", { maxItems: 100 })\n * );\n * ```\n */\n async *getQuotesAll(\n tweetId: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/tweets/tweet/${tweetId}/quotes`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Search for tweets.\n *\n * @param query - Search query string. Supports Twitter advanced search operators.\n * @param options - Search options including query type and pagination.\n * @returns Paginated response containing matching tweets.\n *\n * @example\n * ```typescript\n * // Basic search\n * const results = await client.twitter.tweets.search(\"python programming\");\n *\n * // Latest tweets only\n * const latest = await client.twitter.tweets.search(\"python\", {\n * queryType: \"Latest\"\n * });\n *\n * // Advanced search operators\n * const fromUser = await client.twitter.tweets.search(\"from:elonmusk lang:en\");\n * ```\n */\n async search(\n query: string,\n options: PaginationOptions & { queryType?: QueryType; count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n \"/v1/twitter/tweets/advanced_search\",\n {\n params: {\n query,\n query_type: options.queryType ?? \"Top\",\n count: options.count,\n cursor: options.cursor,\n },\n }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all search results with automatic pagination.\n *\n * This is a convenience method that automatically handles pagination,\n * yielding tweets one at a time.\n *\n * @param query - Search query string.\n * @param options - Search and iteration options.\n * @yields Tweet objects matching the search query.\n *\n * @example\n * ```typescript\n * // Get up to 1000 tweets\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\", {\n * maxItems: 1000\n * })) {\n * console.log(tweet.text);\n * }\n *\n * // Collect into an array\n * import { collectAll } from \"scrapebadger\";\n * const tweets = await collectAll(\n * client.twitter.tweets.searchAll(\"python\", { maxItems: 100 })\n * );\n * ```\n */\n async *searchAll(\n query: string,\n options: IteratorOptions & { queryType?: QueryType; count?: number } = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(\"/v1/twitter/tweets/advanced_search\", {\n params: {\n query,\n query_type: options.queryType ?? \"Top\",\n count: options.count,\n cursor,\n },\n });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get tweets from a user's timeline.\n *\n * @param username - Twitter username (without @).\n * @param options - Pagination options.\n * @returns Paginated response containing the user's tweets.\n *\n * @example\n * ```typescript\n * const tweets = await client.twitter.tweets.getUserTweets(\"elonmusk\");\n * for (const tweet of tweets.data) {\n * console.log(`${tweet.created_at}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getUserTweets(\n username: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/latest_tweets`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all tweets from a user with automatic pagination.\n *\n * @param username - Twitter username (without @).\n * @param options - Iteration options.\n * @yields Tweet objects from the user's timeline.\n *\n * @example\n * ```typescript\n * for await (const tweet of client.twitter.tweets.getUserTweetsAll(\"elonmusk\", {\n * maxItems: 500\n * })) {\n * console.log(tweet.text);\n * }\n * ```\n */\n async *getUserTweetsAll(\n username: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/users/${username}/latest_tweets`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get the edit history of a tweet.\n *\n * @param tweetId - The tweet ID to get edit history for.\n * @returns Paginated response containing tweet versions.\n *\n * @example\n * ```typescript\n * const history = await client.twitter.tweets.getEditHistory(\"1234567890\");\n * console.log(`${history.data.length} version(s) of this tweet`);\n * ```\n */\n async getEditHistory(tweetId: string): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[] }>(\n `/v1/twitter/tweets/tweet/${tweetId}/edit_history`\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get community notes (Birdwatch) attached to a tweet.\n *\n * @param tweetId - The tweet ID to get community notes for.\n * @returns Paginated response containing community notes.\n *\n * @example\n * ```typescript\n * const notes = await client.twitter.tweets.getCommunityNotes(\"1234567890\");\n * for (const note of notes.data) {\n * console.log(note.text);\n * }\n * ```\n */\n async getCommunityNotes(tweetId: string): Promise<PaginatedResponse<CommunityNote>> {\n const response = await this.client.request<{ data?: CommunityNote[] }>(\n `/v1/twitter/tweets/tweet/${tweetId}/community_notes`\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get a long-form article by its ID.\n *\n * @param articleId - The article ID to fetch.\n * @returns The article data.\n *\n * @example\n * ```typescript\n * const article = await client.twitter.tweets.getArticle(\"abc123\");\n * console.log(`${article.title}: ${article.text?.slice(0, 100)}...`);\n * ```\n */\n async getArticle(articleId: string): Promise<Article> {\n return this.client.request<Article>(`/v1/twitter/tweets/article/${articleId}`);\n }\n}\n","/**\n * Twitter Users API client.\n *\n * Provides methods for fetching user profiles, followers, following, and related data.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { User, UserAbout, UserIds, Tweet } from \"./types.js\";\n\n/**\n * Client for Twitter users endpoints.\n *\n * Provides async methods for fetching user profiles, followers, following,\n * and other user-related data.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get user profile\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n * console.log(`${user.name}: ${user.followers_count.toLocaleString()} followers`);\n *\n * // Get followers\n * const followers = await client.twitter.users.getFollowers(\"elonmusk\");\n *\n * // Iterate through all followers\n * for await (const follower of client.twitter.users.getFollowersAll(\"elonmusk\")) {\n * console.log(follower.username);\n * }\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a user by their numeric ID.\n *\n * @param userId - The user's numeric ID.\n * @returns The user profile.\n * @throws NotFoundError - If the user doesn't exist.\n *\n * @example\n * ```typescript\n * const user = await client.twitter.users.getById(\"44196397\");\n * console.log(`@${user.username}`);\n * ```\n */\n async getById(userId: string): Promise<User> {\n return this.client.request<User>(`/v1/twitter/users/${userId}/by_id`);\n }\n\n /**\n * Get a user by their username.\n *\n * @param username - The user's username (without @).\n * @returns The user profile.\n * @throws NotFoundError - If the user doesn't exist.\n *\n * @example\n * ```typescript\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n * console.log(`${user.name} has ${user.followers_count.toLocaleString()} followers`);\n * ```\n */\n async getByUsername(username: string): Promise<User> {\n return this.client.request<User>(`/v1/twitter/users/${username}/by_username`);\n }\n\n /**\n * Get extended \"About\" information for a user.\n *\n * Returns additional metadata including account location,\n * username change history, and verification details.\n *\n * @param username - The user's username (without @).\n * @returns Extended user information.\n *\n * @example\n * ```typescript\n * const about = await client.twitter.users.getAbout(\"elonmusk\");\n * console.log(`Account based in: ${about.account_based_in}`);\n * console.log(`Username changes: ${about.username_changes}`);\n * ```\n */\n async getAbout(username: string): Promise<UserAbout> {\n return this.client.request<UserAbout>(`/v1/twitter/users/${username}/about`);\n }\n\n /**\n * Get a user's followers.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options.\n * @returns Paginated response containing follower users.\n *\n * @example\n * ```typescript\n * const followers = await client.twitter.users.getFollowers(\"elonmusk\");\n * for (const user of followers.data) {\n * console.log(`@${user.username}`);\n * }\n *\n * // Get next page\n * if (followers.hasMore) {\n * const more = await client.twitter.users.getFollowers(\"elonmusk\", {\n * cursor: followers.nextCursor\n * });\n * }\n * ```\n */\n async getFollowers(\n username: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/followers`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all followers with automatic pagination.\n *\n * @param username - The user's username (without @).\n * @param options - Iteration options.\n * @yields User objects for each follower.\n *\n * @example\n * ```typescript\n * for await (const follower of client.twitter.users.getFollowersAll(\"elonmusk\", {\n * maxItems: 1000\n * })) {\n * console.log(follower.username);\n * }\n * ```\n */\n async *getFollowersAll(\n username: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(`/v1/twitter/users/${username}/followers`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get users that a user is following.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options.\n * @returns Paginated response containing followed users.\n *\n * @example\n * ```typescript\n * const following = await client.twitter.users.getFollowing(\"elonmusk\");\n * for (const user of following.data) {\n * console.log(`Follows @${user.username}`);\n * }\n * ```\n */\n async getFollowing(\n username: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/followings`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all following with automatic pagination.\n *\n * @param username - The user's username (without @).\n * @param options - Iteration options.\n * @yields User objects for each followed account.\n */\n async *getFollowingAll(\n username: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(`/v1/twitter/users/${username}/followings`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get a user's most recent followers.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing recent followers.\n */\n async getLatestFollowers(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/latest_followers`,\n { params: { count: options.count ?? 200, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get accounts a user most recently followed.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing recently followed users.\n */\n async getLatestFollowing(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/latest_following`,\n { params: { count: options.count ?? 200, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get follower IDs for a user.\n *\n * More efficient than getFollowers when you only need IDs.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns UserIds containing list of follower IDs.\n *\n * @example\n * ```typescript\n * const ids = await client.twitter.users.getFollowerIds(\"elonmusk\");\n * console.log(`Found ${ids.ids.length.toLocaleString()} follower IDs`);\n * ```\n */\n async getFollowerIds(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<UserIds> {\n const response = await this.client.request<{ data?: { ids?: number[]; next_cursor?: string } }>(\n `/v1/twitter/users/${username}/follower_ids`,\n { params: { count: options.count ?? 5000, cursor: options.cursor } }\n );\n return {\n ids: response.data?.ids ?? [],\n next_cursor: response.data?.next_cursor,\n };\n }\n\n /**\n * Get following IDs for a user.\n *\n * More efficient than getFollowing when you only need IDs.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns UserIds containing list of following IDs.\n */\n async getFollowingIds(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<UserIds> {\n const response = await this.client.request<{ data?: { ids?: number[]; next_cursor?: string } }>(\n `/v1/twitter/users/${username}/following_ids`,\n { params: { count: options.count ?? 5000, cursor: options.cursor } }\n );\n return {\n ids: response.data?.ids ?? [],\n next_cursor: response.data?.next_cursor,\n };\n }\n\n /**\n * Get verified followers for a user.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing verified followers.\n */\n async getVerifiedFollowers(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/verified_followers`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get followers that the authenticated user also follows.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing mutual connections.\n */\n async getFollowersYouKnow(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/followers_you_know`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get premium accounts that a user subscribes to.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing subscribed accounts.\n */\n async getSubscriptions(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/subscriptions`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get a user's highlighted tweets.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing highlighted tweets.\n */\n async getHighlights(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/highlights`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search for users.\n *\n * @param query - Search query string.\n * @param options - Pagination options.\n * @returns Paginated response containing matching users.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.users.search(\"python developer\");\n * for (const user of results.data) {\n * console.log(`@${user.username}: ${user.description}`);\n * }\n * ```\n */\n async search(query: string, options: PaginationOptions = {}): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n \"/v1/twitter/users/search_users\",\n { params: { query, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all search results with automatic pagination.\n *\n * @param query - Search query string.\n * @param options - Iteration options.\n * @yields User objects matching the search query.\n */\n async *searchAll(\n query: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(\"/v1/twitter/users/search_users\", { params: { query, cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get multiple users by their numeric IDs in a single request.\n *\n * @param userIds - List of user IDs to fetch.\n * @returns Paginated response containing the matching users.\n *\n * @example\n * ```typescript\n * const users = await client.twitter.users.getByIds([\"44196397\", \"783214\"]);\n * for (const user of users.data) {\n * console.log(`@${user.username}`);\n * }\n * ```\n */\n async getByIds(userIds: string[]): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[] }>(\n \"/v1/twitter/users/batch_by_ids\",\n { params: { user_ids: userIds.join(\",\") } }\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get multiple users by their usernames in a single request.\n *\n * @param usernames - List of usernames (without @) to fetch.\n * @returns Paginated response containing the matching users.\n *\n * @example\n * ```typescript\n * const users = await client.twitter.users.getByUsernames([\"elonmusk\", \"twitter\"]);\n * for (const user of users.data) {\n * console.log(`${user.name}: ${user.followers_count?.toLocaleString()} followers`);\n * }\n * ```\n */\n async getByUsernames(usernames: string[]): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[] }>(\n \"/v1/twitter/users/batch_by_usernames\",\n { params: { usernames: usernames.join(\",\") } }\n );\n return createPaginatedResponse(response.data ?? [], undefined);\n }\n\n /**\n * Get tweets that mention a user.\n *\n * @param username - The user's username (without @).\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing tweets mentioning the user.\n *\n * @example\n * ```typescript\n * const mentions = await client.twitter.users.getMentions(\"elonmusk\");\n * for (const tweet of mentions.data) {\n * console.log(`@${tweet.username}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getMentions(\n username: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${username}/mentions`,\n { params: { count: options.count, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get long-form articles authored by a user.\n *\n * @param userId - The user's numeric ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing the user's articles as tweets.\n *\n * @example\n * ```typescript\n * const articles = await client.twitter.users.getArticles(\"44196397\");\n * for (const article of articles.data) {\n * console.log(article.text?.slice(0, 100));\n * }\n * ```\n */\n async getArticles(\n userId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/users/${userId}/articles`,\n { params: { count: options.count, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n}\n","/**\n * Twitter Lists API client.\n *\n * Provides methods for fetching Twitter lists, list members, and list tweets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { List, Tweet, User } from \"./types.js\";\n\n/**\n * Client for Twitter lists endpoints.\n *\n * Provides async methods for fetching list details, members, subscribers,\n * and tweets from lists.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search for lists\n * const lists = await client.twitter.lists.search(\"tech leaders\");\n *\n * // Get list details\n * const list = await client.twitter.lists.getDetail(\"123456\");\n * console.log(`${list.name}: ${list.member_count} members`);\n *\n * // Get list tweets\n * const tweets = await client.twitter.lists.getTweets(\"123456\");\n * ```\n */\nexport class ListsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get details for a specific list.\n *\n * @param listId - The list ID.\n * @returns The list details.\n * @throws NotFoundError - If the list doesn't exist.\n *\n * @example\n * ```typescript\n * const list = await client.twitter.lists.getDetail(\"123456\");\n * console.log(`${list.name} by @${list.username}`);\n * console.log(`${list.member_count} members, ${list.subscriber_count} subscribers`);\n * ```\n */\n async getDetail(listId: string): Promise<List> {\n return this.client.request<List>(`/v1/twitter/lists/${listId}/detail`);\n }\n\n /**\n * Get tweets from a list's timeline.\n *\n * @param listId - The list ID.\n * @param options - Pagination options.\n * @returns Paginated response containing tweets from list members.\n *\n * @example\n * ```typescript\n * const tweets = await client.twitter.lists.getTweets(\"123456\");\n * for (const tweet of tweets.data) {\n * console.log(`@${tweet.username}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async getTweets(\n listId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/tweets`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all list tweets with automatic pagination.\n *\n * @param listId - The list ID.\n * @param options - Iteration options.\n * @yields Tweet objects from the list timeline.\n */\n async *getTweetsAll(\n listId: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/lists/${listId}/tweets`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get members of a list.\n *\n * @param listId - The list ID.\n * @param options - Pagination options.\n * @returns Paginated response containing list members.\n *\n * @example\n * ```typescript\n * const members = await client.twitter.lists.getMembers(\"123456\");\n * for (const user of members.data) {\n * console.log(`@${user.username}`);\n * }\n * ```\n */\n async getMembers(\n listId: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/members`,\n { params: { cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all list members with automatic pagination.\n *\n * @param listId - The list ID.\n * @param options - Iteration options.\n * @yields User objects for each list member.\n */\n async *getMembersAll(\n listId: string,\n options: IteratorOptions = {}\n ): AsyncGenerator<User, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<User>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: User[];\n next_cursor?: string;\n }>(`/v1/twitter/lists/${listId}/members`, { params: { cursor } });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get subscribers of a list.\n *\n * @param listId - The list ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing list subscribers.\n */\n async getSubscribers(\n listId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<User>> {\n const response = await this.client.request<{ data?: User[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/subscribers`,\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search for lists.\n *\n * @param query - Search query string.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing matching lists.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.lists.search(\"tech leaders\");\n * for (const list of results.data) {\n * console.log(`${list.name}: ${list.member_count} members`);\n * }\n * ```\n */\n async search(\n query: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<List>> {\n const response = await this.client.request<{ data?: List[]; next_cursor?: string }>(\n \"/v1/twitter/lists/search\",\n { params: { query, count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get lists owned by the authenticated user.\n *\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing the user's lists.\n */\n async getMyLists(\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<List>> {\n const response = await this.client.request<{ data?: List[]; next_cursor?: string }>(\n \"/v1/twitter/lists/my_lists\",\n { params: { count: options.count ?? 100, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search tweets within a specific list.\n *\n * @param listId - The list ID to search within.\n * @param query - Search query string.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing matching tweets from the list.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.lists.searchTweets(\"123456\", \"python\");\n * for (const tweet of results.data) {\n * console.log(`@${tweet.username}: ${tweet.text.slice(0, 100)}...`);\n * }\n * ```\n */\n async searchTweets(\n listId: string,\n query: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/lists/${listId}/search_tweets`,\n { params: { query, count: options.count, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n}\n","/**\n * Twitter Communities API client.\n *\n * Provides methods for fetching Twitter communities, members, and tweets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n PaginatedResponse,\n PaginationOptions,\n IteratorOptions,\n} from \"../internal/pagination.js\";\nimport { createPaginatedResponse, paginate } from \"../internal/pagination.js\";\nimport type { PageResult } from \"../internal/pagination.js\";\nimport type { Community, CommunityMember, CommunityTweetType, Tweet } from \"./types.js\";\n\n/**\n * Client for Twitter communities endpoints.\n *\n * Provides async methods for fetching community details, members,\n * moderators, and tweets.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search communities\n * const communities = await client.twitter.communities.search(\"python\");\n *\n * // Get community details\n * const community = await client.twitter.communities.getDetail(\"123456\");\n * console.log(`${community.name}: ${community.member_count} members`);\n *\n * // Get community tweets\n * const tweets = await client.twitter.communities.getTweets(\"123456\");\n * ```\n */\nexport class CommunitiesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Parse a community member from the API response.\n * Handles both flat format (user_id, username, role at top level)\n * and nested format (user object with id, username).\n */\n private parseCommunityMember(item: Record<string, unknown>): CommunityMember {\n if (\"user\" in item && item.user) {\n return item as unknown as CommunityMember;\n }\n // Flat format: map user_id -> id for User interface\n return {\n user: {\n id: (item.user_id as string) ?? \"\",\n username: (item.username as string) ?? \"\",\n name: (item.name as string) ?? \"\",\n profile_image_url: item.profile_image_url as string | undefined,\n verified: (item.verified as boolean) ?? false,\n is_blue_verified: item.is_blue_verified as boolean | undefined,\n },\n role: item.role as string | undefined,\n joined_at: item.joined_at as string | undefined,\n };\n }\n\n /**\n * Get details for a specific community.\n *\n * @param communityId - The community ID.\n * @returns The community details including rules and admin info.\n * @throws NotFoundError - If the community doesn't exist.\n *\n * @example\n * ```typescript\n * const community = await client.twitter.communities.getDetail(\"123456\");\n * console.log(`${community.name}`);\n * console.log(`Members: ${community.member_count?.toLocaleString()}`);\n * console.log(`Join policy: ${community.join_policy}`);\n *\n * if (community.rules) {\n * console.log(\"Rules:\");\n * for (const rule of community.rules) {\n * console.log(` - ${rule.name}`);\n * }\n * }\n * ```\n */\n async getDetail(communityId: string): Promise<Community> {\n return this.client.request<Community>(`/v1/twitter/communities/${communityId}`);\n }\n\n /**\n * Get tweets from a community.\n *\n * @param communityId - The community ID.\n * @param options - Options including tweet type, count, and pagination.\n * @returns Paginated response containing community tweets.\n *\n * @example\n * ```typescript\n * // Get top tweets\n * const tweets = await client.twitter.communities.getTweets(\"123456\");\n *\n * // Get latest tweets\n * const latest = await client.twitter.communities.getTweets(\"123456\", {\n * tweetType: \"Latest\"\n * });\n * ```\n */\n async getTweets(\n communityId: string,\n options: PaginationOptions & { tweetType?: CommunityTweetType; count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/communities/${communityId}/tweets`,\n {\n params: {\n tweet_type: options.tweetType ?? \"Top\",\n count: options.count ?? 40,\n cursor: options.cursor,\n },\n }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Iterate through all community tweets with automatic pagination.\n *\n * @param communityId - The community ID.\n * @param options - Options including tweet type and iteration limits.\n * @yields Tweet objects from the community.\n */\n async *getTweetsAll(\n communityId: string,\n options: IteratorOptions & { tweetType?: CommunityTweetType } = {}\n ): AsyncGenerator<Tweet, void, undefined> {\n const fetchPage = async (cursor?: string): Promise<PageResult<Tweet>> => {\n const { data, rateLimit } = await this.client.requestWithHeaders<{\n data?: Tweet[];\n next_cursor?: string;\n }>(`/v1/twitter/communities/${communityId}/tweets`, {\n params: {\n tweet_type: options.tweetType ?? \"Top\",\n count: options.count ?? 40,\n cursor,\n },\n });\n return { response: createPaginatedResponse(data.data ?? [], data.next_cursor), rateLimit };\n };\n yield* paginate(fetchPage, options);\n }\n\n /**\n * Get members of a community.\n *\n * @param communityId - The community ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing community members.\n *\n * @example\n * ```typescript\n * const members = await client.twitter.communities.getMembers(\"123456\");\n * for (const member of members.data) {\n * console.log(`@${member.user.username} (${member.role})`);\n * }\n * ```\n */\n async getMembers(\n communityId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<CommunityMember>> {\n const response = await this.client.request<{\n data?: Record<string, unknown>[];\n next_cursor?: string;\n }>(`/v1/twitter/communities/${communityId}/members`, {\n params: { count: options.count ?? 20, cursor: options.cursor },\n });\n\n const data: CommunityMember[] = (response.data ?? []).map((item) =>\n this.parseCommunityMember(item)\n );\n\n return createPaginatedResponse(data, response.next_cursor);\n }\n\n /**\n * Get moderators of a community.\n *\n * @param communityId - The community ID.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing community moderators.\n */\n async getModerators(\n communityId: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<CommunityMember>> {\n const response = await this.client.request<{\n data?: Record<string, unknown>[];\n next_cursor?: string;\n }>(`/v1/twitter/communities/${communityId}/moderators`, {\n params: { count: options.count ?? 20, cursor: options.cursor },\n });\n\n const data: CommunityMember[] = (response.data ?? []).map((item) =>\n this.parseCommunityMember(item)\n );\n\n return createPaginatedResponse(data, response.next_cursor);\n }\n\n /**\n * Search for communities.\n *\n * @param query - Search query string.\n * @param options - Pagination options.\n * @returns Paginated response containing matching communities.\n *\n * @example\n * ```typescript\n * const results = await client.twitter.communities.search(\"python developers\");\n * for (const community of results.data) {\n * console.log(`${community.name}: ${community.member_count} members`);\n * }\n * ```\n */\n async search(\n query: string,\n options: PaginationOptions = {}\n ): Promise<PaginatedResponse<Community>> {\n const response = await this.client.request<{ data?: Community[]; next_cursor?: string }>(\n \"/v1/twitter/communities/search\",\n { params: { query, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Search for tweets within a community.\n *\n * @param communityId - The community ID.\n * @param query - Search query string.\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing matching tweets.\n */\n async searchTweets(\n communityId: string,\n query: string,\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n `/v1/twitter/communities/${communityId}/search_tweets`,\n { params: { query, count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n\n /**\n * Get the community timeline (tweets from communities you're in).\n *\n * @param options - Pagination options with optional count.\n * @returns Paginated response containing community timeline tweets.\n */\n async getTimeline(\n options: PaginationOptions & { count?: number } = {}\n ): Promise<PaginatedResponse<Tweet>> {\n const response = await this.client.request<{ data?: Tweet[]; next_cursor?: string }>(\n \"/v1/twitter/communities/timeline\",\n { params: { count: options.count ?? 20, cursor: options.cursor } }\n );\n return createPaginatedResponse(response.data ?? [], response.next_cursor);\n }\n}\n","/**\n * Twitter Trends API client.\n *\n * Provides methods for fetching trending topics and trend locations.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { PaginatedResponse } from \"../internal/pagination.js\";\nimport { createPaginatedResponse } from \"../internal/pagination.js\";\nimport type { Trend, TrendCategory, Location, PlaceTrends } from \"./types.js\";\n\n/**\n * Client for Twitter trends endpoints.\n *\n * Provides async methods for fetching trending topics, place-specific trends,\n * and available trend locations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get global trends\n * const trends = await client.twitter.trends.getTrends();\n * for (const trend of trends.data) {\n * console.log(`${trend.name}: ${trend.tweet_count || 'N/A'} tweets`);\n * }\n *\n * // Get trends for a specific location\n * const usTrends = await client.twitter.trends.getPlaceTrends(23424977);\n *\n * // Get available locations\n * const locations = await client.twitter.trends.getAvailableLocations();\n * ```\n */\nexport class TrendsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get trending topics.\n *\n * @param options - Options for filtering trends.\n * @returns Paginated response containing trending topics.\n *\n * @example\n * ```typescript\n * // Get general trending topics\n * const trends = await client.twitter.trends.getTrends();\n *\n * // Get news trends\n * const newsTrends = await client.twitter.trends.getTrends({\n * category: \"news\"\n * });\n *\n * for (const trend of trends.data) {\n * const count = trend.tweet_count?.toLocaleString() || \"N/A\";\n * console.log(`${trend.name}: ${count} tweets`);\n * }\n * ```\n */\n async getTrends(\n options: { category?: TrendCategory; count?: number } = {}\n ): Promise<PaginatedResponse<Trend>> {\n const response = await this.client.request<{ data?: Trend[] }>(\"/v1/twitter/trends/\", {\n params: {\n category: options.category ?? \"trending\",\n count: options.count ?? 20,\n },\n });\n return createPaginatedResponse(response.data ?? []);\n }\n\n /**\n * Get trends for a specific location.\n *\n * @param woeid - Where On Earth ID for the location.\n * Common WOEIDs:\n * - 1: Worldwide\n * - 23424977: United States\n * - 23424975: United Kingdom\n * - 23424856: Japan\n * - 23424829: Germany\n * @returns PlaceTrends containing location info and trends.\n * @throws NotFoundError - If the WOEID is invalid.\n *\n * @example\n * ```typescript\n * // Get US trends\n * const usTrends = await client.twitter.trends.getPlaceTrends(23424977);\n * console.log(`Trends in ${usTrends.name}:`);\n * for (const trend of usTrends.trends) {\n * console.log(` - ${trend.name}`);\n * }\n *\n * // Get worldwide trends\n * const globalTrends = await client.twitter.trends.getPlaceTrends(1);\n * ```\n */\n async getPlaceTrends(woeid: number): Promise<PlaceTrends> {\n return this.client.request<PlaceTrends>(`/v1/twitter/trends/place/${woeid}`);\n }\n\n /**\n * Get all locations where trends are available.\n *\n * @returns Paginated response containing available trend locations.\n *\n * @example\n * ```typescript\n * const locations = await client.twitter.trends.getAvailableLocations();\n *\n * // Filter by country\n * const usLocations = locations.data.filter(\n * loc => loc.country_code === \"US\"\n * );\n * console.log(`Found ${usLocations.length} US locations`);\n *\n * // Get countries only\n * const countries = locations.data.filter(\n * loc => loc.place_type === \"Country\"\n * );\n * ```\n */\n async getAvailableLocations(): Promise<PaginatedResponse<Location>> {\n const response = await this.client.request<{ data?: Location[] }>(\n \"/v1/twitter/trends/locations\"\n );\n return createPaginatedResponse(response.data ?? []);\n }\n}\n","/**\n * Twitter Geo API client.\n *\n * Provides methods for fetching geographic place information.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { PaginatedResponse } from \"../internal/pagination.js\";\nimport { createPaginatedResponse } from \"../internal/pagination.js\";\nimport type { Place } from \"./types.js\";\n\n/**\n * Options for searching places.\n */\nexport interface GeoSearchOptions {\n /** Latitude coordinate */\n lat?: number;\n /** Longitude coordinate */\n long?: number;\n /** Free-form text search query (e.g., \"San Francisco\") */\n query?: string;\n /** IP address for location lookup */\n ip?: string;\n /** Result granularity (\"neighborhood\", \"city\", \"admin\", \"country\") */\n granularity?: string;\n /** Maximum number of results (1-100) */\n maxResults?: number;\n}\n\n/**\n * Client for Twitter geo/places endpoints.\n *\n * Provides async methods for fetching place details and searching\n * for geographic locations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search for places\n * const places = await client.twitter.geo.search({ query: \"San Francisco\" });\n *\n * // Search by coordinates\n * const nearby = await client.twitter.geo.search({ lat: 37.7749, long: -122.4194 });\n *\n * // Get place details\n * const place = await client.twitter.geo.getDetail(\"5a110d312052166f\");\n * ```\n */\nexport class GeoClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get details for a specific place.\n *\n * @param placeId - The Twitter place ID.\n * @returns The place details.\n * @throws NotFoundError - If the place doesn't exist.\n *\n * @example\n * ```typescript\n * const place = await client.twitter.geo.getDetail(\"5a110d312052166f\");\n * console.log(`${place.full_name}`);\n * console.log(`Type: ${place.place_type}`);\n * console.log(`Country: ${place.country}`);\n * ```\n */\n async getDetail(placeId: string): Promise<Place> {\n return this.client.request<Place>(`/v1/twitter/geo/places/${placeId}`);\n }\n\n /**\n * Search for geographic places.\n *\n * At least one of lat/long, query, or ip must be provided.\n *\n * @param options - Search options.\n * @returns Paginated response containing matching places.\n * @throws ValidationError - If no search parameters are provided.\n *\n * @example\n * ```typescript\n * // Search by name\n * const places = await client.twitter.geo.search({ query: \"San Francisco\" });\n * for (const place of places.data) {\n * console.log(`${place.full_name} (${place.place_type})`);\n * }\n *\n * // Search by coordinates\n * const nearby = await client.twitter.geo.search({\n * lat: 37.7749,\n * long: -122.4194,\n * granularity: \"city\"\n * });\n *\n * // Search by IP\n * const ipPlaces = await client.twitter.geo.search({ ip: \"8.8.8.8\" });\n * ```\n */\n async search(options: GeoSearchOptions = {}): Promise<PaginatedResponse<Place>> {\n const response = await this.client.request<{ data?: Place[] }>(\"/v1/twitter/geo/search\", {\n params: {\n lat: options.lat,\n long: options.long,\n query: options.query,\n ip: options.ip,\n granularity: options.granularity,\n max_results: options.maxResults,\n },\n });\n return createPaginatedResponse(response.data ?? []);\n }\n}\n","/**\n * StreamClient -- stream monitor management and live WebSocket streaming.\n */\n\nimport { createHmac, timingSafeEqual } from \"node:crypto\";\nimport { EventEmitter } from \"node:events\";\nimport WebSocket from \"ws\";\nimport type { BaseClient } from \"../internal/client.js\";\nimport { WebSocketStreamError } from \"../internal/exceptions.js\";\nimport type {\n BillingLogList,\n ConnectOptions,\n ConnectedEvent,\n CreateMonitorParams,\n DeliveryLogList,\n ErrorEvent,\n FilterRuleCreate,\n FilterRuleDeliveryLogListResponse,\n FilterRuleListResponse,\n FilterRulePricingTiersResponse,\n FilterRuleResponse,\n FilterRuleUpdate,\n FilterRuleValidateResponse,\n PingEvent,\n StreamEvent,\n StreamMonitor,\n StreamMonitorList,\n StreamTweet,\n TweetEvent,\n UpdateMonitorParams,\n} from \"./stream-types.js\";\n\n// Minimum reconnect delay regardless of caller configuration (seconds)\nconst MIN_RECONNECT_DELAY_SECONDS = 5;\n\n/**\n * Derive WebSocket URL from HTTP base URL.\n * 'https://...' -> 'wss://...'\n * 'http://...' -> 'ws://...'\n */\nexport function wsUrlFromBase(baseUrl: string): string {\n if (baseUrl.startsWith(\"https://\")) {\n return baseUrl.replace(\"https://\", \"wss://\") + \"/v1/twitter/stream\";\n }\n if (baseUrl.startsWith(\"http://\")) {\n return baseUrl.replace(\"http://\", \"ws://\") + \"/v1/twitter/stream\";\n }\n return baseUrl + \"/v1/twitter/stream\";\n}\n\n/**\n * Map a raw server JSON object to a camelCase StreamEvent.\n * Unknown types return an ErrorEvent with code 0.\n */\nexport function parseEvent(raw: Record<string, unknown>): StreamEvent {\n const type = raw[\"type\"] as string | undefined;\n\n switch (type) {\n case \"connected\":\n return {\n type: \"connected\",\n connectionId: raw[\"connection_id\"] as string,\n apiKeyId: raw[\"api_key_id\"] as string,\n } satisfies ConnectedEvent;\n\n case \"ping\":\n return {\n type: \"ping\",\n timestamp: raw[\"timestamp\"] as string,\n } satisfies PingEvent;\n\n case \"tweet\":\n return {\n type: \"tweet\",\n monitorId: raw[\"monitor_id\"] as string,\n tweetId: raw[\"tweet_id\"] as string,\n authorUsername: raw[\"author_username\"] as string,\n tweetPublishedAt: raw[\"tweet_published_at\"] as string,\n detectedAt: raw[\"detected_at\"] as string,\n latencyMs: raw[\"latency_ms\"] as number,\n tweet: raw[\"tweet\"] as StreamTweet,\n } satisfies TweetEvent;\n\n case \"error\":\n return {\n type: \"error\",\n code: raw[\"code\"] as number,\n message: raw[\"message\"] as string,\n } satisfies ErrorEvent;\n\n default:\n return {\n type: \"error\",\n code: 0,\n message: `Unknown event type: ${String(type)}`,\n } satisfies ErrorEvent;\n }\n}\n\n/**\n * Typed EventEmitter for stream events.\n *\n * @example\n * ```typescript\n * const stream = client.twitter.stream.connect();\n * stream.on(\"tweet\", (event) => console.log(event.authorUsername));\n * stream.on(\"error\", (err) => console.error(err));\n * ```\n */\nexport interface StreamEmitter extends EventEmitter {\n on(event: \"connected\", listener: (event: ConnectedEvent) => void): this;\n on(event: \"ping\", listener: (event: PingEvent) => void): this;\n on(event: \"tweet\", listener: (event: TweetEvent) => void): this;\n on(event: \"error\", listener: (error: WebSocketStreamError) => void): this;\n on(event: \"close\", listener: () => void): this;\n\n once(event: \"connected\", listener: (event: ConnectedEvent) => void): this;\n once(event: \"tweet\", listener: (event: TweetEvent) => void): this;\n once(event: \"close\", listener: () => void): this;\n\n /** Gracefully close the WebSocket connection. */\n close(): void;\n}\n\n/**\n * Client for Twitter Streams -- monitor CRUD and live WebSocket streaming.\n *\n * Accessed as `client.twitter.stream`.\n *\n * @example Monitor CRUD\n * ```typescript\n * const monitor = await client.twitter.stream.createMonitor({\n * name: \"Tech Leaders\",\n * usernames: [\"elonmusk\", \"naval\"],\n * pollIntervalSeconds: 10,\n * });\n * console.log(`Created: ${monitor.id}, tier: ${monitor.pricing_tier}`);\n * ```\n *\n * @example EventEmitter streaming\n * ```typescript\n * const stream = client.twitter.stream.connect();\n * stream.on(\"tweet\", (event) => {\n * console.log(`@${event.authorUsername}: ${event.tweet.text}`);\n * console.log(` latency: ${event.latencyMs}ms`);\n * });\n * stream.on(\"error\", (err) => console.error(\"Stream error:\", err));\n * // Later:\n * stream.close();\n * ```\n *\n * @example AsyncIterator streaming\n * ```typescript\n * for await (const event of client.twitter.stream.connectIter()) {\n * if (event.type === \"tweet\") {\n * console.log(event.authorUsername, event.latencyMs);\n * }\n * }\n * ```\n */\nexport class StreamClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n // ===========================================================================\n // Monitor CRUD\n // ===========================================================================\n\n /**\n * Create a new stream monitor.\n *\n * @param params - Monitor configuration.\n * @returns The created StreamMonitor.\n * @throws InsufficientCreditsError - Credit balance below tier threshold (402).\n * @throws ValidationError - Invalid username or interval (422).\n * @throws ScrapeBadgerError - Name conflict (409).\n * @throws AuthenticationError - Invalid API key (401).\n *\n * @example\n * ```typescript\n * const monitor = await client.twitter.stream.createMonitor({\n * name: \"Breaking News\",\n * usernames: [\"cnnbrk\", \"bbcbreaking\"],\n * pollIntervalSeconds: 5,\n * });\n * ```\n */\n async createMonitor(params: CreateMonitorParams): Promise<StreamMonitor> {\n const body: Record<string, unknown> = {\n name: params.name,\n usernames: params.usernames,\n poll_interval_seconds: params.pollIntervalSeconds,\n };\n if (params.webhookUrl !== undefined) body[\"webhook_url\"] = params.webhookUrl;\n if (params.webhookSecret !== undefined) body[\"webhook_secret\"] = params.webhookSecret;\n\n return this.client.request<StreamMonitor>(\"/v1/twitter/stream/monitors\", {\n method: \"POST\",\n body,\n });\n }\n\n /**\n * List stream monitors for the authenticated API key.\n *\n * @param options - Filter and pagination options.\n * @returns StreamMonitorList with pagination metadata.\n *\n * @example\n * ```typescript\n * const { monitors, total } = await client.twitter.stream.listMonitors({\n * status: \"active\",\n * });\n * console.log(`${total} active monitors`);\n * ```\n */\n async listMonitors(options?: {\n status?: \"active\" | \"paused\" | \"error\";\n page?: number;\n pageSize?: number;\n }): Promise<StreamMonitorList> {\n const params: Record<string, string | number | boolean | undefined> = {\n page: options?.page ?? 1,\n page_size: options?.pageSize ?? 20,\n status: options?.status,\n };\n return this.client.request<StreamMonitorList>(\"/v1/twitter/stream/monitors\", {\n params,\n });\n }\n\n /**\n * Get a single stream monitor by ID.\n *\n * @param monitorId - UUID of the monitor.\n * @returns The StreamMonitor.\n * @throws NotFoundError - No monitor with that ID for this API key.\n *\n * @example\n * ```typescript\n * const monitor = await client.twitter.stream.getMonitor(\"550e8400-...\");\n * console.log(`${monitor.name}: ${monitor.status}`);\n * ```\n */\n async getMonitor(monitorId: string): Promise<StreamMonitor> {\n return this.client.request<StreamMonitor>(`/v1/twitter/stream/monitors/${monitorId}`);\n }\n\n /**\n * Partially update a stream monitor.\n *\n * Only fields that are explicitly set in params are sent to the server.\n *\n * @param monitorId - UUID of the monitor.\n * @param params - Fields to update (all optional).\n * @returns The updated StreamMonitor.\n * @throws NotFoundError - Monitor not found for this API key.\n * @throws InsufficientCreditsError - When resuming with insufficient credits.\n *\n * @example\n * ```typescript\n * const monitor = await client.twitter.stream.updateMonitor(\"550e8400-...\", {\n * pollIntervalSeconds: 60,\n * });\n * ```\n */\n async updateMonitor(monitorId: string, params: UpdateMonitorParams): Promise<StreamMonitor> {\n const body: Record<string, unknown> = {};\n if (params.name !== undefined) body[\"name\"] = params.name;\n if (params.usernames !== undefined) body[\"usernames\"] = params.usernames;\n if (params.pollIntervalSeconds !== undefined)\n body[\"poll_interval_seconds\"] = params.pollIntervalSeconds;\n if (params.status !== undefined) body[\"status\"] = params.status;\n if (params.webhookUrl !== undefined) body[\"webhook_url\"] = params.webhookUrl;\n if (params.webhookSecret !== undefined) body[\"webhook_secret\"] = params.webhookSecret;\n\n return this.client.request<StreamMonitor>(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"PATCH\",\n body,\n });\n }\n\n /**\n * Pause an active stream monitor.\n *\n * Convenience wrapper around updateMonitor({ status: \"paused\" }).\n *\n * @param monitorId - UUID of the monitor.\n * @returns The updated StreamMonitor with status=\"paused\".\n */\n async pauseMonitor(monitorId: string): Promise<StreamMonitor> {\n return this.updateMonitor(monitorId, { status: \"paused\" });\n }\n\n /**\n * Resume a paused stream monitor.\n *\n * Convenience wrapper around updateMonitor({ status: \"active\" }).\n *\n * @param monitorId - UUID of the monitor.\n * @returns The updated StreamMonitor with status=\"active\".\n * @throws InsufficientCreditsError - If credits are below the tier threshold.\n */\n async resumeMonitor(monitorId: string): Promise<StreamMonitor> {\n return this.updateMonitor(monitorId, { status: \"active\" });\n }\n\n /**\n * Delete a stream monitor and all its associated logs. Irreversible.\n *\n * @param monitorId - UUID of the monitor.\n * @throws NotFoundError - Monitor not found for this API key.\n *\n * @example\n * ```typescript\n * await client.twitter.stream.deleteMonitor(\"550e8400-...\");\n * ```\n */\n async deleteMonitor(monitorId: string): Promise<void> {\n await this.client.request<void>(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"DELETE\",\n });\n }\n\n // ===========================================================================\n // Delivery and Billing Logs\n // ===========================================================================\n\n /**\n * List tweet delivery logs.\n *\n * @param options - Filter and pagination options.\n * @returns DeliveryLogList with pagination metadata.\n */\n async listDeliveryLogs(options?: {\n monitorId?: string;\n authorUsername?: string;\n deliveryStatus?: string;\n page?: number;\n pageSize?: number;\n sort?: \"asc\" | \"desc\";\n }): Promise<DeliveryLogList> {\n const params: Record<string, string | number | boolean | undefined> = {\n page: options?.page ?? 1,\n page_size: options?.pageSize ?? 20,\n sort: options?.sort ?? \"desc\",\n monitor_id: options?.monitorId,\n author_username: options?.authorUsername,\n delivery_status: options?.deliveryStatus,\n };\n return this.client.request<DeliveryLogList>(\"/v1/twitter/stream/logs\", { params });\n }\n\n /**\n * List billing activity logs.\n *\n * @param options - Filter and pagination options.\n * @returns BillingLogList with pagination metadata.\n */\n async listBillingLogs(options?: {\n monitorId?: string;\n page?: number;\n pageSize?: number;\n }): Promise<BillingLogList> {\n const params: Record<string, string | number | boolean | undefined> = {\n page: options?.page ?? 1,\n page_size: options?.pageSize ?? 20,\n monitor_id: options?.monitorId,\n };\n return this.client.request<BillingLogList>(\"/v1/twitter/stream/billing-logs\", { params });\n }\n\n // ===========================================================================\n // Filter Rules CRUD\n // ===========================================================================\n\n /**\n * Create a new tweet filter rule.\n *\n * @param params - Filter rule configuration.\n * @returns The created FilterRuleResponse.\n * @throws ValidationError - Invalid query or interval (422).\n * @throws InsufficientCreditsError - Credit balance below tier threshold (402).\n * @throws AuthenticationError - Invalid API key (401).\n *\n * @example\n * ```typescript\n * const rule = await client.twitter.stream.createFilterRule({\n * tag: \"python news\",\n * query: \"#python lang:en -is:retweet\",\n * interval_seconds: 60,\n * });\n * console.log(`Created: ${rule.id}, tier: ${rule.pricing_tier}`);\n * ```\n */\n async createFilterRule(params: FilterRuleCreate): Promise<FilterRuleResponse> {\n const body: Record<string, unknown> = {\n tag: params.tag,\n query: params.query,\n interval_seconds: params.interval_seconds,\n };\n if (params.webhook_url !== undefined) body[\"webhook_url\"] = params.webhook_url;\n if (params.webhook_secret !== undefined) body[\"webhook_secret\"] = params.webhook_secret;\n if (params.max_results_per_poll !== undefined)\n body[\"max_results_per_poll\"] = params.max_results_per_poll;\n\n return this.client.request<FilterRuleResponse>(\"/v1/twitter/stream/filter-rules\", {\n method: \"POST\",\n body,\n });\n }\n\n /**\n * List filter rules for the authenticated API key.\n *\n * @param options - Filter and pagination options.\n * @returns FilterRuleListResponse with pagination metadata.\n *\n * @example\n * ```typescript\n * const { rules, total } = await client.twitter.stream.listFilterRules({\n * status: \"active\",\n * });\n * console.log(`${total} active rules`);\n * ```\n */\n async listFilterRules(options?: {\n status?: FilterRuleResponse[\"status\"];\n limit?: number;\n offset?: number;\n }): Promise<FilterRuleListResponse> {\n const params: Record<string, string | number | boolean | undefined> = {\n limit: options?.limit ?? 20,\n offset: options?.offset ?? 0,\n status: options?.status,\n };\n return this.client.request<FilterRuleListResponse>(\"/v1/twitter/stream/filter-rules\", {\n params,\n });\n }\n\n /**\n * Get a single filter rule by ID.\n *\n * @param ruleId - UUID of the filter rule.\n * @returns The FilterRuleResponse.\n * @throws NotFoundError - No rule with that ID for this API key.\n *\n * @example\n * ```typescript\n * const rule = await client.twitter.stream.getFilterRule(\"550e8400-...\");\n * console.log(`${rule.tag}: ${rule.status}`);\n * ```\n */\n async getFilterRule(ruleId: string): Promise<FilterRuleResponse> {\n return this.client.request<FilterRuleResponse>(`/v1/twitter/stream/filter-rules/${ruleId}`);\n }\n\n /**\n * Partially update a filter rule.\n *\n * Only fields that are explicitly set in params are sent to the server.\n *\n * @param ruleId - UUID of the filter rule.\n * @param params - Fields to update (all optional).\n * @returns The updated FilterRuleResponse.\n * @throws NotFoundError - Rule not found for this API key.\n * @throws ValidationError - Invalid field values (422).\n *\n * @example\n * ```typescript\n * const rule = await client.twitter.stream.updateFilterRule(\"550e8400-...\", {\n * interval_seconds: 120,\n * });\n * ```\n */\n async updateFilterRule(ruleId: string, params: FilterRuleUpdate): Promise<FilterRuleResponse> {\n const body: Record<string, unknown> = {};\n if (params.tag !== undefined) body[\"tag\"] = params.tag;\n if (params.query !== undefined) body[\"query\"] = params.query;\n if (params.interval_seconds !== undefined) body[\"interval_seconds\"] = params.interval_seconds;\n if (params.status !== undefined) body[\"status\"] = params.status;\n if (params.webhook_url !== undefined) body[\"webhook_url\"] = params.webhook_url;\n if (params.webhook_secret !== undefined) body[\"webhook_secret\"] = params.webhook_secret;\n if (params.max_results_per_poll !== undefined)\n body[\"max_results_per_poll\"] = params.max_results_per_poll;\n\n return this.client.request<FilterRuleResponse>(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"PATCH\",\n body,\n });\n }\n\n /**\n * Delete a filter rule and all its associated logs. Irreversible.\n *\n * @param ruleId - UUID of the filter rule.\n * @throws NotFoundError - Rule not found for this API key.\n *\n * @example\n * ```typescript\n * await client.twitter.stream.deleteFilterRule(\"550e8400-...\");\n * ```\n */\n async deleteFilterRule(ruleId: string): Promise<void> {\n await this.client.request<void>(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"DELETE\",\n });\n }\n\n // ===========================================================================\n // Filter Rules Utility\n // ===========================================================================\n\n /**\n * Validate a Twitter search query before creating a rule.\n *\n * @param query - The Twitter search query to validate.\n * @returns FilterRuleValidateResponse with validity and sample result count.\n *\n * @example\n * ```typescript\n * const result = await client.twitter.stream.validateFilterRuleQuery(\n * \"#python lang:en -is:retweet\"\n * );\n * if (!result.valid) {\n * console.error(\"Invalid query:\", result.error);\n * }\n * ```\n */\n async validateFilterRuleQuery(query: string): Promise<FilterRuleValidateResponse> {\n return this.client.request<FilterRuleValidateResponse>(\n \"/v1/twitter/stream/filter-rules/validate\",\n { method: \"POST\", body: { query } }\n );\n }\n\n /**\n * List tweet delivery logs for a specific filter rule.\n *\n * @param ruleId - UUID of the filter rule.\n * @param options - Filter and pagination options.\n * @returns FilterRuleDeliveryLogListResponse with pagination metadata.\n *\n * @example\n * ```typescript\n * const { logs, total } = await client.twitter.stream.listFilterRuleLogs(\n * \"550e8400-...\",\n * { limit: 50, deliveryStatus: \"webhook_delivered\" }\n * );\n * ```\n */\n async listFilterRuleLogs(\n ruleId: string,\n options?: {\n limit?: number;\n offset?: number;\n deliveryStatus?: string;\n sort?: \"asc\" | \"desc\";\n }\n ): Promise<FilterRuleDeliveryLogListResponse> {\n const params: Record<string, string | number | boolean | undefined> = {\n limit: options?.limit ?? 20,\n offset: options?.offset ?? 0,\n sort: options?.sort ?? \"desc\",\n delivery_status: options?.deliveryStatus,\n };\n return this.client.request<FilterRuleDeliveryLogListResponse>(\n `/v1/twitter/stream/filter-rules/${ruleId}/logs`,\n { params }\n );\n }\n\n /**\n * Get all available filter rule pricing tiers.\n *\n * @returns FilterRulePricingTiersResponse listing all tiers.\n *\n * @example\n * ```typescript\n * const { tiers } = await client.twitter.stream.getFilterRulePricingTiers();\n * tiers.forEach((t) => console.log(t.tier_label, t.credits_per_rule_per_day));\n * ```\n */\n async getFilterRulePricingTiers(): Promise<FilterRulePricingTiersResponse> {\n return this.client.request<FilterRulePricingTiersResponse>(\n \"/v1/twitter/stream/filter-rules-pricing\"\n );\n }\n\n // ===========================================================================\n // WebSocket Streaming -- EventEmitter style\n // ===========================================================================\n\n /**\n * Connect to the WebSocket stream and return an EventEmitter.\n *\n * The caller subscribes to events via `.on(\"tweet\", handler)`.\n * The SDK handles pong replies to server pings automatically.\n * Call `.close()` on the emitter to disconnect cleanly.\n *\n * If reconnect is true, the emitter automatically reconnects after\n * disconnects (other than auth failures). A new \"connected\" event is\n * emitted on each reconnect.\n *\n * @param options - Connection options (reconnect, delay, maxReconnects).\n * @returns StreamEmitter -- an EventEmitter subclass.\n *\n * @example\n * ```typescript\n * const stream = client.twitter.stream.connect();\n * stream.on(\"connected\", (e) => console.log(\"Connected:\", e.connectionId));\n * stream.on(\"tweet\", (event) => {\n * console.log(`@${event.authorUsername}: ${event.tweet.text}`);\n * console.log(` latency: ${event.latencyMs}ms`);\n * });\n * stream.on(\"error\", (err) => console.error(\"Stream error:\", err));\n * stream.on(\"close\", () => console.log(\"Stream closed\"));\n *\n * // Later:\n * stream.close();\n * ```\n */\n connect(options: ConnectOptions = {}): StreamEmitter {\n const { reconnect = false, reconnectDelaySeconds = 90, maxReconnects } = options;\n\n const delay = Math.max(MIN_RECONNECT_DELAY_SECONDS, reconnectDelaySeconds) * 1000;\n const wsUrl = wsUrlFromBase(this.client.config.baseUrl);\n const apiKey = this.client.config.apiKey;\n\n const emitter = new EventEmitter() as StreamEmitter;\n let ws: WebSocket | null = null;\n let closed = false;\n let reconnectCount = 0;\n\n const connectOnce = (): void => {\n ws = new WebSocket(wsUrl, { headers: { \"x-api-key\": apiKey } });\n\n ws.on(\"message\", (data: unknown) => {\n let raw: Record<string, unknown>;\n try {\n raw = JSON.parse(String(data)) as Record<string, unknown>;\n } catch {\n return;\n }\n\n const event = parseEvent(raw);\n\n if (event.type === \"ping\") {\n ws?.send(JSON.stringify({ type: \"pong\" }));\n emitter.emit(\"ping\", event);\n return;\n }\n\n if (event.type === \"error\") {\n const code = (event as ErrorEvent).code;\n const err = new WebSocketStreamError((event as ErrorEvent).message, code);\n emitter.emit(\"error\", err);\n if (code === 4001 || code === 4003) {\n closed = true; // Do not reconnect on auth/limit errors\n ws?.close();\n }\n return;\n }\n\n emitter.emit(event.type, event);\n });\n\n ws.on(\"open\", () => {\n // Connection is open; wait for \"connected\" event from server\n });\n\n ws.on(\"close\", (code: unknown, reason: unknown) => {\n if (closed) {\n emitter.emit(\"close\");\n return;\n }\n\n if (!reconnect) {\n const reasonStr =\n reason instanceof Buffer ? reason.toString() : typeof reason === \"string\" ? reason : \"\";\n emitter.emit(\n \"error\",\n new WebSocketStreamError(`WebSocket closed: ${reasonStr || String(code)}`)\n );\n emitter.emit(\"close\");\n return;\n }\n\n if (maxReconnects !== undefined && reconnectCount >= maxReconnects) {\n emitter.emit(\n \"error\",\n new WebSocketStreamError(`Max reconnects (${maxReconnects}) exhausted`)\n );\n emitter.emit(\"close\");\n return;\n }\n\n reconnectCount++;\n setTimeout(connectOnce, delay);\n });\n\n ws.on(\"error\", (err: unknown) => {\n const message = err instanceof Error ? err.message : String(err);\n emitter.emit(\"error\", new WebSocketStreamError(message));\n });\n };\n\n // Attach close() method to emitter\n (emitter as unknown as { close: () => void }).close = (): void => {\n closed = true;\n ws?.close(1000, \"Client closed\");\n };\n\n connectOnce();\n return emitter;\n }\n\n // ===========================================================================\n // WebSocket Streaming -- AsyncIterator style\n // ===========================================================================\n\n /**\n * Connect to the WebSocket stream and return an AsyncIterator.\n *\n * Iterates over StreamEvent objects. The SDK handles pong replies\n * automatically but still yields PingEvent to the caller (the caller\n * may ignore ping events).\n *\n * @param options - Connection options (reconnect, delay, maxReconnects).\n * @yields StreamEvent\n *\n * @example\n * ```typescript\n * for await (const event of client.twitter.stream.connectIter()) {\n * if (event.type === \"tweet\") {\n * console.log(`@${event.authorUsername}: ${event.latencyMs}ms`);\n * }\n * }\n * ```\n *\n * @example With auto-reconnect\n * ```typescript\n * for await (const event of client.twitter.stream.connectIter({\n * reconnect: true,\n * reconnectDelaySeconds: 90,\n * })) {\n * if (event.type === \"tweet\") {\n * // process(event);\n * }\n * }\n * ```\n */\n async *connectIter(options: ConnectOptions = {}): AsyncIterableIterator<StreamEvent> {\n const { reconnect = false, reconnectDelaySeconds = 90, maxReconnects } = options;\n\n const delay = Math.max(MIN_RECONNECT_DELAY_SECONDS, reconnectDelaySeconds) * 1000;\n const wsUrl = wsUrlFromBase(this.client.config.baseUrl);\n const apiKey = this.client.config.apiKey;\n let reconnectCount = 0;\n\n while (true) {\n const events: StreamEvent[] = [];\n let resolveWait: (() => void) | null = null;\n let rejectWait: ((err: Error) => void) | null = null;\n let done = false;\n\n const ws = new WebSocket(wsUrl, { headers: { \"x-api-key\": apiKey } });\n\n const waitForEvent = (): Promise<void> =>\n new Promise<void>((res, rej) => {\n resolveWait = res;\n rejectWait = rej;\n });\n\n ws.on(\"message\", (data: unknown) => {\n let raw: Record<string, unknown>;\n try {\n raw = JSON.parse(String(data)) as Record<string, unknown>;\n } catch {\n return;\n }\n\n const event = parseEvent(raw);\n\n if (event.type === \"ping\") {\n ws.send(JSON.stringify({ type: \"pong\" }));\n }\n\n if (event.type === \"error\") {\n const code = (event as ErrorEvent).code;\n if (code === 4001 || code === 4003) {\n rejectWait?.(new WebSocketStreamError((event as ErrorEvent).message, code));\n rejectWait = null;\n resolveWait = null;\n return;\n }\n }\n\n events.push(event);\n resolveWait?.();\n resolveWait = null;\n rejectWait = null;\n });\n\n ws.on(\"close\", () => {\n done = true;\n resolveWait?.();\n resolveWait = null;\n rejectWait = null;\n });\n\n ws.on(\"error\", (err: unknown) => {\n const message = err instanceof Error ? err.message : String(err);\n rejectWait?.(new WebSocketStreamError(message));\n rejectWait = null;\n resolveWait = null;\n });\n\n try {\n while (!done || events.length > 0) {\n if (events.length === 0) {\n await waitForEvent();\n }\n while (events.length > 0) {\n yield events.shift()!;\n }\n }\n } catch (err) {\n ws.close();\n throw err;\n } finally {\n ws.close();\n }\n\n // Connection ended cleanly\n if (!reconnect) {\n return;\n }\n\n if (maxReconnects !== undefined && reconnectCount >= maxReconnects) {\n throw new WebSocketStreamError(`Max reconnects (${maxReconnects}) exhausted`);\n }\n\n reconnectCount++;\n await new Promise<void>((res) => setTimeout(res, delay));\n // Continue outer while loop for reconnect\n }\n }\n}\n\n/**\n * Verify the HMAC-SHA256 signature of an incoming webhook request.\n *\n * The server sets the header:\n * X-ScrapeBadger-Signature: sha256=<hex-digest>\n *\n * @param secret - The webhook secret configured on the monitor.\n * @param body - The raw request body string or Buffer.\n * @param signatureHeader - The full X-ScrapeBadger-Signature header value.\n * @returns true if the signature is valid.\n *\n * @example\n * ```typescript\n * // In an Express webhook receiver:\n * import { verifyWebhookSignature } from \"scrapebadger/twitter\";\n * import express from \"express\";\n *\n * app.post(\"/webhook\", express.raw({ type: \"application/json\" }), (req, res) => {\n * const sig = req.headers[\"x-scrapebadger-signature\"] as string;\n * if (!verifyWebhookSignature(\"my-secret\", req.body, sig)) {\n * return res.status(401).json({ error: \"Invalid signature\" });\n * }\n * const event = JSON.parse(req.body.toString());\n * // process event...\n * res.sendStatus(200);\n * });\n * ```\n */\nexport function verifyWebhookSignature(\n secret: string,\n body: string | Buffer,\n signatureHeader: string\n): boolean {\n if (!signatureHeader.startsWith(\"sha256=\")) {\n return false;\n }\n\n const expectedHex = signatureHeader.slice(\"sha256=\".length);\n const bodyBuffer = typeof body === \"string\" ? Buffer.from(body, \"utf-8\") : body;\n const actualHex = createHmac(\"sha256\", secret).update(bodyBuffer).digest(\"hex\");\n\n // Use constant-time comparison to prevent timing attacks\n try {\n return timingSafeEqual(Buffer.from(expectedHex, \"hex\"), Buffer.from(actualHex, \"hex\"));\n } catch {\n // Buffers of different lengths throw -- treat as mismatch\n return false;\n }\n}\n","/**\n * Twitter Spaces API client.\n *\n * Provides methods for fetching Twitter Spaces and live broadcasts.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Space, Broadcast } from \"./types.js\";\n\n/**\n * Client for Twitter Spaces endpoints.\n *\n * Provides async methods for fetching Space details and live broadcast data.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get Space details\n * const space = await client.twitter.spaces.getDetail(\"1eaKbrPPbPwKX\");\n * console.log(`${space.title} — state: ${space.state}`);\n *\n * // Get broadcast details\n * const broadcast = await client.twitter.spaces.getBroadcast(\"broadcast123\");\n * console.log(`${broadcast.title}: ${broadcast.total_viewers} viewers`);\n * ```\n */\nexport class SpacesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get details for a specific Twitter Space.\n *\n * @param spaceId - The Space ID to fetch.\n * @returns The Space data.\n * @throws NotFoundError - If the Space doesn't exist.\n *\n * @example\n * ```typescript\n * const space = await client.twitter.spaces.getDetail(\"1eaKbrPPbPwKX\");\n * console.log(`${space.title} — ${space.participant_count} participants`);\n * ```\n */\n async getDetail(spaceId: string): Promise<Space> {\n return this.client.request<Space>(`/v1/twitter/spaces/${spaceId}`);\n }\n\n /**\n * Get details for a live video broadcast.\n *\n * @param broadcastId - The broadcast ID to fetch.\n * @returns The broadcast data.\n * @throws NotFoundError - If the broadcast doesn't exist.\n *\n * @example\n * ```typescript\n * const broadcast = await client.twitter.spaces.getBroadcast(\"broadcast123\");\n * console.log(`${broadcast.title}: ${broadcast.total_viewers} viewers`);\n * ```\n */\n async getBroadcast(broadcastId: string): Promise<Broadcast> {\n return this.client.request<Broadcast>(`/v1/twitter/spaces/broadcast/${broadcastId}`);\n }\n}\n","/**\n * Twitter API client.\n *\n * Provides access to all Twitter API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { TweetsClient } from \"./tweets.js\";\nimport { UsersClient } from \"./users.js\";\nimport { ListsClient } from \"./lists.js\";\nimport { CommunitiesClient } from \"./communities.js\";\nimport { TrendsClient } from \"./trends.js\";\nimport { GeoClient } from \"./geo.js\";\nimport { StreamClient } from \"./stream.js\";\nimport { SpacesClient } from \"./spaces.js\";\n\n/**\n * Twitter API client with access to all Twitter endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `tweets` - Tweet operations (get, search, replies, retweeters, etc.)\n * - `users` - User operations (profiles, followers, following, search, etc.)\n * - `lists` - List operations (details, members, tweets, search, etc.)\n * - `communities` - Community operations (details, members, tweets, search, etc.)\n * - `trends` - Trending topics and locations\n * - `geo` - Geographic place information\n * - `stream` - Real-time stream monitor management and WebSocket streaming\n * - `spaces` - Twitter Spaces and live broadcast details\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Access tweets\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n *\n * // Access users\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n *\n * // Access trends\n * const trends = await client.twitter.trends.getTrends();\n *\n * // Search with automatic pagination\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\")) {\n * console.log(tweet.text);\n * }\n *\n * // Stream live tweets\n * const stream = client.twitter.stream.connect();\n * stream.on(\"tweet\", (event) => console.log(event.authorUsername));\n * ```\n */\nexport class TwitterClient {\n private readonly _gen: BaseClient;\n\n /** Client for tweet operations */\n readonly tweets: TweetsClient;\n\n /** Client for user operations */\n readonly users: UsersClient;\n\n /** Client for list operations */\n readonly lists: ListsClient;\n\n /** Client for community operations */\n readonly communities: CommunitiesClient;\n\n /** Client for trends operations */\n readonly trends: TrendsClient;\n\n /** Client for geo/places operations */\n readonly geo: GeoClient;\n\n /** Client for real-time stream monitor management and WebSocket streaming */\n readonly stream: StreamClient;\n\n /** Client for Twitter Spaces and live broadcast operations */\n readonly spaces: SpacesClient;\n\n /**\n * Create a new Twitter client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.tweets = new TweetsClient(client);\n this.users = new UsersClient(client);\n this.lists = new ListsClient(client);\n this.communities = new CommunitiesClient(client);\n this.trends = new TrendsClient(client);\n this.geo = new GeoClient(client);\n this.stream = new StreamClient(client);\n this.spaces = new SpacesClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Delete filter rule. Generated from the OpenAPI spec; returns the raw response object. */\n async deleteFilterRule(\n ruleId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"DELETE\",\n params,\n body,\n });\n }\n\n /** Update filter rule. Generated from the OpenAPI spec; returns the raw response object. */\n async updateFilterRule(\n ruleId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/filter-rules/${ruleId}`, {\n method: \"PATCH\",\n params,\n body,\n });\n }\n\n /** Delete stream monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async deleteStreamMonitor(\n monitorId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"DELETE\",\n params,\n body,\n });\n }\n\n /** Update stream monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async updateStreamMonitor(\n monitorId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/monitors/${monitorId}`, {\n method: \"PATCH\",\n params,\n body,\n });\n }\n\n /** List webhooks. Generated from the OpenAPI spec; returns the raw response object. */\n async listWebhooks(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/twitter/stream/webhooks\", { params });\n }\n\n /** Configure webhook on a monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async configureWebhookOnAMonitor(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/twitter/stream/webhooks\", { method: \"POST\", params, body });\n }\n\n /** Test webhook delivery. Generated from the OpenAPI spec; returns the raw response object. */\n async testWebhookDelivery(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/twitter/stream/webhooks/test\", { method: \"POST\", params, body });\n }\n\n /** Remove webhook from monitor. Generated from the OpenAPI spec; returns the raw response object. */\n async removeWebhookFromMonitor(\n webhookId: string,\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/twitter/stream/webhooks/${webhookId}`, {\n method: \"DELETE\",\n params,\n body,\n });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Web scraping API client for ScrapeBadger SDK.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ScrapeOptions, ScrapeResult, DetectOptions, DetectResult } from \"./types.js\";\n\n/**\n * Client for web scraping operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Simple scrape\n * const result = await client.web.scrape(\"https://scrapebadger.com\");\n * console.log(result.content);\n *\n * // Scrape with JavaScript rendering\n * const rendered = await client.web.scrape(\"https://scrapebadger.com\", {\n * renderJs: true,\n * format: \"markdown\",\n * });\n *\n * // AI extraction\n * const extracted = await client.web.extract(\n * \"https://scrapebadger.com/pricing\",\n * \"Extract all pricing plans with their features\"\n * );\n *\n * // Detect anti-bot systems\n * const detection = await client.web.detect(\"https://scrapebadger.com\");\n * console.log(detection.antibot_systems);\n * ```\n */\nexport class WebClient {\n private readonly _gen: BaseClient;\n\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.client = client;\n }\n\n /**\n * Scrape a web page.\n *\n * @param url - The URL to scrape\n * @param options - Scrape configuration options\n * @returns The scrape result including content, metadata, and credit usage\n */\n async scrape(url: string, options: ScrapeOptions = {}): Promise<ScrapeResult> {\n const body: Record<string, unknown> = { url };\n\n if (options.format !== undefined) body.format = options.format;\n if (options.renderJs !== undefined) body.render_js = options.renderJs;\n if (options.engine !== undefined) body.engine = options.engine;\n if (options.waitFor !== undefined) body.wait_for = options.waitFor;\n if (options.waitTimeout !== undefined) body.wait_timeout = options.waitTimeout;\n if (options.waitAfterLoad !== undefined) body.wait_after_load = options.waitAfterLoad;\n if (options.jsScenario !== undefined) body.js_scenario = options.jsScenario;\n if (options.sessionId !== undefined) body.session_id = options.sessionId;\n if (options.retryCount !== undefined) body.retry_count = options.retryCount;\n if (options.retryOnBlock !== undefined) body.retry_on_block = options.retryOnBlock;\n if (options.country !== undefined) body.country = options.country;\n if (options.customHeaders !== undefined) body.custom_headers = options.customHeaders;\n if (options.screenshot !== undefined) body.screenshot = options.screenshot;\n if (options.video !== undefined) body.video = options.video;\n if (options.antiBot !== undefined) body.anti_bot = options.antiBot;\n if (options.escalate !== undefined) body.escalate = options.escalate;\n if (options.maxCost !== undefined) body.max_cost = options.maxCost;\n if (options.aiExtract !== undefined) body.ai_extract = options.aiExtract;\n if (options.aiPrompt !== undefined) body.ai_prompt = options.aiPrompt;\n if (options.rawContent !== undefined) body.raw_content = options.rawContent;\n if (options.skipBotDetection !== undefined) body.skip_bot_detection = options.skipBotDetection;\n\n if (options.rawContent) {\n return this.scrapeRaw(body);\n }\n\n return this.client.request<ScrapeResult>(\"/v1/web/scrape\", {\n method: \"POST\",\n body,\n });\n }\n\n /**\n * Run a `rawContent` scrape, whose response is not JSON.\n *\n * The normal path funnels a non-JSON response into `{ detail: text }`, so a\n * raw scrape returned a result with no content — and for a binary target,\n * `response.text()` decoded the bytes as UTF-8 and destroyed them. Read the\n * body as bytes and rebuild the metadata from the `X-Scrape-*` headers the\n * server sends in this mode.\n */\n private async scrapeRaw(body: Record<string, unknown>): Promise<ScrapeResult> {\n const { bytes, headers, status } = await this.client.postBinary(\"/v1/web/scrape\", {\n body,\n });\n\n const int = (name: string): number => {\n const parsed = Number.parseInt(headers.get(name) ?? \"\", 10);\n return Number.isNaN(parsed) ? 0 : parsed;\n };\n\n const mediaType = ((headers.get(\"content-type\") ?? \"\").split(\";\")[0] ?? \"\")\n .trim()\n .toLowerCase();\n // Only decode when the payload is genuinely text — decoding an image or a\n // PDF is the very corruption this mode exists to avoid.\n const isText =\n mediaType.startsWith(\"text/\") ||\n [\"application/json\", \"application/xml\", \"image/svg+xml\"].includes(mediaType);\n\n return {\n success: headers.get(\"x-scrape-success\") !== \"0\",\n url: headers.get(\"x-scrape-url\") ?? (typeof body.url === \"string\" ? body.url : \"\"),\n status_code: int(\"x-scrape-status-code\") || status,\n content: isText ? new TextDecoder().decode(bytes) : null,\n content_bytes: bytes,\n content_base64: null,\n is_binary: !isText,\n content_type: mediaType || null,\n format: headers.get(\"x-scrape-format\") ?? \"html\",\n engine_used: headers.get(\"x-scrape-engine\") ?? \"\",\n credits_used: int(\"x-credits-used\"),\n duration_ms: int(\"x-scrape-duration-ms\"),\n retries_used: int(\"x-scrape-retries\"),\n content_length: int(\"x-scrape-content-length\") || bytes.length,\n screenshot_url: null,\n video_url: null,\n headers: {},\n blocking_detected: false,\n } as ScrapeResult;\n }\n\n /**\n * Extract structured data from a web page using AI.\n *\n * Convenience wrapper around {@link scrape} that enables AI extraction\n * with the given prompt and defaults to markdown format.\n *\n * @param url - The URL to extract data from\n * @param prompt - Natural language prompt describing what to extract (max 2000 chars)\n * @param options - Additional scrape options (aiExtract and aiPrompt are set automatically)\n * @returns The scrape result with ai_extraction populated\n */\n async extract(url: string, prompt: string, options: ScrapeOptions = {}): Promise<ScrapeResult> {\n return this.scrape(url, {\n format: \"markdown\",\n ...options,\n aiExtract: true,\n aiPrompt: prompt,\n });\n }\n\n /**\n * Detect anti-bot systems on a URL.\n *\n * @param url - The URL to analyze\n * @param options - Detection options\n * @returns Detection results including identified anti-bot and captcha systems\n */\n async detect(url: string, options: DetectOptions = {}): Promise<DetectResult> {\n const body: Record<string, unknown> = { url };\n\n if (options.timeout !== undefined) body.timeout = options.timeout;\n if (options.country !== undefined) body.country = options.country;\n\n return this.client.request<DetectResult>(\"/v1/web/detect\", {\n method: \"POST\",\n body,\n });\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Submit batch scraping job. Generated from the OpenAPI spec; returns the raw response object. */\n async submitBatchScrapingJob(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/web/batch\", { method: \"POST\", params, body });\n }\n\n /** Get batch job status. Generated from the OpenAPI spec; returns the raw response object. */\n async getBatchJobStatus(\n jobId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/web/batch/${jobId}`, { params });\n }\n\n /** Extract structured data. Generated from the OpenAPI spec; returns the raw response object. */\n async extractStructuredData(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/web/extract\", { method: \"POST\", params, body });\n }\n\n /** Take a screenshot. Generated from the OpenAPI spec; returns the raw response object. */\n async takeAScreenshot(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/web/screenshot\", { method: \"POST\", params, body });\n }\n\n /** Poll an auto-unblock discovery job. Generated from the OpenAPI spec; returns the raw response object. */\n async pollAnAutoUnblockDiscoveryJob(\n jobId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/web/unblock/${jobId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Vinted Search API client.\n *\n * Provides methods for searching Vinted item listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { VintedSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for Vinted search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Basic search\n * const results = await client.vinted.search.search({ query: \"nike air max\" });\n * for (const item of results.items) {\n * console.log(`${item.title} — ${item.price.amount} ${item.price.currency_code}`);\n * }\n *\n * // Search with filters\n * const filtered = await client.vinted.search.search({\n * query: \"adidas\",\n * market: \"de\",\n * price_from: 10,\n * price_to: 50,\n * order: \"price_low_to_high\",\n * });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search for Vinted items.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results with items and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.vinted.search.search({\n * query: \"vintage jacket\",\n * market: \"fr\",\n * page: 1,\n * per_page: 20,\n * order: \"newest_first\",\n * });\n * console.log(`Found ${results.pagination.total_entries} items`);\n * ```\n *\n * @example\n * ```typescript\n * // Restrict to a Vinted category (women's T-shirts on vinted.fr).\n * const tshirts = await client.vinted.search.search({\n * query: \"nike\",\n * catalog_ids: \"221\",\n * });\n * ```\n *\n * @example\n * ```typescript\n * // Filter results to sellers physically located in France or Belgium.\n * const local = await client.vinted.search.search({\n * query: \"vintage jacket\",\n * seller_country: \"fr,be\",\n * });\n * for (const item of local.items) {\n * console.log(`${item.title} — seller in ${item.seller_country_code}`);\n * }\n * ```\n */\n async search(params: VintedSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/vinted/search\", {\n params: {\n query: params.query,\n market: params.market,\n page: params.page,\n per_page: params.per_page,\n price_from: params.price_from,\n price_to: params.price_to,\n brand_ids: params.brand_ids,\n catalog_ids: params.catalog_ids,\n color_ids: params.color_ids,\n status_ids: params.status_ids,\n order: params.order,\n seller_country: params.seller_country,\n },\n });\n }\n}\n","/**\n * Vinted Items API client.\n *\n * Provides methods for fetching individual Vinted item details.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ItemDetailResponse } from \"./types.js\";\n\n/**\n * Client for Vinted item endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const item = await client.vinted.items.get(123456789, { market: \"fr\" });\n * console.log(`${item.item.title} — ${item.item.price.amount} ${item.item.price.currency_code}`);\n * console.log(`Seller: ${item.item.seller.login}`);\n * ```\n */\nexport class ItemsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single item by ID.\n *\n * @param itemId - The Vinted item ID to fetch.\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns The item detail response including full item data.\n * @throws NotFoundError - If the item doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.items.get(123456789);\n * const { item } = response;\n * console.log(`${item.title}: ${item.description}`);\n * console.log(`Brand: ${item.brand_title}, Size: ${item.size_title}`);\n * console.log(`Photos: ${item.photos.length}`);\n * ```\n */\n async get(itemId: number, options: { market?: string } = {}): Promise<ItemDetailResponse> {\n return this.client.request<ItemDetailResponse>(`/v1/vinted/items/${itemId}`, {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Vinted Users API client.\n *\n * Provides methods for fetching Vinted user profiles and their item listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { UserProfileResponse, UserItemsResponse } from \"./types.js\";\n\n/**\n * Client for Vinted user endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get user profile\n * const profile = await client.vinted.users.getProfile(12345);\n * console.log(`${profile.user.login} — ${profile.user.item_count} items`);\n *\n * // Get user's items\n * const items = await client.vinted.users.getItems(12345);\n * for (const item of items.items) {\n * console.log(`${item.title} — ${item.price.amount} ${item.price.currency_code}`);\n * }\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a user's profile.\n *\n * @param userId - The Vinted user ID.\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns The user profile response.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.users.getProfile(12345);\n * const { user } = response;\n * console.log(`${user.login} from ${user.city}, ${user.country_code}`);\n * console.log(`Reputation: ${user.feedback_reputation}`);\n * console.log(`Items: ${user.item_count}, Followers: ${user.followers_count}`);\n * ```\n */\n async getProfile(\n userId: number,\n options: { market?: string } = {}\n ): Promise<UserProfileResponse> {\n return this.client.request<UserProfileResponse>(`/v1/vinted/users/${userId}`, {\n params: { market: options.market },\n });\n }\n\n /**\n * Get items listed by a user.\n *\n * @param userId - The Vinted user ID.\n * @param options - Optional parameters for pagination and market.\n * @param options.market - Market code (default: \"fr\").\n * @param options.page - Page number.\n * @param options.per_page - Items per page.\n * @returns The user's items with pagination metadata.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.users.getItems(12345, {\n * market: \"de\",\n * page: 1,\n * per_page: 20,\n * });\n * console.log(`Page ${response.pagination.current_page} of ${response.pagination.total_pages}`);\n * for (const item of response.items) {\n * console.log(`${item.title} — ${item.price.amount} ${item.price.currency_code}`);\n * }\n * ```\n */\n async getItems(\n userId: number,\n options: { market?: string; page?: number; per_page?: number } = {}\n ): Promise<UserItemsResponse> {\n return this.client.request<UserItemsResponse>(`/v1/vinted/users/${userId}/items`, {\n params: {\n market: options.market,\n page: options.page,\n per_page: options.per_page,\n },\n });\n }\n}\n","/**\n * Vinted Reference Data API client.\n *\n * Provides methods for fetching brands, colors, statuses, and markets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BrandsResponse, ColorsResponse, StatusesResponse, MarketsResponse } from \"./types.js\";\n\n/**\n * Client for Vinted reference data endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get available markets\n * const markets = await client.vinted.reference.markets();\n * for (const market of markets.markets) {\n * console.log(`${market.name} (${market.code}) — ${market.currency}`);\n * }\n *\n * // Search brands\n * const brands = await client.vinted.reference.brands({ keyword: \"nike\" });\n * for (const brand of brands.brands) {\n * console.log(`${brand.title}: ${brand.item_count} items`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search for brands by keyword.\n *\n * @param options - Optional parameters.\n * @param options.keyword - Brand name to search for.\n * @param options.market - Market code (default: \"fr\").\n * @param options.per_page - Number of results per page.\n * @returns Brands matching the keyword.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.brands({\n * keyword: \"adidas\",\n * market: \"de\",\n * per_page: 10,\n * });\n * for (const brand of response.brands) {\n * console.log(`${brand.title} (${brand.slug}): ${brand.item_count} items`);\n * }\n * ```\n */\n async brands(\n options: { keyword?: string; market?: string; per_page?: number } = {}\n ): Promise<BrandsResponse> {\n return this.client.request<BrandsResponse>(\"/v1/vinted/brands\", {\n params: {\n keyword: options.keyword,\n market: options.market,\n per_page: options.per_page,\n },\n });\n }\n\n /**\n * Get available colors for a market.\n *\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns List of available colors.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.colors({ market: \"fr\" });\n * for (const color of response.colors) {\n * console.log(`${color.title} (#${color.hex})`);\n * }\n * ```\n */\n async colors(options: { market?: string } = {}): Promise<ColorsResponse> {\n return this.client.request<ColorsResponse>(\"/v1/vinted/colors\", {\n params: { market: options.market },\n });\n }\n\n /**\n * Get available item condition statuses for a market.\n *\n * @param options - Optional parameters.\n * @param options.market - Market code (default: \"fr\").\n * @returns List of item condition statuses.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.statuses({ market: \"fr\" });\n * for (const status of response.statuses) {\n * console.log(`${status.id}: ${status.title}`);\n * }\n * ```\n */\n async statuses(options: { market?: string } = {}): Promise<StatusesResponse> {\n return this.client.request<StatusesResponse>(\"/v1/vinted/statuses\", {\n params: { market: options.market },\n });\n }\n\n /**\n * Get all available Vinted markets.\n *\n * @returns List of all supported Vinted markets/countries.\n *\n * @example\n * ```typescript\n * const response = await client.vinted.reference.markets();\n * for (const market of response.markets) {\n * console.log(`${market.name}: ${market.domain} (${market.currency})`);\n * }\n * ```\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/vinted/markets\");\n }\n}\n","/**\n * Vinted API client.\n *\n * Provides access to all Vinted API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ItemsClient } from \"./items.js\";\nimport { UsersClient } from \"./users.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Vinted API client with access to all Vinted endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Search for items across Vinted marketplaces\n * - `items` - Get individual item details\n * - `users` - User profiles and their item listings\n * - `reference` - Reference data (brands, colors, statuses, markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search items\n * const results = await client.vinted.search.search({ query: \"nike air max\" });\n *\n * // Get item details\n * const item = await client.vinted.items.get(123456789);\n *\n * // Get user profile\n * const user = await client.vinted.users.getProfile(12345);\n *\n * // Get reference data\n * const markets = await client.vinted.reference.markets();\n * ```\n */\nexport class VintedClient {\n /** Client for item search operations */\n readonly search: SearchClient;\n\n /** Client for individual item operations */\n readonly items: ItemsClient;\n\n /** Client for user operations */\n readonly users: UsersClient;\n\n /** Client for reference data (brands, colors, statuses, markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Vinted client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.items = new ItemsClient(client);\n this.users = new UsersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Google AI Mode API client (udm=50 generative answers).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { AiModeResponse, AiModeSearchParams } from \"./types.js\";\n\n/**\n * Client for Google AI Mode.\n */\nexport class AiModeClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get an AI-generated answer from Google's AI Mode (udm=50).\n *\n * The response carries structured `text_blocks` (prose, headings,\n * comparison `table` blocks and lists), a flat `references` list, a\n * compact `markdown` rendering and — unless `include_html: false` —\n * the raw `answer_html` body.\n */\n async search(params: AiModeSearchParams): Promise<AiModeResponse> {\n return this.client.request<AiModeResponse>(\"/v1/google/ai-mode/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Autocomplete API client.\n *\n * Returns up to 10 search suggestions. Suggestions that resolve to\n * Knowledge-Graph entities (companies, people, movies, stocks, local\n * businesses, …) additionally carry `entity_name` and `thumbnail` —\n * the same enrichment Google's own search-box surfaces.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { AutocompleteParams, GoogleResponse } from \"./types.js\";\n\n/**\n * Client for Google Autocomplete (search suggestions).\n */\nexport class AutocompleteClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get Google autocomplete suggestions for a query.\n *\n * @example\n * ```typescript\n * const res = await client.google.autocomplete.get({ q: \"apple\" });\n * for (const s of res.suggestions) {\n * console.log(s.value, s.entity_name, s.thumbnail);\n * }\n * ```\n */\n async get(params: AutocompleteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/autocomplete\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Finance API client.\n *\n * Powered by the same `mKsvE` batchexecute RPC the Google Finance SPA\n * uses internally. Returns price / change / change% / previous_close /\n * after-hours / market hours / timezone / currency / country /\n * alternate exchange listings in ~1 s.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { FinanceQuoteParams, GoogleResponse } from \"./types.js\";\n\n/**\n * Client for Google Finance quotes.\n *\n * @example\n * ```typescript\n * const quote = await client.google.finance.quote({ q: \"AAPL:NASDAQ\" });\n * console.log(quote.price, quote.currency, quote.after_hours);\n * ```\n */\nexport class FinanceClient {\n constructor(private readonly client: BaseClient) {}\n\n async quote(params: FinanceQuoteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/finance/quote\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Flights API client — one-way, round-trip, multi-city.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { FlightsSearchParams, GoogleResponse } from \"./types.js\";\n\n/**\n * Client for Google Flights search.\n *\n * Supports one-way, round-trip, and multi-city itineraries with\n * passenger configuration, cabin class, stops filter, and max-price.\n * Returns Google's Best flights recommendations plus the full Other\n * flights result set, with per-offer pricing, duration, stops,\n * layovers, carbon emissions, and price insights (low / typical /\n * high + typical price range) when Google shows them.\n *\n * @example\n * ```typescript\n * const flights = await client.google.flights.search({\n * departure_id: \"JFK\",\n * arrival_id: \"LHR\",\n * outbound_date: \"2026-06-15\",\n * return_date: \"2026-06-22\",\n * adults: 2,\n * });\n * for (const offer of flights.best_flights) {\n * console.log(offer.price, offer.currency, offer.total_duration_minutes);\n * }\n * if (flights.price_insights) {\n * console.log(\"Price level:\", flights.price_insights.price_level);\n * }\n * ```\n */\nexport class FlightsClient {\n constructor(private readonly client: BaseClient) {}\n\n /** Search Google Flights for available itineraries. */\n async search(params: FlightsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/flights/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Hotels API client — search, property details.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, HotelsDetailsParams, HotelsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Hotels endpoints.\n *\n * @example\n * ```typescript\n * const hotels = await client.google.hotels.search({\n * q: \"Paris\",\n * check_in: \"2026-05-01\",\n * check_out: \"2026-05-05\",\n * adults: 2,\n * });\n * ```\n */\nexport class HotelsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: HotelsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/hotels/search\", {\n params: { ...params },\n });\n }\n\n async details(params: HotelsDetailsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/hotels/details\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Images API client.\n *\n * Returns up to 100 tiles per page with `title`, `source`, `link`\n * (referrer page), `thumbnail`, `image` (inline preview), `original`\n * (full-res URL), `original_width` / `original_height`,\n * `original_size` (e.g. `\"635KB\"`), plus licensability flags.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, ImagesSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Images search.\n *\n * @example\n * ```typescript\n * const res = await client.google.images.search({\n * q: \"golden retriever\",\n * imgsz: \"l\",\n * imgcolor: \"color\",\n * });\n * for (const img of res.results) {\n * console.log(img.rank, img.title, img.original);\n * }\n * ```\n */\nexport class ImagesClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: ImagesSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/images/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Jobs API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, JobsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Jobs search.\n *\n * @example\n * ```typescript\n * const jobs = await client.google.jobs.search({\n * q: \"software engineer\",\n * location: \"San Francisco, CA\",\n * job_type: \"FULLTIME\",\n * });\n * ```\n */\nexport class JobsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: JobsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/jobs/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Lens API client (visual image search).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, LensSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Lens visual search by image URL.\n *\n * Response carries `lens_results` (Scrapingdog-parity alias) with\n * `title`, `source`, `source_favicon`, `thumbnail`, `rating`,\n * `reviews` and `in_stock`. Shoppable matches also carry `price`\n * (`{value, currency, extracted}`) plus the raw `tag` chip it is\n * parsed from. `related_searches` chips come alongside. Legacy\n * `results` alias retained for backwards compat.\n *\n * @example\n * ```typescript\n * const out = await client.google.lens.search({\n * url: \"https://example.com/photo.jpg\",\n * product: true, // bias towards shoppable matches\n * });\n * for (const match of out.lens_results) {\n * console.log(match.title, match.price?.value, match.price?.currency);\n * }\n * ```\n */\nexport class LensClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: LensSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/lens/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Maps API client — search, place details, reviews, photos, posts.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n MapsPhotosParams,\n MapsPlaceParams,\n MapsPostsParams,\n MapsReviewsParams,\n MapsSearchParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Maps endpoints.\n *\n * @example\n * ```typescript\n * const places = await client.google.maps.search({ q: \"coffee shops sf\" });\n * const detail = await client.google.maps.place({ data_id: \"0x...:0x...\" });\n * const reviews = await client.google.maps.reviews({\n * data_id: \"0x...:0x...\",\n * sort_by: \"newestFirst\",\n * });\n * ```\n */\nexport class MapsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Maps for places by text query, place_id, or ludocid.\n *\n * Returns up to 20 results per page with full details (place_id,\n * data_id, GPS, rating, reviews, address, phone, website, extensions,\n * weekly hours, thumbnail) in a single call.\n */\n async search(params: MapsSearchParams): Promise<GoogleResponse> {\n if (!params.q && !params.place_id && !params.ludocid) {\n throw new Error(\"q, place_id, or ludocid is required\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/maps/search\", {\n params: { ...params },\n });\n }\n\n /**\n * Get full place detail by `place_id` or `data_id`.\n *\n * Returns title, address, phone, website, GPS, rating, reviews_count,\n * rating_summary (per-star distribution), categories, extensions\n * (service_options, accessibility, offerings, payments), weekly\n * operating hours, popular_times graph, provider_id,\n * permanently_closed, thumbnail, and photo list.\n */\n async place(params: MapsPlaceParams): Promise<GoogleResponse> {\n if (!params.place_id && !params.data_id) {\n throw new Error(\"place_id or data_id is required\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/maps/place\", {\n params: { ...params },\n });\n }\n\n /**\n * Get reviews for a place (paginated, optional topic filter).\n *\n * Pass the `next_page_token` from `response.pagination.next` for\n * subsequent pages, or use `topic_id` from `response.topics[].id`\n * to scope to a specific review topic.\n */\n async reviews(params: MapsReviewsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/maps/reviews\", {\n params: { ...params },\n });\n }\n\n /**\n * Get photos for a place with place-specific categories.\n *\n * Returns place-specific categories (Menu, Vibe, Comfort food, dish\n * names) and photo URLs from all CDN families. Use `category_id` to\n * scope to a category, or `page_size: 200` to fetch all photos in\n * one call (Google caps at ~120 photos per response).\n */\n async photos(params: MapsPhotosParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/maps/photos\", {\n params: { ...params },\n });\n }\n\n /** Get business posts (promotional updates, announcements) for a place. */\n async posts(params: MapsPostsParams): Promise<GoogleResponse> {\n if (!params.data_id && !params.place_id) {\n throw new Error(\"data_id or place_id is required\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/maps/posts\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google News API client — search, topics, trending.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n NewsSearchParams,\n NewsTopicsParams,\n NewsTrendingParams,\n} from \"./types.js\";\n\n/**\n * Client for Google News endpoints.\n *\n * @example\n * ```typescript\n * const articles = await client.google.news.search({ q: \"openai\" });\n * const tech = await client.google.news.topics({ topic: \"TECHNOLOGY\" });\n * const trending = await client.google.news.trending();\n * ```\n */\nexport class NewsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Google News. One of `q`, `topic_token`, `publication_token`,\n * or `story_token` is required (or pass no params for the trending\n * home feed). Returns `menu_links`, `news_results`, `related_topics`.\n */\n async search(params: NewsSearchParams = {}): Promise<GoogleResponse> {\n if (!params.q && !params.topic_token && !params.publication_token && !params.story_token) {\n throw new Error(\"Provide q, topic_token, publication_token, or story_token\");\n }\n return this.client.request<GoogleResponse>(\"/v1/google/news/search\", {\n params: { ...params },\n });\n }\n\n async topics(params: NewsTopicsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/news/topics\", {\n params: { ...params },\n });\n }\n\n async trending(params: NewsTrendingParams = {}): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/news/trending\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Patents API client — search, detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, PatentsDetailParams, PatentsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Patents endpoints.\n *\n * @example\n * ```typescript\n * const results = await client.google.patents.search({\n * q: \"distributed lock\",\n * assignee: \"Google\",\n * });\n * ```\n */\nexport class PatentsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: PatentsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/patents/search\", {\n params: { ...params },\n });\n }\n\n /**\n * Get rich patent document details by patent number.\n *\n * Response includes full abstract + every claim + complete description,\n * plus structured `cpc_classifications` (code + description), split\n * `backward_citations` / `forward_citations` (with `primary_examiner`\n * flag), `non_patent_citations`, `concepts` (research fields),\n * `legal_events` (prosecution history), `figures` (full-res URLs),\n * every `inventor`, and the full `assignees_original` history.\n */\n async detail(params: PatentsDetailParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/patents/detail\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Products API client (immersive product detail).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, ProductsDetailParams } from \"./types.js\";\n\n/**\n * Client for Google's immersive product detail endpoint.\n */\nexport class ProductsClient {\n constructor(private readonly client: BaseClient) {}\n\n async detail(params: ProductsDetailParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/products/detail\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Scholar API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n ScholarAuthorCitationParams,\n ScholarAuthorParams,\n ScholarCiteParams,\n ScholarProfilesParams,\n ScholarSearchParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Scholar — search, author profiles, citation charts,\n * and citation formats.\n *\n * Search results carry doc `id`, `type` badge, wrapped `inline_links`\n * (versions + cited_by + related), PDF `resources`, and author objects\n * with `author_id` for pipe-through into {@link ScholarClient.author}.\n * The author endpoint returns structured `interests_detailed`,\n * publications with per-article `citation_id` + nested `cited_by`, and\n * lifetime + since-year citation stats.\n *\n * @example\n * ```typescript\n * const papers = await client.google.scholar.search({\n * q: \"transformer neural networks\",\n * as_ylo: 2020,\n * });\n * const first = papers.scholar_results[0];\n * // Pipe a profiled author into the author endpoint:\n * if (first.authors[0].author_id) {\n * const profile = await client.google.scholar.author({\n * author_id: first.authors[0].author_id,\n * });\n * }\n * ```\n */\nexport class ScholarClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Google Scholar. Returns each result with doc `id`, `type`\n * badge, wrapped `inline_links`, PDF `resources`, and structured\n * authors. Envelope includes `scholar_results` alias,\n * `related_searches`, and matched `profiles` cards.\n */\n async search(params: ScholarSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/search\", {\n params: { ...params },\n });\n }\n\n /** Search Google Scholar for author profiles by name. */\n async profiles(params: ScholarProfilesParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/profiles\", {\n params: { ...params },\n });\n }\n\n /**\n * Full Scholar author profile: structured `interests_detailed`,\n * publications (with per-article `citation_id` + nested\n * `cited_by{value, link, citation_id}`), stats, and co-authors.\n */\n async author(params: ScholarAuthorParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/author\", {\n params: { ...params },\n });\n }\n\n /** Citations-per-year chart for a Scholar author. */\n async authorCitation(params: ScholarAuthorCitationParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/author/citation\", {\n params: { ...params },\n });\n }\n\n /**\n * MLA / APA / Chicago / Harvard / Vancouver citation formats plus\n * BibTeX / RIS / EndNote / RefWorks export links for a paper.\n */\n async cite(params: ScholarCiteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/scholar/cite\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Web Search (SERP) API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, GoogleSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Web Search.\n *\n * @example\n * ```typescript\n * const serp = await client.google.search.search({ q: \"python 3.13\" });\n * for (const r of serp.organic_results as any[]) {\n * console.log(r.title, r.link);\n * }\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Google and get a structured SERP response with organic results,\n * knowledge graph, People Also Ask, related searches, AI overview, and\n * pagination.\n */\n async search(params: GoogleSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/search\", { params: { ...params } });\n }\n\n /**\n * Lightweight Google Search — organic results + related searches only.\n *\n * ~40% faster than {@link search}. Skips ads, Knowledge Graph, AI\n * Overview, local pack, news, inline videos, and shopping blocks.\n * Credit cost is configured per-endpoint by admins — query\n * `/public/pricing` for the live rate.\n *\n * @example\n * ```typescript\n * const lite = await client.google.search.light({ q: \"python 3.13\" });\n * ```\n */\n async light(params: GoogleSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/search\", {\n params: { ...params, mode: \"fast\" },\n });\n }\n}\n","/**\n * Google Shopping API client — search and product detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n ShoppingClickParams,\n ShoppingOffersParams,\n ShoppingProductParams,\n ShoppingSearchParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Shopping endpoints.\n *\n * Each search tile now carries Google's native `gpcid`, `catalog_id`,\n * `headline_offer_docid`, `image_docid`, and `mid`, so callers can pipe a\n * tile directly into `client.google.products.detail()` for full specs\n * plus merchant offers via the fast `/async/oapv` RPC (~2s).\n *\n * @example\n * ```typescript\n * const products = await client.google.shopping.search({ q: \"laptop\" });\n * const first = (products.results as any[])[0];\n * const detail = await client.google.products.detail({\n * product_id: first.gpcid,\n * q: \"laptop\",\n * include_offers: true, // real merchant URLs from /async/piu_ps\n * });\n * ```\n */\nexport class ShoppingClient {\n constructor(private readonly client: BaseClient) {}\n\n /** Search Google Shopping for products. */\n async search(params: ShoppingSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/search\", {\n params: { ...params },\n });\n }\n\n /** Fetch the Google Shopping product detail page by `product_id`. */\n async product(params: ShoppingProductParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/product\", {\n params: { ...params },\n });\n }\n\n /**\n * Resolve the direct merchant URL for a Shopping product tile via\n * Google's \"I'm Feeling Lucky\" redirect (scoped to the card's `source`\n * merchant via the `site:` operator). You only pay for the call when\n * you actually want the merchant link — no bulk enrichment of every\n * tile.\n */\n async click(params: ShoppingClickParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/product/click\", {\n params: { ...params },\n });\n }\n\n /**\n * Multi-seller Google Shopping offers for a product, by `barcode`\n * (GTIN-8/UPC-A/EAN-13/GTIN-14, resolved via Google web search first) or\n * by Google Shopping `catalog_id` (sellers read off Google's product page).\n * Throws on 400 (not exactly one identifier), 422 (invalid barcode) or 404\n * (nothing resolves).\n */\n async offers(params: ShoppingOffersParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shopping/offers\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Shorts API client — short-form vertical video results.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, ShortsSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Shorts search (`udm=39`).\n *\n * Returns a carousel of short-form videos — YouTube Shorts plus\n * TikToks, Instagram Reels, Facebook Reels, and other platforms.\n * Every tile carries `title`, `link`, `source` (platform),\n * `account_name`, `thumbnail`, `image` (inline preview),\n * `duration`, and `video_id` (YouTube only).\n *\n * @example\n * ```typescript\n * const shorts = await client.google.shorts.search({ q: \"cooking hacks\" });\n * for (const v of shorts.short_videos_results) {\n * console.log(v.rank, v.title, v.source, v.account_name);\n * }\n * ```\n */\nexport class ShortsClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: ShortsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/shorts/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Trends API client — interest, regions, related, trending.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n GoogleResponse,\n TrendsAutocompleteParams,\n TrendsInterestParams,\n TrendsRegionsParams,\n TrendsRelatedParams,\n TrendsSearchParams,\n TrendsTrendingNowParams,\n TrendsTrendingParams,\n} from \"./types.js\";\n\n/**\n * Client for Google Trends endpoints.\n *\n * @example\n * ```typescript\n * const interest = await client.google.trends.interest({\n * q: \"python,javascript\",\n * date: \"today 12-m\",\n * });\n * ```\n */\nexport class TrendsClient {\n constructor(private readonly client: BaseClient) {}\n\n async interest(params: TrendsInterestParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/interest\", {\n params: { ...params },\n });\n }\n\n async regions(params: TrendsRegionsParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/regions\", {\n params: { ...params },\n });\n }\n\n async related(params: TrendsRelatedParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/related\", {\n params: { ...params },\n });\n }\n\n async trending(params: TrendsTrendingParams = {}): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/trending\", {\n params: { ...params },\n });\n }\n\n /**\n * Current trending searches with the full Google Trends UI filter set\n * — `geo`, `hours`, `category`, `status`, `sort`, `hl`.\n */\n async trendingNow(params: TrendsTrendingNowParams = {}): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/trending-now\", {\n params: { ...params },\n });\n }\n\n /**\n * Unified Google Trends query — pick the response shape via\n * `data_type` (TIMESERIES | GEO_MAP | GEO_MAP_0 | RELATED_TOPICS |\n * RELATED_QUERIES).\n */\n async search(params: TrendsSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/search\", {\n params: { ...params },\n });\n }\n\n /**\n * Return categorized Knowledge Graph topic entities (`mid`, `type`,\n * direct link into Trends explore) for a query prefix. Distinct from\n * Google Search autocomplete.\n */\n async autocomplete(params: TrendsAutocompleteParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/trends/autocomplete\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Videos API client.\n *\n * Returns up to 10 tiles per page with `title`, `link`\n * (YouTube / Vimeo / etc.), `displayed_link`, `snippet`, `thumbnail`,\n * `image` (inline base-64), `favicon`, `duration`, `channel`,\n * `source` (platform), `date`, `video_id`, and raw `extensions`.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GoogleResponse, VideosSearchParams } from \"./types.js\";\n\n/**\n * Client for Google Videos search.\n *\n * @example\n * ```typescript\n * const res = await client.google.videos.search({ q: \"python tutorial\" });\n * for (const v of res.results) {\n * console.log(v.rank, v.title, v.duration, v.channel);\n * }\n * ```\n */\nexport class VideosClient {\n constructor(private readonly client: BaseClient) {}\n\n async search(params: VideosSearchParams): Promise<GoogleResponse> {\n return this.client.request<GoogleResponse>(\"/v1/google/videos/search\", {\n params: { ...params },\n });\n }\n}\n","/**\n * Google Scraper API aggregator — exposes all 16 Google product sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { AiModeClient } from \"./ai-mode.js\";\nimport { AutocompleteClient } from \"./autocomplete.js\";\nimport { FinanceClient } from \"./finance.js\";\nimport { FlightsClient } from \"./flights.js\";\nimport { HotelsClient } from \"./hotels.js\";\nimport { ImagesClient } from \"./images.js\";\nimport { JobsClient } from \"./jobs.js\";\nimport { LensClient } from \"./lens.js\";\nimport { MapsClient } from \"./maps.js\";\nimport { NewsClient } from \"./news.js\";\nimport { PatentsClient } from \"./patents.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { ScholarClient } from \"./scholar.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ShoppingClient } from \"./shopping.js\";\nimport { ShortsClient } from \"./shorts.js\";\nimport { TrendsClient } from \"./trends.js\";\nimport { VideosClient } from \"./videos.js\";\n\n/**\n * Google Scraper API client with access to all 19 Google product APIs.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const serp = await client.google.search.search({ q: \"python 3.13\" });\n * const places = await client.google.maps.search({ q: \"coffee shops sf\" });\n * const products = await client.google.shopping.search({ q: \"laptop\" });\n *\n * // Per-product merchant URL enrichment\n * const enriched = await client.google.shopping.click({\n * title: (products.results as any[])[0].title,\n * source: (products.results as any[])[0].source,\n * });\n * console.log(enriched.merchant_url);\n *\n * // New in v0.3: Shorts, Flights, and Scholar depth\n * const shorts = await client.google.shorts.search({ q: \"cooking hacks\" });\n * const flights = await client.google.flights.search({\n * departure_id: \"JFK\",\n * arrival_id: \"LHR\",\n * outbound_date: \"2026-06-15\",\n * return_date: \"2026-06-22\",\n * });\n * const profiles = await client.google.scholar.profiles({\n * mauthors: \"Geoffrey Hinton\",\n * });\n * ```\n */\nexport class GoogleClient {\n private readonly _gen: BaseClient;\n\n /** Google Web Search (SERP) — with optional deferred AI Overview follow-up. */\n readonly search: SearchClient;\n /** Google Maps — places, reviews, photos, posts. */\n readonly maps: MapsClient;\n /** Google News — articles, topics, trending. */\n readonly news: NewsClient;\n /** Google Hotels — search and property details. */\n readonly hotels: HotelsClient;\n /** Google Trends — interest, regions, related, trending, topic autocomplete. */\n readonly trends: TrendsClient;\n /** Google Jobs. */\n readonly jobs: JobsClient;\n /** Google Shopping — search, details, click enrichment. */\n readonly shopping: ShoppingClient;\n /** Google Patents — search and document details. */\n readonly patents: PatentsClient;\n /** Google Scholar — search, profiles, author, author citation, cite formats. */\n readonly scholar: ScholarClient;\n /** Google Autocomplete — search suggestions. */\n readonly autocomplete: AutocompleteClient;\n /** Google Images. */\n readonly images: ImagesClient;\n /** Google Videos. */\n readonly videos: VideosClient;\n /** Google Finance — stock and index quotes. */\n readonly finance: FinanceClient;\n /** Google AI Mode — generative answer responses. */\n readonly aiMode: AiModeClient;\n /** Google Lens — visual image search. */\n readonly lens: LensClient;\n /** Google Shorts — short-form vertical video results (udm=39). */\n readonly shorts: ShortsClient;\n /** Google Flights — one-way, round-trip, and multi-city itineraries. */\n readonly flights: FlightsClient;\n /** Google Products — immersive product detail. */\n readonly products: ProductsClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.search = new SearchClient(client);\n this.maps = new MapsClient(client);\n this.news = new NewsClient(client);\n this.hotels = new HotelsClient(client);\n this.trends = new TrendsClient(client);\n this.jobs = new JobsClient(client);\n this.shopping = new ShoppingClient(client);\n this.patents = new PatentsClient(client);\n this.scholar = new ScholarClient(client);\n this.autocomplete = new AutocompleteClient(client);\n this.images = new ImagesClient(client);\n this.videos = new VideosClient(client);\n this.finance = new FinanceClient(client);\n this.aiMode = new AiModeClient(client);\n this.lens = new LensClient(client);\n this.shorts = new ShortsClient(client);\n this.flights = new FlightsClient(client);\n this.products = new ProductsClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Google AI Overview (inline SERP block). Generated from the OpenAPI spec; returns the raw response object. */\n async googleAiOverviewInlineSerpBlock(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/google/ai-overview\", { params });\n }\n\n /** Google Flights calendar — cheapest fare per date. Generated from the OpenAPI spec; returns the raw response object. */\n async googleFlightsCalendarCheapestFarePerDate(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/google/flights/calendar\", { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Google-Play API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Google-Play API operations. (Generated from the OpenAPI spec.) */\nexport class GooglePlayClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get app detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppDetail(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}`, { params });\n }\n\n /** Get app permissions. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppPermissions(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}/permissions`, { params });\n }\n\n /** Get app reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppReviews(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}/reviews`, { params });\n }\n\n /** Get similar apps. Generated from the OpenAPI spec; returns the raw response object. */\n async getSimilarApps(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/apps/${appId}/similar`, { params });\n }\n\n /** List categories. Generated from the OpenAPI spec; returns the raw response object. */\n async listCategories(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/google-play/categories\", { params });\n }\n\n /** Browse a category. Generated from the OpenAPI spec; returns the raw response object. */\n async browseACategory(\n categoryId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/categories/${categoryId}`, { params });\n }\n\n /** Top charts. Generated from the OpenAPI spec; returns the raw response object. */\n async topCharts(\n collection: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/collections/${collection}`, { params });\n }\n\n /** Get developer apps. Generated from the OpenAPI spec; returns the raw response object. */\n async getDeveloperApps(\n developer: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/google-play/developers/${developer}`, { params });\n }\n\n /** List markets. Generated from the OpenAPI spec; returns the raw response object. */\n async listMarkets(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/google-play/markets\", { params });\n }\n\n /** Search apps. Generated from the OpenAPI spec; returns the raw response object. */\n async searchApps(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/google-play/search\", { params });\n }\n}\n","/**\n * Idealista API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Idealista API operations. (Generated from the OpenAPI spec.) */\nexport class IdealistaClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Agency by phone. Generated from the OpenAPI spec; returns the raw response object. */\n async agencyByPhone(\n phone: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/agency/by-phone/${phone}`, { params });\n }\n\n /** Agency profile + listings. Generated from the OpenAPI spec; returns the raw response object. */\n async agencyProfileListings(\n shortName: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/agency/${shortName}`, { params });\n }\n\n /** List markets. Generated from the OpenAPI spec; returns the raw response object. */\n async listMarkets(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/markets\", { params });\n }\n\n /** Get property detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetail(\n propertyCode: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/properties/${propertyCode}`, { params });\n }\n\n /** Get listing engagement stats. Generated from the OpenAPI spec; returns the raw response object. */\n async getListingEngagementStats(\n propertyCode: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/idealista/properties/${propertyCode}/stats`, { params });\n }\n\n /** Search listings. Generated from the OpenAPI spec; returns the raw response object. */\n async searchListings(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/search\", { params });\n }\n\n /** Search all (beats result cap). Generated from the OpenAPI spec; returns the raw response object. */\n async searchAllBeatsResultCap(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/search/all\", { params });\n }\n\n /** Resolve locations. Generated from the OpenAPI spec; returns the raw response object. */\n async resolveLocations(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/idealista/suggest\", { params });\n }\n}\n","/**\n * Reddit Search API client.\n *\n * Provides methods for searching Reddit posts, subreddits, users, and domain posts.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n SearchPostsResponse,\n SearchSubredditsResponse,\n SearchUsersResponse,\n DomainPostsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search posts\n * const results = await client.reddit.search.posts({ query: \"typescript tips\" });\n * for (const post of results.posts) {\n * console.log(`${post.title} — ${post.score} points`);\n * }\n *\n * // Search subreddits\n * const subs = await client.reddit.search.subreddits({ query: \"programming\" });\n *\n * // Get posts from a domain\n * const domainPosts = await client.reddit.search.domainPosts({ domain: \"github.com\" });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Reddit posts.\n *\n * @param options - Search parameters.\n * @param options.query - Search query string.\n * @param options.subreddit - Restrict search to a specific subreddit.\n * @param options.sort - Sort order (relevance, hot, top, new, comments).\n * @param options.time - Time filter (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Search results with posts and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.posts({\n * query: \"best practices\",\n * subreddit: \"programming\",\n * sort: \"top\",\n * time: \"month\",\n * limit: 25,\n * });\n * console.log(`Found ${results.posts.length} posts`);\n * ```\n */\n async posts(options: {\n query: string;\n subreddit?: string;\n sort?: \"relevance\" | \"hot\" | \"top\" | \"new\" | \"comments\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n }): Promise<SearchPostsResponse> {\n return this.client.request<SearchPostsResponse>(\"/v1/reddit/search/posts\", {\n params: {\n query: options.query,\n subreddit: options.subreddit,\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Search Reddit subreddits.\n *\n * @param options - Search parameters.\n * @param options.query - Search query string.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Matching subreddits with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.subreddits({\n * query: \"javascript\",\n * limit: 10,\n * });\n * for (const sub of results.subreddits) {\n * console.log(`r/${sub.display_name}: ${sub.subscribers.toLocaleString()} subscribers`);\n * }\n * ```\n */\n async subreddits(options: {\n query: string;\n after?: string;\n limit?: number;\n }): Promise<SearchSubredditsResponse> {\n return this.client.request<SearchSubredditsResponse>(\"/v1/reddit/search/subreddits\", {\n params: {\n query: options.query,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Search Reddit users.\n *\n * @param options - Search parameters.\n * @param options.query - Search query string.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Matching users with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the search parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.users({\n * query: \"john\",\n * limit: 20,\n * });\n * for (const user of results.users) {\n * console.log(`u/${user.name}: ${user.total_karma.toLocaleString()} karma`);\n * }\n * ```\n */\n async users(options: {\n query: string;\n after?: string;\n limit?: number;\n }): Promise<SearchUsersResponse> {\n return this.client.request<SearchUsersResponse>(\"/v1/reddit/search/users\", {\n params: {\n query: options.query,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get Reddit posts linking to a specific domain.\n *\n * @param options - Request parameters.\n * @param options.domain - Domain name to search for (e.g. \"github.com\").\n * @param options.sort - Sort order (hot, new, top, rising).\n * @param options.time - Time filter for top sort (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Posts linking to the domain with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.search.domainPosts({\n * domain: \"github.com\",\n * sort: \"top\",\n * time: \"week\",\n * limit: 25,\n * });\n * for (const post of results.posts) {\n * console.log(`r/${post.subreddit}: ${post.title}`);\n * }\n * ```\n */\n async domainPosts(options: {\n domain: string;\n sort?: \"hot\" | \"new\" | \"top\" | \"rising\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n }): Promise<DomainPostsResponse> {\n return this.client.request<DomainPostsResponse>(\"/v1/reddit/search/domain\", {\n params: {\n domain: options.domain,\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n}\n","/**\n * Reddit Posts API client.\n *\n * Provides methods for fetching trending posts, post details, comments, and duplicates.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TrendingPostsResponse,\n PostDetailResponse,\n PostCommentsResponse,\n PostDuplicatesResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit post endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get trending posts\n * const trending = await client.reddit.posts.trending({ subreddit: \"programming\" });\n *\n * // Get post details\n * const post = await client.reddit.posts.get(\"t3_abc123\");\n *\n * // Get post comments\n * const { comments } = await client.reddit.posts.comments(\"abc123\", { subreddit: \"programming\" });\n * ```\n */\nexport class PostsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get trending/hot posts from Reddit or a specific subreddit.\n *\n * @param options - Request parameters.\n * @param options.subreddit - Subreddit name (without r/). If omitted, returns site-wide posts.\n * @param options.sort - Sort order (hot, new, top, rising, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Trending posts with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const results = await client.reddit.posts.trending({\n * subreddit: \"worldnews\",\n * sort: \"hot\",\n * limit: 25,\n * });\n * for (const post of results.posts) {\n * console.log(`${post.title} (${post.num_comments} comments)`);\n * }\n * ```\n */\n async trending(\n options: {\n subreddit?: string;\n sort?: \"hot\" | \"new\" | \"top\" | \"rising\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<TrendingPostsResponse> {\n return this.client.request<TrendingPostsResponse>(\"/v1/reddit/posts\", {\n params: {\n subreddit: options.subreddit,\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get full details of a single Reddit post.\n *\n * @param postId - The Reddit post ID (e.g. \"abc123\" or \"t3_abc123\").\n * @param options - Optional parameters.\n * @param options.subreddit - Subreddit name (helps resolve the post URL).\n * @returns Full post details.\n * @throws NotFoundError - If the post doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.posts.get(\"abc123\", { subreddit: \"programming\" });\n * const { post } = response;\n * console.log(`${post.title} by u/${post.author}`);\n * console.log(`Score: ${post.score}, Comments: ${post.num_comments}`);\n * ```\n */\n async get(postId: string, options: { subreddit?: string } = {}): Promise<PostDetailResponse> {\n return this.client.request<PostDetailResponse>(`/v1/reddit/posts/${postId}`, {\n params: { subreddit: options.subreddit },\n });\n }\n\n /**\n * Get comments for a Reddit post.\n *\n * @param postId - The Reddit post ID (e.g. \"abc123\" or \"t3_abc123\").\n * @param options - Optional parameters.\n * @param options.subreddit - Subreddit name (helps resolve the post URL).\n * @param options.sort - Comment sort order (confidence, top, new, controversial, old, qa).\n * @param options.depth - Maximum comment tree depth.\n * @param options.limit - Number of top-level comments to return.\n * @returns Post details and nested comment tree.\n * @throws NotFoundError - If the post doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.posts.comments(\"abc123\", {\n * subreddit: \"programming\",\n * sort: \"top\",\n * limit: 50,\n * });\n * for (const comment of response.comments) {\n * console.log(`u/${comment.author}: ${comment.body.slice(0, 100)}`);\n * }\n * ```\n */\n async comments(\n postId: string,\n options: {\n subreddit?: string;\n sort?: \"confidence\" | \"top\" | \"new\" | \"controversial\" | \"old\" | \"qa\";\n depth?: number;\n limit?: number;\n } = {}\n ): Promise<PostCommentsResponse> {\n return this.client.request<PostCommentsResponse>(`/v1/reddit/posts/${postId}/comments`, {\n params: {\n subreddit: options.subreddit,\n sort: options.sort,\n depth: options.depth,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get cross-posts and duplicate submissions of a Reddit post.\n *\n * @param postId - The Reddit post ID (e.g. \"abc123\" or \"t3_abc123\").\n * @param options - Optional parameters.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns The original post and its duplicate submissions.\n * @throws NotFoundError - If the post doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.posts.duplicates(\"abc123\");\n * console.log(`Original: ${response.post.title}`);\n * console.log(`Cross-posted ${response.duplicates.length} times`);\n * for (const dupe of response.duplicates) {\n * console.log(` r/${dupe.subreddit}: ${dupe.score} points`);\n * }\n * ```\n */\n async duplicates(\n postId: string,\n options: {\n after?: string;\n limit?: number;\n } = {}\n ): Promise<PostDuplicatesResponse> {\n return this.client.request<PostDuplicatesResponse>(`/v1/reddit/posts/${postId}/duplicates`, {\n params: {\n after: options.after,\n limit: options.limit,\n },\n });\n }\n}\n","/**\n * Reddit Subreddits API client.\n *\n * Provides methods for fetching subreddit details, posts, rules, and wiki pages.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n SubredditDetailResponse,\n SubredditPostsResponse,\n SubredditRulesResponse,\n SubredditWikiPagesResponse,\n WikiPageResponse,\n PopularSubredditsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit subreddit endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get subreddit details\n * const sub = await client.reddit.subreddits.get(\"programming\");\n * console.log(`r/programming: ${sub.subreddit.subscribers.toLocaleString()} subscribers`);\n *\n * // Get subreddit posts\n * const posts = await client.reddit.subreddits.posts(\"programming\", { sort: \"top\" });\n *\n * // Get subreddit rules\n * const rules = await client.reddit.subreddits.rules(\"programming\");\n * ```\n */\nexport class SubredditsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a subreddit's full details and metadata.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @returns Full subreddit details.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.get(\"javascript\");\n * const { subreddit } = response;\n * console.log(`${subreddit.title}: ${subreddit.subscribers.toLocaleString()} members`);\n * console.log(`Description: ${subreddit.public_description}`);\n * ```\n */\n async get(subreddit: string): Promise<SubredditDetailResponse> {\n return this.client.request<SubredditDetailResponse>(`/v1/reddit/subreddits/${subreddit}`);\n }\n\n /**\n * Get posts from a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @param options - Optional parameters.\n * @param options.sort - Sort order (hot, new, top, rising, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Subreddit posts with pagination metadata.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.posts(\"typescript\", {\n * sort: \"top\",\n * time: \"week\",\n * limit: 25,\n * });\n * for (const post of response.posts) {\n * console.log(`${post.title} — ${post.score} pts`);\n * }\n * ```\n */\n async posts(\n subreddit: string,\n options: {\n sort?: \"hot\" | \"new\" | \"top\" | \"rising\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<SubredditPostsResponse> {\n return this.client.request<SubredditPostsResponse>(`/v1/reddit/subreddits/${subreddit}/posts`, {\n params: {\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get the rules for a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @returns List of subreddit rules.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.rules(\"AskReddit\");\n * for (const rule of response.rules) {\n * console.log(`${rule.priority}. ${rule.short_name}`);\n * console.log(` ${rule.description}`);\n * }\n * ```\n */\n async rules(subreddit: string): Promise<SubredditRulesResponse> {\n return this.client.request<SubredditRulesResponse>(`/v1/reddit/subreddits/${subreddit}/rules`);\n }\n\n /**\n * List all wiki pages in a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @returns List of wiki page slugs.\n * @throws NotFoundError - If the subreddit doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.wikiPages(\"rust\");\n * for (const page of response.pages) {\n * console.log(`/r/rust/wiki/${page}`);\n * }\n * ```\n */\n async wikiPages(subreddit: string): Promise<SubredditWikiPagesResponse> {\n return this.client.request<SubredditWikiPagesResponse>(\n `/v1/reddit/subreddits/${subreddit}/wiki`\n );\n }\n\n /**\n * Get the content of a specific wiki page in a subreddit.\n *\n * @param subreddit - Subreddit name (without r/ prefix).\n * @param page - Wiki page slug (e.g. \"index\", \"faq\").\n * @returns Wiki page content and metadata.\n * @throws NotFoundError - If the subreddit or wiki page doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.wikiPage(\"learnprogramming\", \"faq\");\n * console.log(`Last edited by: u/${response.page.revision_by}`);\n * console.log(response.page.content_md);\n * ```\n */\n async wikiPage(subreddit: string, page: string): Promise<WikiPageResponse> {\n return this.client.request<WikiPageResponse>(`/v1/reddit/subreddits/${subreddit}/wiki/${page}`);\n }\n\n /**\n * Get the most popular subreddits on Reddit.\n *\n * @param options - Optional parameters.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns Popular subreddits with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.popular({ limit: 20 });\n * for (const sub of response.subreddits) {\n * console.log(`r/${sub.display_name}: ${sub.subscribers.toLocaleString()} subscribers`);\n * }\n * ```\n */\n async popular(\n options: {\n after?: string;\n limit?: number;\n } = {}\n ): Promise<PopularSubredditsResponse> {\n return this.client.request<PopularSubredditsResponse>(\"/v1/reddit/subreddits/popular\", {\n params: {\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get newly created subreddits on Reddit.\n *\n * @param options - Optional parameters.\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns New subreddits with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.subreddits.newSubreddits({ limit: 20 });\n * for (const sub of response.subreddits) {\n * console.log(`r/${sub.display_name} (created: ${new Date(sub.created_utc * 1000).toLocaleDateString()})`);\n * }\n * ```\n */\n async newSubreddits(\n options: {\n after?: string;\n limit?: number;\n } = {}\n ): Promise<PopularSubredditsResponse> {\n return this.client.request<PopularSubredditsResponse>(\"/v1/reddit/subreddits/new\", {\n params: {\n after: options.after,\n limit: options.limit,\n },\n });\n }\n}\n","/**\n * Reddit Users API client.\n *\n * Provides methods for fetching Reddit user profiles, posts, comments, moderated subreddits, and trophies.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n UserProfileResponse,\n UserPostsResponse,\n UserCommentsResponse,\n UserModeratedResponse,\n UserTrophiesResponse,\n} from \"./types.js\";\n\n/**\n * Client for Reddit user endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get user profile\n * const profile = await client.reddit.users.get(\"spez\");\n * console.log(`u/${profile.user.name}: ${profile.user.total_karma.toLocaleString()} karma`);\n *\n * // Get user's recent posts\n * const posts = await client.reddit.users.posts(\"spez\", { sort: \"top\", limit: 10 });\n *\n * // Get user's comments\n * const comments = await client.reddit.users.comments(\"spez\", { sort: \"new\" });\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a Reddit user's profile.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @returns The user profile response.\n * @throws NotFoundError - If the user doesn't exist or is suspended.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.get(\"spez\");\n * const { user } = response;\n * console.log(`u/${user.name}`);\n * console.log(`Karma: ${user.total_karma.toLocaleString()} (${user.link_karma} post, ${user.comment_karma} comment)`);\n * console.log(`Account age: ${new Date(user.created_utc * 1000).toLocaleDateString()}`);\n * ```\n */\n async get(username: string): Promise<UserProfileResponse> {\n return this.client.request<UserProfileResponse>(`/v1/reddit/users/${username}`);\n }\n\n /**\n * Get posts submitted by a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @param options - Optional parameters.\n * @param options.sort - Sort order (hot, new, top, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns The user's posts with pagination metadata.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.posts(\"spez\", {\n * sort: \"top\",\n * time: \"all\",\n * limit: 25,\n * });\n * for (const post of response.posts) {\n * console.log(`r/${post.subreddit}: ${post.title} (${post.score} pts)`);\n * }\n * ```\n */\n async posts(\n username: string,\n options: {\n sort?: \"hot\" | \"new\" | \"top\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<UserPostsResponse> {\n return this.client.request<UserPostsResponse>(`/v1/reddit/users/${username}/posts`, {\n params: {\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get comments made by a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @param options - Optional parameters.\n * @param options.sort - Sort order (hot, new, top, controversial).\n * @param options.time - Time filter for top/controversial (hour, day, week, month, year, all).\n * @param options.after - Pagination cursor for the next page.\n * @param options.limit - Number of results to return (max 100).\n * @returns The user's comments with pagination metadata.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.comments(\"spez\", {\n * sort: \"new\",\n * limit: 50,\n * });\n * for (const comment of response.comments) {\n * console.log(`r/${comment.subreddit}: ${comment.body.slice(0, 80)}`);\n * }\n * ```\n */\n async comments(\n username: string,\n options: {\n sort?: \"hot\" | \"new\" | \"top\" | \"controversial\";\n time?: \"hour\" | \"day\" | \"week\" | \"month\" | \"year\" | \"all\";\n after?: string;\n limit?: number;\n } = {}\n ): Promise<UserCommentsResponse> {\n return this.client.request<UserCommentsResponse>(`/v1/reddit/users/${username}/comments`, {\n params: {\n sort: options.sort,\n time: options.time,\n after: options.after,\n limit: options.limit,\n },\n });\n }\n\n /**\n * Get subreddits moderated by a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @returns Subreddits moderated by the user.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.moderated(\"spez\");\n * for (const sub of response.subreddits) {\n * console.log(`r/${sub.display_name}: ${sub.subscribers.toLocaleString()} subscribers`);\n * }\n * ```\n */\n async moderated(username: string): Promise<UserModeratedResponse> {\n return this.client.request<UserModeratedResponse>(`/v1/reddit/users/${username}/moderated`);\n }\n\n /**\n * Get trophies awarded to a Reddit user.\n *\n * @param username - The Reddit username (without u/ prefix).\n * @returns List of trophies awarded to the user.\n * @throws NotFoundError - If the user doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n *\n * @example\n * ```typescript\n * const response = await client.reddit.users.trophies(\"spez\");\n * for (const trophy of response.trophies) {\n * console.log(`${trophy.name}${trophy.description ? `: ${trophy.description}` : \"\"}`);\n * }\n * ```\n */\n async trophies(username: string): Promise<UserTrophiesResponse> {\n return this.client.request<UserTrophiesResponse>(`/v1/reddit/users/${username}/trophies`);\n }\n}\n","/**\n * Reddit API client.\n *\n * Provides access to all Reddit API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { PostsClient } from \"./posts.js\";\nimport { SubredditsClient } from \"./subreddits.js\";\nimport { UsersClient } from \"./users.js\";\n\n/**\n * Reddit API client with access to all Reddit endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Search posts, subreddits, users, and domain posts\n * - `posts` - Trending posts, post details, comments, and cross-posts\n * - `subreddits` - Subreddit details, posts, rules, moderators, and wiki pages\n * - `users` - User profiles, posts, comments, moderated subreddits, and trophies\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search posts\n * const results = await client.reddit.search.posts({ query: \"typescript tips\" });\n *\n * // Get subreddit details\n * const sub = await client.reddit.subreddits.get(\"programming\");\n *\n * // Get user profile\n * const user = await client.reddit.users.get(\"spez\");\n *\n * // Get trending posts\n * const trending = await client.reddit.posts.trending({ sort: \"hot\" });\n * ```\n */\nexport class RedditClient {\n /** Client for search operations (posts, subreddits, users, domain posts) */\n readonly search: SearchClient;\n\n /** Client for post operations (trending, details, comments, duplicates) */\n readonly posts: PostsClient;\n\n /** Client for subreddit operations (details, posts, rules, moderators, wiki) */\n readonly subreddits: SubredditsClient;\n\n /** Client for user operations (profile, posts, comments, moderated, trophies) */\n readonly users: UsersClient;\n\n /**\n * Create a new Reddit client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.posts = new PostsClient(client);\n this.subreddits = new SubredditsClient(client);\n this.users = new UsersClient(client);\n }\n}\n","/**\n * Apartments.com API client.\n *\n * Endpoints: search (rental listings by location, 40 cards a page) and\n * getProperty (one property with full per-unit pricing and availability, by\n * URL or by slug + id). Single market: apartments.com (US, USD, en-US).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n ApartmentsPropertyParams,\n ApartmentsSearchParams,\n Property,\n SearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Apartments.com API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search a location\n * const page = await client.apartments.search(\"kansas-city-mo\", { beds: 1 });\n * console.log(`${page.total_results} rentals`);\n *\n * // Drill into one card for unit-level pricing\n * const prop = await client.apartments.getProperty(page.results[0].url!);\n * for (const unit of prop.units) {\n * console.log(unit.unit_number, unit.rent, unit.available_text);\n * }\n * ```\n */\nexport class ApartmentsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search rental listings in a location.\n *\n * @param location - apartments.com slug (`\"kansas-city-mo\"`) or a ZIP.\n * @param params - Optional page and bed/price filters.\n *\n * @remarks\n * Cards are summaries with a rent/bed rollup. For per-unit rent and\n * availability, pass a card's `url` to {@link getProperty}.\n */\n async search(location: string, params: ApartmentsSearchParams = {}): Promise<SearchResponse> {\n const query: Record<string, string | number> = {\n location,\n page: params.page ?? 1,\n };\n if (params.beds !== undefined) query.beds = params.beds;\n if (params.minPrice !== undefined) query.min_price = params.minPrice;\n if (params.maxPrice !== undefined) query.max_price = params.maxPrice;\n return this.client.request<SearchResponse>(\"/v1/apartments/search\", { params: query });\n }\n\n /**\n * Get one property with floor plans and per-unit inventory.\n *\n * @param url - Full property URL. Omit to look up by `slug` + `propertyId`.\n * @param params - `slug` and `propertyId` alternative to a URL.\n *\n * @remarks\n * Use `unit.rent` (the advertised price), not `unit.max_term_rent` — the\n * latter is the site's raw `data-maxrent`, roughly double the advertised\n * rent.\n */\n async getProperty(url?: string, params: ApartmentsPropertyParams = {}): Promise<Property> {\n if (url) {\n return this.client.request<Property>(\"/v1/apartments/property\", { params: { url } });\n }\n if (params.slug && params.propertyId) {\n return this.client.request<Property>(\n `/v1/apartments/properties/${params.slug}/${params.propertyId}`\n );\n }\n throw new Error(\"Provide either url, or both slug and propertyId\");\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get property detail by slug + id. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetailBySlugId(\n slug: string,\n propertyId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/apartments/properties/${slug}/${propertyId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * App-Store API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all App-Store API operations. (Generated from the OpenAPI spec.) */\nexport class AppStoreClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get app detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppDetail(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/app-store/apps/${appId}`, { params });\n }\n\n /** Get app reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getAppReviews(\n appId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/app-store/apps/${appId}/reviews`, { params });\n }\n\n /** Top charts. Generated from the OpenAPI spec; returns the raw response object. */\n async topCharts(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/charts\", { params });\n }\n\n /** Get developer apps. Generated from the OpenAPI spec; returns the raw response object. */\n async getDeveloperApps(\n artistId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/app-store/developers/${artistId}`, { params });\n }\n\n /** List genres. Generated from the OpenAPI spec; returns the raw response object. */\n async listGenres(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/genres\", { params });\n }\n\n /** List markets. Generated from the OpenAPI spec; returns the raw response object. */\n async listMarkets(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/markets\", { params });\n }\n\n /** Search apps. Generated from the OpenAPI spec; returns the raw response object. */\n async searchApps(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/app-store/search\", { params });\n }\n}\n","/**\n * Instagram Users API client.\n *\n * Fetches user profiles and their content: posts, videos, reels, tagged/pinned\n * media, followers, following, stories, and highlights.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Highlight, Media, Paginated, User, UserAbout, UserShort } from \"./types.js\";\n\n/**\n * Client for Instagram user endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.instagram.users.get(\"instagram\");\n * console.log(`@${profile.username}: ${profile.follower_count.toLocaleString()} followers`);\n *\n * const posts = await client.instagram.users.posts(\"instagram\", { amount: 12 });\n * for (const media of posts.items) {\n * console.log(media.code, media.like_count);\n * }\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get a user's full profile. */\n async get(username: string): Promise<User> {\n return this.client.request<User>(`/v1/instagram/users/${username}`);\n }\n\n /**\n * Get \"About this account\" metadata for a user.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async about(username: string): Promise<UserAbout> {\n return this.client.request<UserAbout>(`/v1/instagram/users/${username}/about`);\n }\n\n /**\n * Get accounts related/suggested for a user.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async related(username: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/users/${username}/related`);\n }\n\n /** Get a user's timeline posts. */\n async posts(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/posts`, options);\n }\n\n /**\n * Get a user's video posts (IGTV/feed videos).\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async videos(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/videos`, options);\n }\n\n /**\n * Get a user's reels.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async reels(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/reels`, options);\n }\n\n /**\n * Get media a user is tagged in.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async tagged(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return this.media(`/v1/instagram/users/${username}/tagged`, options);\n }\n\n /**\n * Get a user's pinned posts.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async pinned(username: string): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(`/v1/instagram/users/${username}/pinned`);\n }\n\n /**\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n *\n * Get a user's followers.\n *\n * @param username - Instagram username.\n * @param options.amount - Number of followers to return.\n * @param options.cursor - Pagination cursor from a previous response.\n * @param options.order - Ordering hint (e.g. \"default\", \"date_followed_earliest\").\n */\n async followers(\n username: string,\n options: { amount?: number; cursor?: string; order?: string } = {}\n ): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/users/${username}/followers`, {\n params: {\n amount: options.amount,\n cursor: options.cursor,\n order: options.order,\n },\n });\n }\n\n /**\n * Get the accounts a user follows.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async following(\n username: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/users/${username}/following`, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n }\n\n /**\n * Search within a user's followers by name/username.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async searchFollowers(\n username: string,\n query: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(\n `/v1/instagram/users/${username}/followers/search`,\n {\n params: { query, amount: options.amount, cursor: options.cursor },\n }\n );\n }\n\n /**\n * Get a user's currently-live stories.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async stories(username: string): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(`/v1/instagram/users/${username}/stories`);\n }\n\n /**\n * Get a user's story highlights.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async highlights(username: string): Promise<Paginated<Highlight>> {\n return this.client.request<Paginated<Highlight>>(`/v1/instagram/users/${username}/highlights`);\n }\n\n private async media(\n path: string,\n options: { amount?: number; cursor?: string }\n ): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(path, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n }\n}\n","/**\n * Instagram Media API client.\n *\n * Fetches media details, oEmbed metadata, comments, comment replies, and the\n * users who liked a media or a comment.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Comment, Media, Oembed, Paginated, UserShort } from \"./types.js\";\n\n/**\n * Client for Instagram media endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const media = await client.instagram.media.get(\"C1abcdEfGhI\");\n * console.log(media.caption_text, media.like_count);\n *\n * const comments = await client.instagram.media.comments(media.code, { amount: 20 });\n * for (const comment of comments.items) {\n * console.log(`@${comment.user?.username}: ${comment.text}`);\n * }\n * ```\n */\nexport class MediaClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a media's full details.\n *\n * @param code - The media shortcode (from the `/p/<code>/` URL).\n */\n async get(code: string): Promise<Media> {\n return this.client.request<Media>(`/v1/instagram/media/${code}`);\n }\n\n /**\n * Get oEmbed metadata for a media permalink.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async oembed(code: string): Promise<Oembed> {\n return this.client.request<Oembed>(`/v1/instagram/media/${code}/oembed`);\n }\n\n /** Get top-level comments on a media. */\n async comments(\n code: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Comment>> {\n return this.client.request<Paginated<Comment>>(`/v1/instagram/media/${code}/comments`, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n }\n\n /**\n * Get the users who liked a media.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async likers(code: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(`/v1/instagram/media/${code}/likers`);\n }\n\n /**\n * Get replies to a comment.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async replies(\n code: string,\n commentId: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Comment>> {\n return this.client.request<Paginated<Comment>>(\n `/v1/instagram/media/${code}/comments/${commentId}/replies`,\n { params: { amount: options.amount, cursor: options.cursor } }\n );\n }\n\n /**\n * Get the users who liked a comment.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async commentLikers(code: string, commentId: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(\n `/v1/instagram/media/${code}/comments/${commentId}/likers`\n );\n }\n}\n","/**\n * Instagram Search API client.\n *\n * Searches users, hashtags, places, the \"top\" blended results, reels, and\n * music, plus a lightweight autocomplete/typeahead.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n Audio,\n Hashtag,\n Location,\n Media,\n Paginated,\n SearchTopResponse,\n UserShort,\n} from \"./types.js\";\n\n/**\n * Client for Instagram search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const users = await client.instagram.search.users(\"nike\");\n * for (const user of users.items) {\n * console.log(`@${user.username}: ${user.full_name}`);\n * }\n *\n * const tags = await client.instagram.search.hashtags(\"running\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search accounts by name/username.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async users(query: string): Promise<Paginated<UserShort>> {\n return this.client.request<Paginated<UserShort>>(\"/v1/instagram/search/users\", {\n params: { query },\n });\n }\n\n /**\n * Search hashtags.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async hashtags(query: string): Promise<Paginated<Hashtag>> {\n return this.client.request<Paginated<Hashtag>>(\"/v1/instagram/search/hashtags\", {\n params: { query },\n });\n }\n\n /**\n * Search places/locations.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async places(query: string): Promise<Paginated<Location>> {\n return this.client.request<Paginated<Location>>(\"/v1/instagram/search/places\", {\n params: { query },\n });\n }\n\n /**\n * Search reels.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async reels(query: string): Promise<Paginated<Media>> {\n return this.client.request<Paginated<Media>>(\"/v1/instagram/search/reels\", {\n params: { query },\n });\n }\n\n /**\n * Search music/audio tracks.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async music(query: string): Promise<Paginated<Audio>> {\n return this.client.request<Paginated<Audio>>(\"/v1/instagram/search/music\", {\n params: { query },\n });\n }\n\n /**\n * Get blended \"top\" results (users, hashtags, and places).\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async top(query: string): Promise<SearchTopResponse> {\n return this.client.request<SearchTopResponse>(\"/v1/instagram/search/top\", {\n params: { query },\n });\n }\n\n /**\n * Get typeahead/autocomplete suggestions (mixed entity types).\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async autocomplete(query: string): Promise<SearchTopResponse> {\n return this.client.request<SearchTopResponse>(\"/v1/instagram/search/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Instagram hashtag, location, and audio API clients.\n *\n * These endpoints return standalone entities plus their associated media\n * feeds, so they live together in one reference module.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { Audio, Hashtag, Location, Media, Paginated } from \"./types.js\";\n\nfunction mediaFeed(\n client: BaseClient,\n path: string,\n options: { amount?: number; cursor?: string }\n): Promise<Paginated<Media>> {\n return client.request<Paginated<Media>>(path, {\n params: { amount: options.amount, cursor: options.cursor },\n });\n}\n\n/** Client for Instagram hashtag endpoints. */\nexport class HashtagsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a hashtag's info (media count, cover).\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async get(tag: string): Promise<Hashtag> {\n return this.client.request<Hashtag>(`/v1/instagram/hashtags/${tag}`);\n }\n\n /**\n * Get the top/popular media for a hashtag.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async top(\n tag: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/top`, options);\n }\n\n /**\n * Get the most recent media for a hashtag.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async recent(\n tag: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/recent`, options);\n }\n\n /**\n * Get reels for a hashtag.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async reels(\n tag: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/hashtags/${tag}/reels`, options);\n }\n}\n\n/** Client for Instagram location endpoints. */\nexport class LocationsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a location's info.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async get(pk: string): Promise<Location> {\n return this.client.request<Location>(`/v1/instagram/locations/${pk}`);\n }\n\n /**\n * Get the top/popular media for a location.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async top(\n pk: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/locations/${pk}/top`, options);\n }\n\n /**\n * Get the most recent media for a location.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async recent(\n pk: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/locations/${pk}/recent`, options);\n }\n\n /**\n * Search locations by name.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async search(query: string): Promise<Paginated<Location>> {\n return this.client.request<Paginated<Location>>(\"/v1/instagram/locations/search\", {\n params: { query },\n });\n }\n}\n\n/** Client for Instagram audio/music endpoints. */\nexport class AudioClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get an audio track's info.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async get(audioId: string): Promise<Audio> {\n return this.client.request<Audio>(`/v1/instagram/audio/${audioId}`);\n }\n\n /**\n * Get media that use an audio track.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async media(\n audioId: string,\n options: { amount?: number; cursor?: string } = {}\n ): Promise<Paginated<Media>> {\n return mediaFeed(this.client, `/v1/instagram/audio/${audioId}/media`, options);\n }\n\n /**\n * Get currently-trending audio tracks.\n * @deprecated Temporarily unavailable — authenticated data is temporarily offline.\n */\n async trending(): Promise<Paginated<Audio>> {\n return this.client.request<Paginated<Audio>>(\"/v1/instagram/audio/trending\");\n }\n}\n","/**\n * Instagram API client.\n *\n * Provides access to all Instagram API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { UsersClient } from \"./users.js\";\nimport { MediaClient } from \"./media.js\";\nimport { SearchClient } from \"./search.js\";\nimport { HashtagsClient, LocationsClient, AudioClient } from \"./reference.js\";\n\n/**\n * Instagram API client with access to all Instagram endpoints.\n *\n * Sub-clients:\n * - `users` - Profiles, posts, reels, followers, stories, highlights\n * - `media` - Media details, comments, replies, likers, oEmbed\n * - `search` - Users, hashtags, places, top, reels, music, autocomplete\n * - `hashtags` - Hashtag info and its top/recent/reels feeds\n * - `locations` - Location info, top/recent feeds, and location search\n * - `audio` - Audio info, its media, and trending audio\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.instagram.users.get(\"instagram\");\n * const posts = await client.instagram.users.posts(\"instagram\", { amount: 12 });\n * const media = await client.instagram.media.get(\"C1abcdEfGhI\");\n * const users = await client.instagram.search.users(\"nike\");\n * ```\n */\nexport class InstagramClient {\n private readonly _gen: BaseClient;\n\n /** Client for user operations (profile, posts, followers, stories, highlights) */\n readonly users: UsersClient;\n\n /** Client for media operations (detail, comments, replies, likers, oEmbed) */\n readonly media: MediaClient;\n\n /** Client for search operations (users, hashtags, places, top, reels, music, autocomplete) */\n readonly search: SearchClient;\n\n /** Client for hashtag operations (info, top, recent, reels) */\n readonly hashtags: HashtagsClient;\n\n /** Client for location operations (info, top, recent, search) */\n readonly locations: LocationsClient;\n\n /** Client for audio operations (info, media, trending) */\n readonly audio: AudioClient;\n\n /**\n * Create a new Instagram client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.users = new UsersClient(client);\n this.media = new MediaClient(client);\n this.search = new SearchClient(client);\n this.hashtags = new HashtagsClient(client);\n this.locations = new LocationsClient(client);\n this.audio = new AudioClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get location. Generated from the OpenAPI spec; returns the raw response object. */\n async getLocation(\n locationPk: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/instagram/locations/${locationPk}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Redfin API client.\n *\n * Redfin endpoints: search (for-sale listings), getProperty (full\n * single-listing detail, by propertyId or URL), getAgent (agent profile +\n * listings, by agentId or URL), autocomplete (location suggestions), and\n * listMarkets. Single market: redfin.com (US, USD, en-US).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n RedfinSearchParams,\n RedfinPropertyParams,\n RedfinAgentParams,\n SearchResponse,\n PropertyResponse,\n AgentResponse,\n AutocompleteResponse,\n MarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Redfin API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search for-sale listings\n * const results = await client.redfin.search(\"Austin, TX\");\n * for (const listing of results.results) {\n * console.log(`${listing.position}. ${listing.street_line} — ${listing.price}`);\n * }\n *\n * // Full single-listing detail\n * const detail = await client.redfin.getProperty(\"12345678\");\n * console.log(detail.property.price);\n *\n * // Agent profile\n * const agent = await client.redfin.getAgent(\"jane-doe\");\n *\n * // Supported markets\n * const markets = await client.redfin.listMarkets();\n * ```\n */\nexport class RedfinClient {\n private readonly _gen: BaseClient;\n\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.client = client;\n }\n\n /**\n * Search Redfin for for-sale properties.\n *\n * @param location - City/state, ZIP, address or neighborhood (required).\n * @param options - Optional parameters (page, sort, price/beds/baths/sqft/lot\n * filters, year built, max days on market, bbox override).\n * @returns Search response with matching listings, map bounds, and pagination.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(location: string, options: RedfinSearchParams = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/redfin/search\", {\n params: {\n location,\n page: options.page,\n sort: options.sort,\n price_min: options.price_min,\n price_max: options.price_max,\n beds_min: options.beds_min,\n baths_min: options.baths_min,\n home_type: options.home_type,\n sqft_min: options.sqft_min,\n sqft_max: options.sqft_max,\n lot_min: options.lot_min,\n lot_max: options.lot_max,\n year_built_min: options.year_built_min,\n year_built_max: options.year_built_max,\n max_days_on_market: options.max_days_on_market,\n north: options.north,\n south: options.south,\n east: options.east,\n west: options.west,\n },\n });\n }\n\n /**\n * Get a single Redfin property's full detail by id or URL.\n *\n * Provide either `propertyId` or `options.url`.\n *\n * @param propertyId - The Redfin property id.\n * @param options - Optional parameters (url).\n * @returns Property detail response.\n * @throws NotFoundError - If the property doesn't exist.\n */\n async getProperty(\n propertyId?: string,\n options: RedfinPropertyParams = {}\n ): Promise<PropertyResponse> {\n if (options.url) {\n return this.client.request<PropertyResponse>(\"/v1/redfin/property\", {\n params: { url: options.url },\n });\n }\n return this.client.request<PropertyResponse>(`/v1/redfin/property/${propertyId}`);\n }\n\n /**\n * Get a Redfin agent's profile and their active listings.\n *\n * Provide either `agentId` or `options.url`.\n *\n * @param agentId - The Redfin agent slug.\n * @param options - Optional parameters (url).\n * @returns Agent profile response with the agent and their listings.\n * @throws NotFoundError - If the agent doesn't exist.\n */\n async getAgent(agentId?: string, options: RedfinAgentParams = {}): Promise<AgentResponse> {\n return this.client.request<AgentResponse>(\"/v1/redfin/agent\", {\n params: { agent_id: agentId, url: options.url },\n });\n }\n\n /**\n * Resolve a search term to Redfin locations.\n *\n * @param query - Partial location — city, ZIP, address, or neighborhood.\n * @returns Autocomplete response with location suggestions.\n */\n async autocomplete(query: string): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/redfin/autocomplete\", {\n params: { query },\n });\n }\n\n /**\n * Get all supported Redfin coverage markets.\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/redfin/markets\");\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get property detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetail(\n propertyId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/redfin/property/${propertyId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Account API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Account API operations. (Generated from the OpenAPI spec.) */\nexport class AccountClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Get account info. Generated from the OpenAPI spec; returns the raw response object. */\n async getAccountInfo(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/account/me\", { params });\n }\n}\n","/**\n * Airbnb API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Airbnb API operations. (Generated from the OpenAPI spec.) */\nexport class AirbnbClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Search experiences. Generated from the OpenAPI spec; returns the raw response object. */\n async searchExperiences(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/airbnb/experiences\", { params });\n }\n\n /** Get experience detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getExperienceDetail(\n experienceId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/experiences/${experienceId}`, { params });\n }\n\n /** Get listing detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getListingDetail(\n roomId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/listings/${roomId}`, { params });\n }\n\n /** Get availability calendar. Generated from the OpenAPI spec; returns the raw response object. */\n async getAvailabilityCalendar(\n roomId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/listings/${roomId}/calendar`, { params });\n }\n\n /** Get listing reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getListingReviews(\n roomId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/airbnb/listings/${roomId}/reviews`, { params });\n }\n\n /** Search stays. Generated from the OpenAPI spec; returns the raw response object. */\n async searchStays(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/airbnb/search\", { params });\n }\n}\n","/**\n * Amazon Search API client.\n *\n * Provides methods for keyword search and keyword autocomplete suggestions.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonSearchParams,\n AmazonAutocompleteParams,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.amazon.search.search({ query: \"wireless headphones\" });\n * for (const item of results.results) {\n * console.log(`${item.position}. ${item.title}`);\n * }\n *\n * const suggestions = await client.amazon.search.autocomplete(\"lapt\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Amazon for products by keyword.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results with rows and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: AmazonSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/amazon/search\", {\n params: {\n query: params.query,\n domain: params.domain,\n page: params.page,\n sort_by: params.sort_by,\n category: params.category,\n min_price: params.min_price,\n max_price: params.max_price,\n zip: params.zip,\n language: params.language,\n },\n });\n }\n\n /**\n * Get Amazon keyword autocomplete suggestions.\n *\n * @param query - Partial search query string.\n * @param options - Optional parameters (domain).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: AmazonAutocompleteParams = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/amazon/autocomplete\", {\n params: { query, domain: options.domain },\n });\n }\n}\n","/**\n * Amazon Products API client.\n *\n * Provides methods for fetching product detail, offers, and reviews by ASIN.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonProductParams,\n AmazonOffersParams,\n AmazonReviewsParams,\n ProductDetailResponse,\n OffersResponse,\n ReviewsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon product endpoints (detail, offers, reviews).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.amazon.products.get(\"B08N5WRWNW\");\n * console.log(detail.product.title);\n *\n * const offers = await client.amazon.products.offers(\"B08N5WRWNW\");\n * console.log(`${offers.total_offers} offers`);\n *\n * const reviews = await client.amazon.products.reviews(\"B08N5WRWNW\");\n * ```\n */\nexport class ProductsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full product detail (PDP) for an ASIN.\n *\n * @param asin - The product ASIN.\n * @param options - Optional parameters (domain, zip, language).\n * @returns Product detail including variants, badges, buybox, and related products.\n * @throws NotFoundError - If the product doesn't exist.\n */\n async get(asin: string, options: AmazonProductParams = {}): Promise<ProductDetailResponse> {\n return this.client.request<ProductDetailResponse>(`/v1/amazon/products/${asin}`, {\n params: {\n domain: options.domain,\n zip: options.zip,\n language: options.language,\n },\n });\n }\n\n /**\n * Get all-seller offers (and the buybox winner) for an ASIN.\n *\n * @param asin - The product ASIN.\n * @param options - Optional parameters (domain, zip).\n * @returns Offers response with the buybox winner and full offer list.\n */\n async offers(asin: string, options: AmazonOffersParams = {}): Promise<OffersResponse> {\n return this.client.request<OffersResponse>(`/v1/amazon/products/${asin}/offers`, {\n params: { domain: options.domain, zip: options.zip },\n });\n }\n\n /**\n * Get product reviews for an ASIN.\n *\n * @param asin - The product ASIN.\n * @param options - Optional parameters (domain, page, sort_by, star, verified_only, media_only).\n * @returns Reviews response with reviews, aggregate rating, and breakdown.\n */\n async reviews(asin: string, options: AmazonReviewsParams = {}): Promise<ReviewsResponse> {\n return this.client.request<ReviewsResponse>(`/v1/amazon/products/${asin}/reviews`, {\n params: {\n domain: options.domain,\n page: options.page,\n sort_by: options.sort_by,\n star: options.star,\n verified_only: options.verified_only,\n media_only: options.media_only,\n },\n });\n }\n}\n","/**\n * Amazon Listings API client.\n *\n * Provides methods for bestsellers, new releases, deals, and category browse.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonListingsParams,\n AmazonDealsParams,\n AmazonCategoryParams,\n BestsellersResponse,\n NewReleasesResponse,\n DealsResponse,\n CategoryResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon listing endpoints (bestsellers, new releases, deals, category).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const top = await client.amazon.listings.bestsellers({ category: \"electronics\" });\n * for (const item of top.bestsellers) {\n * console.log(`#${item.rank}: ${item.title}`);\n * }\n * ```\n */\nexport class ListingsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get the bestsellers list for a marketplace / category.\n *\n * @param options - Optional parameters (domain, category, page).\n * @returns Bestsellers response with ranked products and pagination.\n */\n async bestsellers(options: AmazonListingsParams = {}): Promise<BestsellersResponse> {\n return this.client.request<BestsellersResponse>(\"/v1/amazon/bestsellers\", {\n params: {\n domain: options.domain,\n category: options.category,\n page: options.page,\n },\n });\n }\n\n /**\n * Get the new-releases list for a marketplace / category.\n *\n * @param options - Optional parameters (domain, category, page).\n * @returns New-releases response with ranked products and pagination.\n */\n async newReleases(options: AmazonListingsParams = {}): Promise<NewReleasesResponse> {\n return this.client.request<NewReleasesResponse>(\"/v1/amazon/new-releases\", {\n params: {\n domain: options.domain,\n category: options.category,\n page: options.page,\n },\n });\n }\n\n /**\n * Get current deals for a marketplace / category.\n *\n * @param options - Optional parameters (domain, category, page).\n * @returns Deals response with deal rows and pagination.\n */\n async deals(options: AmazonDealsParams = {}): Promise<DealsResponse> {\n return this.client.request<DealsResponse>(\"/v1/amazon/deals\", {\n params: {\n domain: options.domain,\n category: options.category,\n page: options.page,\n },\n });\n }\n\n /**\n * Browse a category / department by browse-node ID.\n *\n * @param params - Parameters including the required node ID.\n * @returns Category response with result rows and pagination.\n */\n async category(params: AmazonCategoryParams): Promise<CategoryResponse> {\n return this.client.request<CategoryResponse>(\"/v1/amazon/category\", {\n params: {\n node: params.node,\n domain: params.domain,\n page: params.page,\n sort_by: params.sort_by,\n },\n });\n }\n}\n","/**\n * Amazon Sellers API client.\n *\n * Provides methods for seller profile, storefront products, and buyer feedback.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n AmazonSellerParams,\n AmazonSellerListParams,\n SellerProfileResponse,\n SellerProductsResponse,\n SellerFeedbackResponse,\n} from \"./types.js\";\n\n/**\n * Client for Amazon seller endpoints (profile, products, feedback).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.amazon.sellers.get(\"A2L77EE7U53NWQ\");\n * console.log(profile.seller.name);\n *\n * const products = await client.amazon.sellers.products(\"A2L77EE7U53NWQ\");\n * ```\n */\nexport class SellersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a seller's profile and ratings.\n *\n * @param sellerId - The seller ID.\n * @param options - Optional parameters (domain).\n * @returns Seller profile response.\n * @throws NotFoundError - If the seller doesn't exist.\n */\n async get(sellerId: string, options: AmazonSellerParams = {}): Promise<SellerProfileResponse> {\n return this.client.request<SellerProfileResponse>(`/v1/amazon/sellers/${sellerId}`, {\n params: { domain: options.domain },\n });\n }\n\n /**\n * Get a seller's storefront listings.\n *\n * @param sellerId - The seller ID.\n * @param options - Optional parameters (domain, page).\n * @returns Seller products response with result rows and pagination.\n */\n async products(\n sellerId: string,\n options: AmazonSellerListParams = {}\n ): Promise<SellerProductsResponse> {\n return this.client.request<SellerProductsResponse>(`/v1/amazon/sellers/${sellerId}/products`, {\n params: { domain: options.domain, page: options.page },\n });\n }\n\n /**\n * Get buyer feedback entries for a seller.\n *\n * @param sellerId - The seller ID.\n * @param options - Optional parameters (domain, page).\n * @returns Seller feedback response with feedback entries and pagination.\n */\n async feedback(\n sellerId: string,\n options: AmazonSellerListParams = {}\n ): Promise<SellerFeedbackResponse> {\n return this.client.request<SellerFeedbackResponse>(`/v1/amazon/sellers/${sellerId}/feedback`, {\n params: { domain: options.domain, page: options.page },\n });\n }\n}\n","/**\n * Amazon Reference Data API client.\n *\n * Provides methods for fetching the static marketplace and category lists.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse, CategoriesResponse } from \"./types.js\";\n\n/**\n * Client for Amazon reference data endpoints (markets, categories).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.amazon.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n *\n * const categories = await client.amazon.reference.categories();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported Amazon marketplaces.\n *\n * @returns Markets response with all supported marketplaces.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/amazon/markets\");\n }\n\n /**\n * Get the reference department / category aliases.\n *\n * @returns Categories response with all category aliases.\n */\n async categories(): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/amazon/categories\");\n }\n}\n","/**\n * Amazon API client.\n *\n * Provides access to all Amazon API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { ListingsClient } from \"./listings.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Amazon API client with access to all Amazon endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Keyword search and autocomplete\n * - `products` - Product detail, offers, and reviews\n * - `listings` - Bestsellers, new releases, deals, and category browse\n * - `sellers` - Seller profile, storefront products, and feedback\n * - `reference` - Reference data (markets, categories)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search products\n * const results = await client.amazon.search.search({ query: \"wireless headphones\" });\n *\n * // Get product detail\n * const detail = await client.amazon.products.get(\"B08N5WRWNW\");\n *\n * // Get bestsellers\n * const top = await client.amazon.listings.bestsellers({ category: \"electronics\" });\n *\n * // Get a seller profile\n * const seller = await client.amazon.sellers.get(\"A2L77EE7U53NWQ\");\n *\n * // Get reference data\n * const markets = await client.amazon.reference.markets();\n * ```\n */\nexport class AmazonClient {\n /** Client for keyword search and autocomplete */\n readonly search: SearchClient;\n\n /** Client for product detail, offers, and reviews */\n readonly products: ProductsClient;\n\n /** Client for bestsellers, new releases, deals, and category browse */\n readonly listings: ListingsClient;\n\n /** Client for seller profile, products, and feedback */\n readonly sellers: SellersClient;\n\n /** Client for reference data (markets, categories) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Amazon client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.products = new ProductsClient(client);\n this.listings = new ListingsClient(client);\n this.sellers = new SellersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Shopee Search API client.\n *\n * Provides methods for keyword search and category-item listing.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeSearchParams, ShopeeCategoryItemsParams, SearchResult } from \"./types.js\";\n\n/**\n * Client for Shopee search and category-items endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.shopee.search.search({\n * keyword: \"wireless headphones\",\n * market: \"sg\",\n * });\n * for (const item of results.items) {\n * console.log(`${item.name}: ${item.price} ${item.currency}`);\n * }\n *\n * const cat = await client.shopee.search.categoryItems(100001, { market: \"sg\" });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Shopee for products by keyword.\n *\n * @param params - Search parameters including keyword, market, pagination, and sort.\n * @returns Search result page with matched products and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: ShopeeSearchParams): Promise<SearchResult> {\n return this.client.request<SearchResult>(\"/v1/shopee/search\", {\n params: {\n keyword: params.keyword,\n market: params.market,\n limit: params.limit,\n offset: params.offset,\n sort_by: params.sort_by,\n },\n });\n }\n\n /**\n * List products within a specific Shopee category.\n *\n * @param categoryId - The Shopee category ID.\n * @param options - Optional parameters (market, limit, offset, sort_by).\n * @returns Search result page with products in the category.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the category ID or market is invalid.\n */\n async categoryItems(\n categoryId: number,\n options: ShopeeCategoryItemsParams = {}\n ): Promise<SearchResult> {\n return this.client.request<SearchResult>(`/v1/shopee/category/${categoryId}/items`, {\n params: {\n market: options.market,\n limit: options.limit,\n offset: options.offset,\n sort_by: options.sort_by,\n },\n });\n }\n}\n","/**\n * Shopee Products API client.\n *\n * Provides methods for fetching full product detail pages (PDP).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeProductParams, ShopeeProduct } from \"./types.js\";\n\n/**\n * Client for the Shopee product detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const product = await client.shopee.products.get(12345, 67890, { market: \"sg\" });\n * console.log(`${product.name}: ${product.price} ${product.currency}`);\n *\n * for (const model of product.models) {\n * console.log(` Variant: ${model.name} — ${model.price}`);\n * }\n * ```\n */\nexport class ProductsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full product detail (PDP) for a Shopee item.\n *\n * @param shopId - The Shopee shop identifier.\n * @param itemId - The Shopee item identifier.\n * @param options - Optional parameters (market).\n * @returns Full product detail including pricing, ratings, images, and variations.\n * @throws NotFoundError - If the product doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the market code is invalid.\n */\n async get(\n shopId: number,\n itemId: number,\n options: ShopeeProductParams = {}\n ): Promise<ShopeeProduct> {\n return this.client.request<ShopeeProduct>(`/v1/shopee/product/${shopId}/${itemId}`, {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Shopee Reviews API client.\n *\n * Provides methods for fetching product reviews and rating summaries.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeReviewsParams, ReviewsResult } from \"./types.js\";\n\n/**\n * Client for the Shopee product reviews endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const reviews = await client.shopee.reviews.get(12345, 67890, { market: \"sg\" });\n * console.log(`${reviews.summary?.rating_total} reviews`);\n * for (const review of reviews.reviews) {\n * console.log(`${review.author_username}: ${review.rating_star}* ${review.comment}`);\n * }\n * ```\n */\nexport class ReviewsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get product reviews for a Shopee item.\n *\n * @param shopId - The Shopee shop identifier.\n * @param itemId - The Shopee item identifier.\n * @param options - Optional parameters (market, limit, offset, rating, filter).\n * @returns Reviews result page with review items and aggregate summary.\n * @throws NotFoundError - If the product doesn't exist.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async get(\n shopId: number,\n itemId: number,\n options: ShopeeReviewsParams = {}\n ): Promise<ReviewsResult> {\n return this.client.request<ReviewsResult>(`/v1/shopee/product/${shopId}/${itemId}/reviews`, {\n params: {\n market: options.market,\n limit: options.limit,\n offset: options.offset,\n rating: options.rating,\n filter: options.filter,\n },\n });\n }\n}\n","/**\n * Shopee Reference Data API client.\n *\n * Provides methods for fetching the static category tree and markets list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ShopeeCategoriesParams, MarketsResponse, CategoryTree } from \"./types.js\";\n\n/**\n * Client for Shopee reference data endpoints (markets, categories).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.shopee.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n *\n * const tree = await client.shopee.reference.categories({ market: \"sg\" });\n * for (const cat of tree.categories) {\n * console.log(`${cat.category_id}: ${cat.display_name}`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported Shopee marketplaces.\n *\n * @returns Markets response with all supported Shopee markets (0 credits).\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/shopee/markets\");\n }\n\n /**\n * Get the full category tree for a Shopee market.\n *\n * @param options - Optional parameters (market).\n * @returns Category tree with all top-level and nested category nodes.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the market code is invalid.\n */\n async categories(options: ShopeeCategoriesParams = {}): Promise<CategoryTree> {\n return this.client.request<CategoryTree>(\"/v1/shopee/categories\", {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Shopee API client.\n *\n * Provides access to all Shopee API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { ReviewsClient } from \"./reviews.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Shopee API client with access to all Shopee endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Keyword search and category-item listing\n * - `products` - Full product detail pages (PDP)\n * - `reviews` - Product reviews and rating summaries\n * - `reference` - Reference data (markets, category tree)\n *\n * Supported markets: id, ph, vn, br, my, th, sg, tw, co, cl, mx.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search products\n * const results = await client.shopee.search.search({\n * keyword: \"wireless headphones\",\n * market: \"sg\",\n * });\n *\n * // Get product detail\n * const product = await client.shopee.products.get(12345, 67890, { market: \"sg\" });\n *\n * // Get reviews\n * const reviews = await client.shopee.reviews.get(12345, 67890, { rating: 5 });\n *\n * // Get reference data\n * const markets = await client.shopee.reference.markets();\n * const tree = await client.shopee.reference.categories({ market: \"sg\" });\n * ```\n */\nexport class ShopeeClient {\n /** Client for keyword search and category-item listing */\n readonly search: SearchClient;\n\n /** Client for full product detail pages */\n readonly products: ProductsClient;\n\n /** Client for product reviews and rating summaries */\n readonly reviews: ReviewsClient;\n\n /** Client for reference data (markets, category tree) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Shopee client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.products = new ProductsClient(client);\n this.reviews = new ReviewsClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * TikTok Users API client.\n *\n * Provides methods for user profiles and their cursor-paginated lists\n * (videos, followers, following, liked, reposts).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokUserParams,\n TikTokUserListParams,\n ProfileResponse,\n VideoListResponse,\n UserListResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok user endpoints (profile, videos, followers, following, liked, reposts).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.tiktok.users.get(\"charlidamelio\");\n * console.log(profile.user.stats.follower_count);\n *\n * const videos = await client.tiktok.users.videos(\"charlidamelio\", { count: 30 });\n * ```\n */\nexport class UsersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a TikTok user's full profile.\n *\n * @param username - The user's @handle (without the leading '@').\n * @param options - Optional parameters (region).\n * @returns The user profile response.\n * @throws NotFoundError - If the user doesn't exist.\n */\n async get(username: string, options: TikTokUserParams = {}): Promise<ProfileResponse> {\n return this.client.request<ProfileResponse>(`/v1/tiktok/users/${username}`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get a TikTok user's posted videos.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of videos.\n */\n async videos(username: string, options: TikTokUserListParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/users/${username}/videos`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get a TikTok user's followers (best-effort; often guest-gated).\n *\n * @deprecated Requires an authenticated session; currently returns 410.\n * Kept for forward-compatibility — the endpoint may be re-enabled when\n * session-based access is supported.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of follower authors.\n */\n async followers(username: string, options: TikTokUserListParams = {}): Promise<UserListResponse> {\n return this.client.request<UserListResponse>(`/v1/tiktok/users/${username}/followers`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get accounts a TikTok user follows (best-effort).\n *\n * @deprecated Requires an authenticated session; currently returns 410.\n * Kept for forward-compatibility — the endpoint may be re-enabled when\n * session-based access is supported.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of followed authors.\n */\n async following(username: string, options: TikTokUserListParams = {}): Promise<UserListResponse> {\n return this.client.request<UserListResponse>(`/v1/tiktok/users/${username}/following`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get a TikTok user's liked videos (only if their Liked tab is public).\n *\n * @deprecated Requires an authenticated session; currently returns 410.\n * Kept for forward-compatibility — the endpoint may be re-enabled when\n * session-based access is supported.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of videos.\n */\n async liked(username: string, options: TikTokUserListParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/users/${username}/liked`, {\n params: { region: options.region, count: options.count },\n });\n }\n\n /**\n * Get videos a TikTok user has reposted.\n *\n * @param username - The user's @handle.\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of videos.\n */\n async reposts(username: string, options: TikTokUserListParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/users/${username}/reposts`, {\n params: { region: options.region, count: options.count },\n });\n }\n}\n","/**\n * TikTok Videos API client.\n *\n * Provides methods for video detail, comments, comment replies, related\n * videos, transcript, and oEmbed metadata.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokVideoParams,\n TikTokCommentsParams,\n TikTokCommentRepliesParams,\n TikTokRelatedParams,\n TikTokTranscriptParams,\n TikTokOEmbedParams,\n VideoResponse,\n CommentListResponse,\n VideoListResponse,\n TranscriptResponse,\n TikTokOEmbed,\n} from \"./types.js\";\n\n/**\n * Client for TikTok video endpoints (detail, comments, replies, related, transcript, oEmbed).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const video = await client.tiktok.videos.get(\"7372...\");\n * console.log(video.video.stats.play_count);\n *\n * const comments = await client.tiktok.videos.comments(\"7372...\");\n * ```\n */\nexport class VideosClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full metadata for a single TikTok video/post.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region, username).\n * @returns The video detail response.\n * @throws NotFoundError - If the video doesn't exist.\n */\n async get(videoId: string, options: TikTokVideoParams = {}): Promise<VideoResponse> {\n return this.client.request<VideoResponse>(`/v1/tiktok/videos/${videoId}`, {\n params: { region: options.region, username: options.username },\n });\n }\n\n /**\n * Get top-level comments on a TikTok video.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of comments.\n */\n async comments(\n videoId: string,\n options: TikTokCommentsParams = {}\n ): Promise<CommentListResponse> {\n return this.client.request<CommentListResponse>(`/v1/tiktok/videos/${videoId}/comments`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n\n /**\n * Get replies to a TikTok comment (best-effort).\n *\n * @param commentId - The comment id.\n * @param options - Parameters including the required `videoId` (region, count, cursor).\n * @returns A cursor-paginated list of reply comments.\n */\n async commentReplies(\n commentId: string,\n options: TikTokCommentRepliesParams\n ): Promise<CommentListResponse> {\n return this.client.request<CommentListResponse>(`/v1/tiktok/comments/${commentId}/replies`, {\n params: {\n video_id: options.videoId,\n region: options.region,\n count: options.count,\n cursor: options.cursor,\n },\n });\n }\n\n /**\n * Get TikTok's related videos for a given video.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of related videos.\n */\n async related(videoId: string, options: TikTokRelatedParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/videos/${videoId}/related`, {\n params: { region: options.region, count: options.count },\n });\n }\n\n /**\n * Get subtitle/caption tracks for a TikTok video.\n *\n * @param videoId - The video/post id.\n * @param options - Optional parameters (region).\n * @returns The transcript response with subtitle tracks and voice-to-text.\n */\n async transcript(\n videoId: string,\n options: TikTokTranscriptParams = {}\n ): Promise<TranscriptResponse> {\n return this.client.request<TranscriptResponse>(`/v1/tiktok/videos/${videoId}/transcript`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get cheap unauthenticated oEmbed metadata for a TikTok URL.\n *\n * @param url - Full TikTok video or profile URL.\n * @param options - Optional parameters (region).\n * @returns The oEmbed metadata.\n */\n async oembed(url: string, options: TikTokOEmbedParams = {}): Promise<TikTokOEmbed> {\n return this.client.request<TikTokOEmbed>(\"/v1/tiktok/oembed\", {\n params: { url, region: options.region },\n });\n }\n}\n","/**\n * TikTok Search API client.\n *\n * Provides keyword search across videos, users, and hashtags.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokSearchParams,\n VideoListResponse,\n UserSearchResponse,\n HashtagSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok search endpoints (general, videos, users, hashtags).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const top = await client.tiktok.search.search({ query: \"skincare\" });\n * const users = await client.tiktok.search.users({ query: \"skincare\" });\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * General TikTok search — video results from the Top feed.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of videos.\n */\n async search(params: TikTokSearchParams): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(\"/v1/tiktok/search\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n\n /**\n * Search TikTok videos by keyword.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of videos.\n */\n async videos(params: TikTokSearchParams): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(\"/v1/tiktok/search/videos\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n\n /**\n * Search TikTok users by keyword.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of matching users.\n */\n async users(params: TikTokSearchParams): Promise<UserSearchResponse> {\n return this.client.request<UserSearchResponse>(\"/v1/tiktok/search/users\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n\n /**\n * Search TikTok hashtags by keyword.\n *\n * @param params - Search parameters including query, region, count, cursor.\n * @returns A cursor-paginated list of matching hashtags.\n */\n async hashtags(params: TikTokSearchParams): Promise<HashtagSearchResponse> {\n return this.client.request<HashtagSearchResponse>(\"/v1/tiktok/search/hashtags\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n cursor: params.cursor,\n },\n });\n }\n}\n","/**\n * TikTok Music API client.\n *\n * Provides sound/music detail and the videos using a given sound.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokMusicParams,\n TikTokListVideosParams,\n MusicResponse,\n VideoListResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok music endpoints (detail, videos).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const music = await client.tiktok.music.get(\"6975...\");\n * const videos = await client.tiktok.music.videos(\"6975...\");\n * ```\n */\nexport class MusicClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get TikTok sound/music detail.\n *\n * @param musicId - The sound/music id.\n * @param options - Optional parameters (region).\n * @returns The music detail response.\n * @throws NotFoundError - If the music doesn't exist.\n */\n async get(musicId: string, options: TikTokMusicParams = {}): Promise<MusicResponse> {\n return this.client.request<MusicResponse>(`/v1/tiktok/music/${musicId}`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get videos using a given TikTok sound.\n *\n * @param musicId - The sound/music id.\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of videos.\n */\n async videos(musicId: string, options: TikTokListVideosParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/music/${musicId}/videos`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n}\n","/**\n * TikTok Hashtags API client.\n *\n * Provides hashtag/challenge detail and the videos tagged with a hashtag.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokHashtagParams,\n TikTokListVideosParams,\n HashtagResponse,\n VideoListResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok hashtag endpoints (detail, videos).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const tag = await client.tiktok.hashtags.get(\"fyp\");\n * const videos = await client.tiktok.hashtags.videos(\"fyp\");\n * ```\n */\nexport class HashtagsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get TikTok hashtag/challenge detail.\n *\n * @param name - The hashtag name (without the leading '#').\n * @param options - Optional parameters (region).\n * @returns The hashtag detail response.\n * @throws NotFoundError - If the hashtag doesn't exist.\n */\n async get(name: string, options: TikTokHashtagParams = {}): Promise<HashtagResponse> {\n return this.client.request<HashtagResponse>(`/v1/tiktok/hashtags/${name}`, {\n params: { region: options.region },\n });\n }\n\n /**\n * Get videos tagged with a TikTok hashtag.\n *\n * @param name - The hashtag name (without the leading '#').\n * @param options - Optional parameters (region, count, cursor).\n * @returns A cursor-paginated list of videos.\n */\n async videos(name: string, options: TikTokListVideosParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(`/v1/tiktok/hashtags/${name}/videos`, {\n params: { region: options.region, count: options.count, cursor: options.cursor },\n });\n }\n}\n","/**\n * TikTok Trending API client.\n *\n * Provides trending videos, hashtags, and songs.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokTrendingVideosParams,\n TikTokTrendingParams,\n VideoListResponse,\n TrendingHashtagsResponse,\n TrendingSongsResponse,\n} from \"./types.js\";\n\n/**\n * Client for TikTok trending endpoints (videos, hashtags, songs).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const videos = await client.tiktok.trending.videos({ region: \"US\" });\n * const hashtags = await client.tiktok.trending.hashtags({ region: \"US\", period: 7 });\n * const songs = await client.tiktok.trending.songs({ region: \"US\" });\n * ```\n */\nexport class TrendingClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get trending videos from the TikTok Explore feed.\n *\n * @param options - Optional parameters (region, count).\n * @returns A cursor-paginated list of trending videos.\n */\n async videos(options: TikTokTrendingVideosParams = {}): Promise<VideoListResponse> {\n return this.client.request<VideoListResponse>(\"/v1/tiktok/trending/videos\", {\n params: { region: options.region, count: options.count },\n });\n }\n\n /**\n * Get trending hashtags (mobile Discover surface — view_count + creators).\n *\n * @param options - Optional parameters (region, period, count).\n * @returns The trending hashtags response.\n */\n async hashtags(options: TikTokTrendingParams = {}): Promise<TrendingHashtagsResponse> {\n return this.client.request<TrendingHashtagsResponse>(\"/v1/tiktok/trending/hashtags\", {\n params: { region: options.region, period: options.period, count: options.count },\n });\n }\n\n /**\n * Get trending songs/sounds (mobile hot-music feed — ranked by usage).\n *\n * @param options - Optional parameters (region, period, count).\n * @returns The trending songs response.\n */\n async songs(options: TikTokTrendingParams = {}): Promise<TrendingSongsResponse> {\n return this.client.request<TrendingSongsResponse>(\"/v1/tiktok/trending/songs\", {\n params: { region: options.region, period: options.period, count: options.count },\n });\n }\n}\n","/**\n * TikTok Ads API client.\n *\n * Provides access to TikTok's Commercial Content Library (EU-DSA ad\n * transparency) via keyword or advertiser search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n TikTokAdSearchParams,\n TikTokAdvertiserSearchParams,\n TikTokAdDetailParams,\n AdLibrarySearchResponse,\n AdvertiserSearchResponse,\n AdDetailResponse,\n} from \"./types.js\";\n\n/**\n * Client for the TikTok Ad Library (Commercial Content Library) endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const ads = await client.tiktok.ads.search({ query: \"shoes\", region: \"DE\" });\n * for (const ad of ads.ads) {\n * console.log(ad.name);\n * }\n * ```\n */\nexport class AdsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.\n *\n * @param params - Optional parameters (query, advertiser_id, region, days, sort, offset, search_id, count).\n * @returns The ad-library search response with ads and pagination.\n */\n async search(params: TikTokAdSearchParams = {}): Promise<AdLibrarySearchResponse> {\n return this.client.request<AdLibrarySearchResponse>(\"/v1/tiktok/ads/search\", {\n params: {\n query: params.query,\n advertiser_id: params.advertiser_id,\n region: params.region,\n days: params.days,\n sort: params.sort,\n offset: params.offset,\n search_id: params.search_id,\n count: params.count,\n },\n });\n }\n\n /**\n * Look up advertiser business ids by name.\n *\n * Feed the returned `id` into {@link search} as `advertiser_id` to list all of an\n * advertiser's ads. Matching is on the legal entity name, so a brand may appear under\n * several legal entities.\n *\n * @param params - `query` (required), plus optional `region` and `count`.\n * @returns Matching advertisers, each with a business `id`.\n */\n async searchAdvertisers(params: TikTokAdvertiserSearchParams): Promise<AdvertiserSearchResponse> {\n return this.client.request<AdvertiserSearchResponse>(\"/v1/tiktok/ads/advertisers\", {\n params: {\n query: params.query,\n region: params.region,\n count: params.count,\n },\n });\n }\n\n /**\n * Get a single ad's advertiser, creatives, and full targeting/impression breakdown.\n *\n * @param adId - Ad id from a {@link search} result.\n * @param params - Optional `region` (EU-only, default \"DE\").\n * @returns The ad, its advertiser, and per-region age/gender impression targeting.\n */\n async getDetail(adId: string, params: TikTokAdDetailParams = {}): Promise<AdDetailResponse> {\n return this.client.request<AdDetailResponse>(`/v1/tiktok/ads/${adId}`, {\n params: { region: params.region },\n });\n }\n}\n","/**\n * TikTok Reference Data API client.\n *\n * Provides the supported-regions list and a service health check.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { RegionsResponse } from \"./types.js\";\n\n/**\n * Client for TikTok reference data endpoints (regions, health).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const regions = await client.tiktok.reference.regions();\n * for (const r of regions.regions) {\n * console.log(`${r.code}: ${r.name} (${r.locale})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List supported TikTok content regions.\n *\n * @returns The regions response with all supported content regions.\n */\n async regions(): Promise<RegionsResponse> {\n return this.client.request<RegionsResponse>(\"/v1/tiktok/regions\");\n }\n\n /**\n * Check the health of the TikTok scraper service.\n *\n * @returns The raw health payload from the scraper service.\n */\n async health(): Promise<unknown> {\n return this.client.request<unknown>(\"/v1/tiktok/health\");\n }\n}\n","/**\n * TikTok API client.\n *\n * Provides access to all TikTok API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { UsersClient } from \"./users.js\";\nimport { VideosClient } from \"./videos.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MusicClient } from \"./music.js\";\nimport { HashtagsClient } from \"./hashtags.js\";\nimport { TrendingClient } from \"./trending.js\";\nimport { AdsClient } from \"./ads.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * TikTok API client with access to all TikTok endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `users` - Profiles, videos, followers, following, liked, reposts\n * - `videos` - Detail, comments, replies, related, transcript, oEmbed\n * - `search` - Keyword search across videos, users, and hashtags\n * - `music` - Sound/music detail and videos using a sound\n * - `hashtags` - Hashtag detail and tagged videos\n * - `trending` - Trending videos, hashtags, and songs\n * - `ads` - The Commercial Content Library (ad transparency)\n * - `reference` - Reference data (regions) and service health\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Get a user profile\n * const profile = await client.tiktok.users.get(\"charlidamelio\");\n *\n * // Get video detail\n * const video = await client.tiktok.videos.get(\"7372...\");\n *\n * // Search videos\n * const results = await client.tiktok.search.videos({ query: \"skincare\" });\n *\n * // Get trending songs\n * const songs = await client.tiktok.trending.songs({ region: \"US\" });\n *\n * // Search the ad library\n * const ads = await client.tiktok.ads.search({ query: \"shoes\", region: \"DE\" });\n *\n * // List regions\n * const regions = await client.tiktok.reference.regions();\n * ```\n */\nexport class TikTokClient {\n private readonly _gen: BaseClient;\n\n /** Client for profiles, videos, followers, following, liked, reposts */\n readonly users: UsersClient;\n\n /** Client for video detail, comments, replies, related, transcript, oEmbed */\n readonly videos: VideosClient;\n\n /** Client for keyword search across videos, users, and hashtags */\n readonly search: SearchClient;\n\n /** Client for sound/music detail and videos using a sound */\n readonly music: MusicClient;\n\n /** Client for hashtag detail and tagged videos */\n readonly hashtags: HashtagsClient;\n\n /** Client for trending videos, hashtags, and songs */\n readonly trending: TrendingClient;\n\n /** Client for the Commercial Content Library (ad transparency) */\n readonly ads: AdsClient;\n\n /** Client for reference data (regions) and service health */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new TikTok client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.users = new UsersClient(client);\n this.videos = new VideosClient(client);\n this.search = new SearchClient(client);\n this.music = new MusicClient(client);\n this.hashtags = new HashtagsClient(client);\n this.trending = new TrendingClient(client);\n this.ads = new AdsClient(client);\n this.reference = new ReferenceClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Search TikTok advertisers. Generated from the OpenAPI spec; returns the raw response object. */\n async searchTiktokAdvertisers(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/tiktok/ads/advertisers\", { params });\n }\n\n /** Get TikTok ad detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getTiktokAdDetail(\n adId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/tiktok/ads/${adId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * eBay Search API client.\n *\n * Provides methods for active search, completed/sold search, and keyword\n * autocomplete suggestions.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n EbaySearchParams,\n EbayCompletedParams,\n EbayAutocompleteParams,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for eBay search, completed-listings, and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.ebay.search.search({ query: \"nintendo switch\" });\n * for (const item of results.results) {\n * console.log(`${item.position}. ${item.title}`);\n * }\n *\n * const sold = await client.ebay.search.completed({ query: \"nintendo switch\" });\n *\n * const suggestions = await client.ebay.search.autocomplete(\"ipho\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search an eBay marketplace for active listings.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results with cards, facets, and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: EbaySearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/ebay/search\", {\n params: {\n query: params.query,\n domain: params.domain,\n category_id: params.category_id,\n page: params.page,\n per_page: params.per_page,\n sort_by: params.sort_by,\n condition: params.condition,\n buying_format: params.buying_format,\n min_price: params.min_price,\n max_price: params.max_price,\n free_shipping: params.free_shipping,\n },\n });\n }\n\n /**\n * Search completed / sold listings — eBay's sold-price history.\n *\n * @param params - Search parameters including query, filters, and pagination.\n * @returns Search results (with `sold: true`), facets, and pagination.\n */\n async completed(params: EbayCompletedParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/ebay/completed\", {\n params: {\n query: params.query,\n domain: params.domain,\n category_id: params.category_id,\n page: params.page,\n per_page: params.per_page,\n sort_by: params.sort_by,\n condition: params.condition,\n min_price: params.min_price,\n max_price: params.max_price,\n },\n });\n }\n\n /**\n * Get eBay keyword autocomplete suggestions.\n *\n * @param query - Partial search query prefix.\n * @param options - Optional parameters (domain).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: EbayAutocompleteParams = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/ebay/autocomplete\", {\n params: { query, domain: options.domain },\n });\n }\n}\n","/**\n * eBay Items API client.\n *\n * Provides methods for fetching item detail and catalog product reviews.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n EbayItemParams,\n EbayReviewsParams,\n ItemDetailResponse,\n ReviewsResponse,\n} from \"./types.js\";\n\n/**\n * Client for eBay item endpoints (detail, reviews).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.ebay.items.get(\"123456789012\");\n * console.log(detail.item.title);\n *\n * const reviews = await client.ebay.items.reviews(\"123456789012\");\n * console.log(`${reviews.ratings_total} reviews`);\n * ```\n */\nexport class ItemsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single eBay listing's full detail.\n *\n * @param itemId - The eBay item id.\n * @param options - Optional parameters (domain).\n * @returns Item detail including specifics, shipping, and seller summary.\n * @throws NotFoundError - If the item doesn't exist.\n */\n async get(itemId: string, options: EbayItemParams = {}): Promise<ItemDetailResponse> {\n return this.client.request<ItemDetailResponse>(`/v1/ebay/items/${itemId}`, {\n params: { domain: options.domain },\n });\n }\n\n /**\n * Get the catalog product reviews shown on an eBay listing.\n *\n * @param itemId - The eBay item id.\n * @param options - Optional parameters (domain, page, productId).\n * @returns Reviews response with reviews, aggregate rating, and histogram.\n */\n async reviews(itemId: string, options: EbayReviewsParams = {}): Promise<ReviewsResponse> {\n return this.client.request<ReviewsResponse>(`/v1/ebay/items/${itemId}/reviews`, {\n params: {\n domain: options.domain,\n page: options.page,\n product_id: options.productId,\n },\n });\n }\n}\n","/**\n * eBay Sellers API client.\n *\n * Provides methods for seller profile, storefront listings, and feedback.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n EbaySellerParams,\n EbaySellerItemsParams,\n EbaySellerFeedbackParams,\n SellerProfileResponse,\n SellerItemsResponse,\n SellerFeedbackResponse,\n} from \"./types.js\";\n\n/**\n * Client for eBay seller endpoints (profile, items, feedback).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.ebay.sellers.get(\"musicmagpie\");\n * console.log(profile.seller.feedback_score);\n *\n * const items = await client.ebay.sellers.items(\"musicmagpie\");\n * const feedback = await client.ebay.sellers.feedback(\"musicmagpie\");\n * ```\n */\nexport class SellersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get an eBay seller's public profile.\n *\n * @param username - The seller username.\n * @param options - Optional parameters (domain).\n * @returns Seller profile response.\n * @throws NotFoundError - If the seller doesn't exist.\n */\n async get(username: string, options: EbaySellerParams = {}): Promise<SellerProfileResponse> {\n return this.client.request<SellerProfileResponse>(`/v1/ebay/sellers/${username}`, {\n params: { domain: options.domain },\n });\n }\n\n /**\n * List the active listings of a single eBay seller.\n *\n * @param username - The seller username.\n * @param options - Optional parameters (domain, query, page, per_page).\n * @returns Seller items response with result cards and pagination.\n */\n async items(username: string, options: EbaySellerItemsParams = {}): Promise<SellerItemsResponse> {\n return this.client.request<SellerItemsResponse>(`/v1/ebay/sellers/${username}/items`, {\n params: {\n domain: options.domain,\n query: options.query,\n page: options.page,\n per_page: options.per_page,\n },\n });\n }\n\n /**\n * Get a seller's recent feedback comments.\n *\n * @param username - The seller username.\n * @param options - Optional parameters (domain, page).\n * @returns Seller feedback response with feedback entries and pagination.\n */\n async feedback(\n username: string,\n options: EbaySellerFeedbackParams = {}\n ): Promise<SellerFeedbackResponse> {\n return this.client.request<SellerFeedbackResponse>(`/v1/ebay/sellers/${username}/feedback`, {\n params: { domain: options.domain, page: options.page },\n });\n }\n}\n","/**\n * eBay Categories API client.\n *\n * Provides methods for browsing a category's listings and listing the\n * reference category aliases.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { EbayCategoryParams, CategoryResponse, CategoriesResponse } from \"./types.js\";\n\n/**\n * Client for eBay category endpoints (browse, list).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const listings = await client.ebay.categories.browse(\"9355\");\n * for (const item of listings.results) {\n * console.log(item.title);\n * }\n *\n * const categories = await client.ebay.categories.list();\n * ```\n */\nexport class CategoriesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List active listings within an eBay category.\n *\n * @param categoryId - The eBay category id.\n * @param options - Optional parameters (domain, page, per_page, sort_by, min_price, max_price).\n * @returns Category response with result cards, facets, and pagination.\n */\n async browse(categoryId: string, options: EbayCategoryParams = {}): Promise<CategoryResponse> {\n return this.client.request<CategoryResponse>(`/v1/ebay/categories/${categoryId}/items`, {\n params: {\n domain: options.domain,\n page: options.page,\n per_page: options.per_page,\n sort_by: options.sort_by,\n min_price: options.min_price,\n max_price: options.max_price,\n },\n });\n }\n\n /**\n * List eBay's reference top-level category ids.\n *\n * @returns Categories response with all category aliases.\n */\n async list(): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/ebay/categories\");\n }\n}\n","/**\n * eBay Reference Data API client.\n *\n * Provides methods for fetching the static marketplace list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse } from \"./types.js\";\n\n/**\n * Client for eBay reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.ebay.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported eBay marketplaces.\n *\n * @returns Markets response with all supported marketplaces.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/ebay/markets\");\n }\n}\n","/**\n * eBay API client.\n *\n * Provides access to all eBay API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ItemsClient } from \"./items.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { CategoriesClient } from \"./categories.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * eBay API client with access to all eBay endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Active search, completed/sold search, and autocomplete\n * - `items` - Item detail and catalog product reviews\n * - `sellers` - Seller profile, storefront items, and feedback\n * - `categories` - Category browse and reference category list\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search active listings\n * const results = await client.ebay.search.search({ query: \"nintendo switch\" });\n *\n * // Sold-price history\n * const sold = await client.ebay.search.completed({ query: \"nintendo switch\" });\n *\n * // Get item detail\n * const item = await client.ebay.items.get(\"123456789012\");\n *\n * // Get item reviews\n * const reviews = await client.ebay.items.reviews(\"123456789012\");\n *\n * // Get a seller profile\n * const seller = await client.ebay.sellers.get(\"musicmagpie\");\n *\n * // Browse a category\n * const listings = await client.ebay.categories.browse(\"9355\");\n *\n * // Reference data\n * const markets = await client.ebay.reference.markets();\n * ```\n */\nexport class EbayClient {\n /** Client for active search, completed/sold search, and autocomplete */\n readonly search: SearchClient;\n\n /** Client for item detail and catalog product reviews */\n readonly items: ItemsClient;\n\n /** Client for seller profile, items, and feedback */\n readonly sellers: SellersClient;\n\n /** Client for category browse and the reference category list */\n readonly categories: CategoriesClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new eBay client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.items = new ItemsClient(client);\n this.sellers = new SellersClient(client);\n this.categories = new CategoriesClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Facebook API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Facebook API operations. (Generated from the OpenAPI spec.) */\nexport class FacebookClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Search advertiser pages. Generated from the OpenAPI spec; returns the raw response object. */\n async searchAdvertiserPages(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/ads/pages/search\", { params });\n }\n\n /** Get advertiser page info. Generated from the OpenAPI spec; returns the raw response object. */\n async getAdvertiserPageInfo(\n pageId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/ads/pages/${pageId}`, { params });\n }\n\n /** Search the Ad Library. Generated from the OpenAPI spec; returns the raw response object. */\n async searchTheAdLibrary(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/ads/search\", { params });\n }\n\n /** Get an ad. Generated from the OpenAPI spec; returns the raw response object. */\n async getAnAd(\n adArchiveId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/ads/${adArchiveId}`, { params });\n }\n\n /** Get group detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getGroupDetail(\n groupId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/groups/${groupId}`, { params });\n }\n\n /** Get group posts. Generated from the OpenAPI spec; returns the raw response object. */\n async getGroupPosts(\n groupId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/groups/${groupId}/posts`, { params });\n }\n\n /** List categories. Generated from the OpenAPI spec; returns the raw response object. */\n async listCategories(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/marketplace/categories\", { params });\n }\n\n /** Browse a Marketplace category. Generated from the OpenAPI spec; returns the raw response object. */\n async browseAMarketplaceCategory(\n category: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/marketplace/category/${category}`, { params });\n }\n\n /** Get a Marketplace item. Generated from the OpenAPI spec; returns the raw response object. */\n async getAMarketplaceItem(\n itemId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/marketplace/item/${itemId}`, { params });\n }\n\n /** List locations. Generated from the OpenAPI spec; returns the raw response object. */\n async listLocations(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/marketplace/locations\", { params });\n }\n\n /** Search Marketplace. Generated from the OpenAPI spec; returns the raw response object. */\n async searchMarketplace(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/marketplace/search\", { params });\n }\n\n /** Get page detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPageDetail(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/pages/${identifier}`, { params });\n }\n\n /** Get page posts. Generated from the OpenAPI spec; returns the raw response object. */\n async getPagePosts(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/pages/${identifier}/posts`, { params });\n }\n\n /** Get post detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPostDetail(\n postId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/posts/${postId}`, { params });\n }\n\n /** Get post comments. Generated from the OpenAPI spec; returns the raw response object. */\n async getPostComments(\n postId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/posts/${postId}/comments`, { params });\n }\n\n /** Get profile detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getProfileDetail(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/profiles/${identifier}`, { params });\n }\n\n /** Get profile posts. Generated from the OpenAPI spec; returns the raw response object. */\n async getProfilePosts(\n identifier: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/facebook/profiles/${identifier}/posts`, { params });\n }\n\n /** Search everything. Generated from the OpenAPI spec; returns the raw response object. */\n async searchEverything(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search\", { params });\n }\n\n /** Search events. Generated from the OpenAPI spec; returns the raw response object. */\n async searchEvents(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/events\", { params });\n }\n\n /** Search groups. Generated from the OpenAPI spec; returns the raw response object. */\n async searchGroups(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/groups\", { params });\n }\n\n /** Search Pages. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPages(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/pages\", { params });\n }\n\n /** Search people. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPeople(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/people\", { params });\n }\n\n /** Search places. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPlaces(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/places\", { params });\n }\n\n /** Search posts. Generated from the OpenAPI spec; returns the raw response object. */\n async searchPosts(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/facebook/search/posts\", { params });\n }\n}\n","/**\n * Walmart Search API client.\n *\n * Search, category browse, the deals feed, and search-box autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n WalmartAutocompleteResponse,\n WalmartCategoryParams,\n WalmartDealsParams,\n WalmartSearchParams,\n WalmartSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for Walmart search, category, deals and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.walmart.search.search(\"laptop\", { sort: \"price_low\" });\n * for (const item of results.items) {\n * console.log(`${item.position}. ${item.name} — $${item.price}`);\n * }\n *\n * const browse = await client.walmart.search.category(\"electronics/3944\");\n * const deals = await client.walmart.search.deals();\n * const suggestions = await client.walmart.search.autocomplete(\"lapt\");\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search walmart.com.\n *\n * @param query - Search keywords, e.g. `\"laptop\"`.\n * @param params - Optional page (1-10), sort, price and facet filters.\n * @returns A page of ~40-60 organic products.\n *\n * @remarks\n * Results dry up after page 10 regardless of `total_results_reported`; bound\n * a crawl with `max_page`. Sponsored ad tiles are dropped, sponsored\n * *products* are returned and flagged `is_sponsored`.\n */\n async search(query: string, params: WalmartSearchParams = {}): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(\"/v1/walmart/search\", {\n params: {\n query,\n page: params.page,\n sort: params.sort,\n min_price: params.min_price,\n max_price: params.max_price,\n facet: params.facet,\n },\n });\n }\n\n /**\n * Browse a Walmart category. Same result shape as {@link search}.\n *\n * @param path - Browse path, e.g. `\"electronics/3944\"`, or a `/cp/...` path.\n * @param params - Optional page (1-11), price and facet filters.\n *\n * @remarks\n * No `sort`: Walmart's browse pages ignore it (verified). Sort on\n * {@link search} instead.\n */\n async category(path: string, params: WalmartCategoryParams = {}): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(\"/v1/walmart/category\", {\n params: {\n path,\n page: params.page,\n min_price: params.min_price,\n max_price: params.max_price,\n facet: params.facet,\n },\n });\n }\n\n /**\n * Walmart's current deals, rollbacks and clearance.\n *\n * @param params - Optional page (1-11) and price filters.\n */\n async deals(params: WalmartDealsParams = {}): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(\"/v1/walmart/deals\", {\n params: {\n page: params.page,\n min_price: params.min_price,\n max_price: params.max_price,\n },\n });\n }\n\n /**\n * Walmart search-box suggestions — the cheapest call in this API.\n *\n * @param query - Partial search term, e.g. `\"lapt\"`.\n */\n async autocomplete(query: string): Promise<WalmartAutocompleteResponse> {\n return this.client.request<WalmartAutocompleteResponse>(\"/v1/walmart/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Walmart Products API client.\n *\n * Product detail and paginated customer reviews.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { WalmartProduct, WalmartReviewsParams, WalmartReviewsResponse } from \"./types.js\";\n\n/**\n * Client for Walmart product endpoints (detail, reviews).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const product = await client.walmart.products.get(\"5689919121\");\n * console.log(product.name, product.price, product.seller?.seller_name);\n *\n * const reviews = await client.walmart.products.reviews(\"5689919121\", {\n * sort: \"helpful\",\n * });\n * ```\n */\nexport class ProductsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get full product detail.\n *\n * @param itemId - Walmart `usItemId`, e.g. `\"5689919121\"`.\n * @throws NotFoundError - If the item doesn't exist.\n *\n * @remarks\n * Only the numeric id is needed — the SEO slug is decorative and ignored by\n * Walmart's router. Prices and availability are store-specific; the resolved\n * store is on `location`.\n */\n async get(itemId: string): Promise<WalmartProduct> {\n return this.client.request<WalmartProduct>(`/v1/walmart/products/${itemId}`);\n }\n\n /**\n * Get paginated customer reviews with the full star histogram.\n *\n * @param itemId - Walmart `usItemId`.\n * @param params - Optional page (1-100) and sort.\n * @returns Reviews plus the rating breakdown, aspects, and the most-helpful\n * positive and negative reviews.\n *\n * @remarks 10 reviews per page — Walmart's page size, not adjustable.\n */\n async reviews(\n itemId: string,\n params: WalmartReviewsParams = {}\n ): Promise<WalmartReviewsResponse> {\n return this.client.request<WalmartReviewsResponse>(`/v1/walmart/products/${itemId}/reviews`, {\n params: { page: params.page, sort: params.sort },\n });\n }\n}\n","/**\n * Walmart Sellers API client.\n *\n * Marketplace seller profile and seller catalogue.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n WalmartSearchResponse,\n WalmartSellerProductsParams,\n WalmartSellerResponse,\n} from \"./types.js\";\n\n/**\n * Client for Walmart seller endpoints (profile, products).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const seller = await client.walmart.sellers.get(\"101040442\");\n * console.log(seller.seller.name, seller.seller.rating);\n *\n * // `query` is required — the seller facet alone returns nothing.\n * const catalogue = await client.walmart.sellers.products(\"101040442\", \"headphones\");\n * ```\n */\nexport class SellersClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get a marketplace seller's profile — contact details, address, rating,\n * policies.\n *\n * @param sellerId - Numeric catalog seller id, e.g. `\"101040442\"`. This is\n * the `seller.catalog_seller_id` on a product — NOT the 32-char hex\n * `seller_id`, which 404s as a storefront URL.\n *\n * @remarks\n * No page parameter and no product list: adding `?page=` makes Walmart's own\n * SSR throw. Use {@link products} for the catalogue.\n */\n async get(sellerId: string): Promise<WalmartSellerResponse> {\n return this.client.request<WalmartSellerResponse>(`/v1/walmart/sellers/${sellerId}`);\n }\n\n /**\n * List a marketplace seller's catalogue.\n *\n * @param sellerId - Numeric catalog seller id.\n * @param query - Search term scoping the catalogue. REQUIRED — this goes\n * through search with a `retailer_id` facet, and the facet alone returns\n * zero results.\n * @param params - Optional page (1-10) and sort.\n */\n async products(\n sellerId: string,\n query: string,\n params: WalmartSellerProductsParams = {}\n ): Promise<WalmartSearchResponse> {\n return this.client.request<WalmartSearchResponse>(`/v1/walmart/sellers/${sellerId}/products`, {\n params: { query, page: params.page, sort: params.sort },\n });\n }\n}\n","/**\n * Walmart Stores API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { WalmartStoreResponse } from \"./types.js\";\n\n/**\n * Client for Walmart store endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const res = await client.walmart.stores.get(\"100\");\n * console.log(res.store.address1, res.store.hours);\n * for (const svc of res.store.services) {\n * console.log(svc.display_name, svc.phone);\n * }\n * ```\n */\nexport class StoresClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get store detail plus every store around it.\n *\n * @param storeId - Walmart store number, e.g. `\"100\"`.\n * @returns The store's address, geo, phone, opening hours and per-department\n * services (each with its own hours and phone), plus ~30 nearby stores.\n */\n async get(storeId: string): Promise<WalmartStoreResponse> {\n return this.client.request<WalmartStoreResponse>(`/v1/walmart/stores/${storeId}`);\n }\n}\n","/**\n * Walmart Reference Data API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { WalmartMarketsResponse } from \"./types.js\";\n\n/**\n * Client for Walmart reference data endpoints (markets, health).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.walmart.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Walmart markets.\n *\n * @remarks\n * Only walmart.com (US) is supported — walmart.ca and walmart.com.mx run on\n * different platforms with different payload shapes, so they are not claimed\n * here rather than shipped broken.\n */\n async markets(): Promise<WalmartMarketsResponse> {\n return this.client.request<WalmartMarketsResponse>(\"/v1/walmart/markets\");\n }\n\n /**\n * Check the health of the Walmart scraper service.\n *\n * @returns The raw health payload from the scraper service.\n */\n async health(): Promise<unknown> {\n return this.client.request<unknown>(\"/v1/walmart/health\");\n }\n}\n","/**\n * Walmart API client.\n *\n * Provides access to all Walmart API endpoints through specialized sub-clients.\n * US-only (walmart.com) — there is no market or country parameter.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ProductsClient } from \"./products.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { StoresClient } from \"./stores.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Walmart API client with access to all Walmart endpoints.\n *\n * Sub-clients:\n * - `search` - Search, category browse, deals, autocomplete\n * - `products` - Product detail and reviews\n * - `sellers` - Marketplace seller profile and catalogue\n * - `stores` - Store detail and nearby stores\n * - `reference` - Reference data (markets) and service health\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.walmart.search.search(\"laptop\");\n * const product = await client.walmart.products.get(\"5689919121\");\n * const reviews = await client.walmart.products.reviews(\"5689919121\");\n * const seller = await client.walmart.sellers.get(\"101040442\");\n * const store = await client.walmart.stores.get(\"100\");\n * const markets = await client.walmart.reference.markets();\n * ```\n */\nexport class WalmartClient {\n /** Client for search, category browse, deals and autocomplete */\n readonly search: SearchClient;\n\n /** Client for product detail and reviews */\n readonly products: ProductsClient;\n\n /** Client for marketplace seller profile and catalogue */\n readonly sellers: SellersClient;\n\n /** Client for store detail and nearby stores */\n readonly stores: StoresClient;\n\n /** Client for reference data (markets) and service health */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Walmart client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.products = new ProductsClient(client);\n this.sellers = new SellersClient(client);\n this.stores = new StoresClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * DuckDuckGo Search API client.\n *\n * Web search with the optional Instant-Answer abstract.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { DuckDuckGoSearchParams, DuckDuckGoSearchResponse } from \"./types.js\";\n\n/**\n * Client for the DuckDuckGo web-search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.duckduckgo.search.search(\"privacy\", { region: \"us-en\" });\n * for (const item of results.results) {\n * console.log(`${item.title} — ${item.url}`);\n * }\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search duckduckgo.com.\n *\n * @param query - Search keywords, e.g. `\"privacy\"`.\n * @param params - Optional region, safesearch, timelimit and page.\n * @returns A page of web results plus the optional abstract.\n */\n async search(\n query: string,\n params: DuckDuckGoSearchParams = {}\n ): Promise<DuckDuckGoSearchResponse> {\n return this.client.request<DuckDuckGoSearchResponse>(\"/v1/duckduckgo/search\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n timelimit: params.timelimit,\n page: params.page,\n },\n });\n }\n}\n","/**\n * DuckDuckGo Media API client.\n *\n * Image, news and video search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n DuckDuckGoImagesParams,\n DuckDuckGoImagesResponse,\n DuckDuckGoNewsParams,\n DuckDuckGoNewsResponse,\n DuckDuckGoVideosParams,\n DuckDuckGoVideosResponse,\n} from \"./types.js\";\n\n/**\n * Client for the DuckDuckGo image, news and video endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.duckduckgo.media.images(\"puppies\", { size: \"Large\" });\n * const news = await client.duckduckgo.media.news(\"elections\", { timelimit: \"d\" });\n * const videos = await client.duckduckgo.media.videos(\"lofi\", { duration: \"long\" });\n * ```\n */\nexport class MediaClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search DuckDuckGo Images.\n *\n * @param query - Search keywords.\n * @param params - Optional region, safesearch, page and image filters\n * (size, color, image_type, layout, license).\n */\n async images(\n query: string,\n params: DuckDuckGoImagesParams = {}\n ): Promise<DuckDuckGoImagesResponse> {\n return this.client.request<DuckDuckGoImagesResponse>(\"/v1/duckduckgo/images\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n page: params.page,\n size: params.size,\n color: params.color,\n image_type: params.image_type,\n layout: params.layout,\n license: params.license,\n },\n });\n }\n\n /**\n * Search DuckDuckGo News.\n *\n * @param query - Search keywords.\n * @param params - Optional region, safesearch, timelimit and page.\n */\n async news(query: string, params: DuckDuckGoNewsParams = {}): Promise<DuckDuckGoNewsResponse> {\n return this.client.request<DuckDuckGoNewsResponse>(\"/v1/duckduckgo/news\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n timelimit: params.timelimit,\n page: params.page,\n },\n });\n }\n\n /**\n * Search DuckDuckGo Videos.\n *\n * @param query - Search keywords.\n * @param params - Optional region, safesearch, page, duration and resolution.\n */\n async videos(\n query: string,\n params: DuckDuckGoVideosParams = {}\n ): Promise<DuckDuckGoVideosResponse> {\n return this.client.request<DuckDuckGoVideosResponse>(\"/v1/duckduckgo/videos\", {\n params: {\n query,\n region: params.region,\n safesearch: params.safesearch,\n page: params.page,\n duration: params.duration,\n resolution: params.resolution,\n },\n });\n }\n}\n","/**\n * DuckDuckGo Reference API client.\n *\n * Autocomplete, the Instant Answer API, and the list of supported regions.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n DuckDuckGoAutocompleteParams,\n DuckDuckGoAutocompleteResponse,\n DuckDuckGoInstantResponse,\n DuckDuckGoRegionsResponse,\n} from \"./types.js\";\n\n/**\n * Client for DuckDuckGo autocomplete, instant answers and regions.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const suggestions = await client.duckduckgo.reference.autocomplete(\"weath\");\n * const instant = await client.duckduckgo.reference.instant(\"python\");\n * const regions = await client.duckduckgo.reference.regions();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search-box suggestions for a partial query.\n *\n * @param query - Partial search term, e.g. `\"weath\"`.\n * @param params - Optional region.\n */\n async autocomplete(\n query: string,\n params: DuckDuckGoAutocompleteParams = {}\n ): Promise<DuckDuckGoAutocompleteResponse> {\n return this.client.request<DuckDuckGoAutocompleteResponse>(\"/v1/duckduckgo/autocomplete\", {\n params: {\n query,\n region: params.region,\n },\n });\n }\n\n /**\n * DuckDuckGo Instant Answer (zero-click info) for a query.\n *\n * @param query - The query, e.g. `\"python\"`.\n */\n async instant(query: string): Promise<DuckDuckGoInstantResponse> {\n return this.client.request<DuckDuckGoInstantResponse>(\"/v1/duckduckgo/instant\", {\n params: { query },\n });\n }\n\n /**\n * Get the supported DuckDuckGo search regions.\n */\n async regions(): Promise<DuckDuckGoRegionsResponse> {\n return this.client.request<DuckDuckGoRegionsResponse>(\"/v1/duckduckgo/regions\");\n }\n}\n","/**\n * DuckDuckGo API client.\n *\n * Provides access to all DuckDuckGo API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MediaClient } from \"./media.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * DuckDuckGo API client with access to all DuckDuckGo endpoints.\n *\n * Sub-clients:\n * - `search` - Web search with the optional Instant-Answer abstract\n * - `media` - Image, news and video search\n * - `reference` - Autocomplete, instant answers and supported regions\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.duckduckgo.search.search(\"privacy\");\n * const images = await client.duckduckgo.media.images(\"puppies\");\n * const news = await client.duckduckgo.media.news(\"elections\");\n * const videos = await client.duckduckgo.media.videos(\"lofi\");\n * const suggestions = await client.duckduckgo.reference.autocomplete(\"weath\");\n * const instant = await client.duckduckgo.reference.instant(\"python\");\n * const regions = await client.duckduckgo.reference.regions();\n * ```\n */\nexport class DuckDuckGoClient {\n /** Client for web search with the optional Instant-Answer abstract */\n readonly search: SearchClient;\n\n /** Client for image, news and video search */\n readonly media: MediaClient;\n\n /** Client for autocomplete, instant answers and supported regions */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new DuckDuckGo client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.media = new MediaClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Bing Search API client.\n *\n * Web search and search-box autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n BingAutocompleteParams,\n BingAutocompleteResponse,\n BingSearchParams,\n BingSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for Bing web search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.bing.search.search(\"coffee machine\");\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title} — ${r.url}`);\n * }\n *\n * const suggestions = await client.bing.search.autocomplete(\"coff\");\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search bing.com — the web SERP.\n *\n * @param query - Search keywords, e.g. `\"coffee machine\"`.\n * @param params - Optional market, count, offset and safe-search filter.\n * @returns A page of organic results, ads and related searches.\n */\n async search(query: string, params: BingSearchParams = {}): Promise<BingSearchResponse> {\n return this.client.request<BingSearchResponse>(\"/v1/bing/search\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n offset: params.offset,\n safe_search: params.safe_search,\n },\n });\n }\n\n /**\n * Bing search-box suggestions — the cheapest call in this API.\n *\n * @param query - Partial search term, e.g. `\"coff\"`.\n * @param params - Optional market.\n */\n async autocomplete(\n query: string,\n params: BingAutocompleteParams = {}\n ): Promise<BingAutocompleteResponse> {\n return this.client.request<BingAutocompleteResponse>(\"/v1/bing/autocomplete\", {\n params: {\n query,\n market: params.market,\n },\n });\n }\n}\n","/**\n * Bing Media API client.\n *\n * Image search and video search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n BingImagesParams,\n BingImagesResponse,\n BingVideosParams,\n BingVideosResponse,\n} from \"./types.js\";\n\n/**\n * Client for Bing image and video search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.bing.media.images(\"cats\");\n * for (const img of images.results) {\n * console.log(img.image_url, img.width, img.height);\n * }\n *\n * const videos = await client.bing.media.videos(\"cats\");\n * ```\n */\nexport class MediaClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Bing images.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market, count and safe-search filter.\n * @returns Full-size image URLs, thumbnails, pixel dimensions and the\n * source page each image came from.\n */\n async images(query: string, params: BingImagesParams = {}): Promise<BingImagesResponse> {\n return this.client.request<BingImagesResponse>(\"/v1/bing/images\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n safe_search: params.safe_search,\n },\n });\n }\n\n /**\n * Search Bing videos.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market, count and safe-search filter.\n * @returns Video URLs, thumbnails, duration, publisher and view counts.\n */\n async videos(query: string, params: BingVideosParams = {}): Promise<BingVideosResponse> {\n return this.client.request<BingVideosResponse>(\"/v1/bing/videos\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n safe_search: params.safe_search,\n },\n });\n }\n}\n","/**\n * Bing News API client.\n *\n * The Bing news vertical.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BingNewsParams, BingNewsResponse } from \"./types.js\";\n\n/**\n * Client for the Bing news endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const news = await client.bing.news.news(\"artificial intelligence\");\n * for (const article of news.results) {\n * console.log(article.source, article.published_at, article.title);\n * }\n * ```\n */\nexport class NewsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search the Bing news vertical.\n *\n * @param query - Search keywords, e.g. `\"artificial intelligence\"`.\n * @param params - Optional market and freshness (`\"day\"`, `\"week\"`, `\"month\"`).\n * @returns Articles carrying publisher, publish dates and real URLs.\n */\n async news(query: string, params: BingNewsParams = {}): Promise<BingNewsResponse> {\n return this.client.request<BingNewsResponse>(\"/v1/bing/news\", {\n params: {\n query,\n market: params.market,\n freshness: params.freshness,\n },\n });\n }\n}\n","/**\n * Bing Reference Data API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BingMarketsResponse } from \"./types.js\";\n\n/**\n * Client for Bing reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.bing.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Bing markets.\n *\n * @returns Every Bing market code, name and country.\n */\n async markets(): Promise<BingMarketsResponse> {\n return this.client.request<BingMarketsResponse>(\"/v1/bing/markets\");\n }\n}\n","/**\n * Bing API client.\n *\n * Provides access to all Bing API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MediaClient } from \"./media.js\";\nimport { NewsClient } from \"./news.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Bing API client with access to all Bing endpoints.\n *\n * Sub-clients:\n * - `search` - Web search and search-box autocomplete\n * - `media` - Image search and video search\n * - `news` - The news vertical\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.bing.search.search(\"coffee machine\");\n * const images = await client.bing.media.images(\"cats\");\n * const videos = await client.bing.media.videos(\"cats\");\n * const news = await client.bing.news.news(\"ai\", { freshness: \"day\" });\n * const suggestions = await client.bing.search.autocomplete(\"coff\");\n * const markets = await client.bing.reference.markets();\n * ```\n */\nexport class BingClient {\n /** Client for web search and search-box autocomplete */\n readonly search: SearchClient;\n\n /** Client for image search and video search */\n readonly media: MediaClient;\n\n /** Client for the news vertical */\n readonly news: NewsClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Bing client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.media = new MediaClient(client);\n this.news = new NewsClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Booking API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Booking API operations. (Generated from the OpenAPI spec.) */\nexport class BookingClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Search destinations. Generated from the OpenAPI spec; returns the raw response object. */\n async searchDestinations(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/booking/destinations\", { params });\n }\n\n /** Get property detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetail(\n countryCode: string,\n slug: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/booking/properties/${countryCode}/${slug}`, { params });\n }\n\n /** Get property reviews. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyReviews(\n countryCode: string,\n slug: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/booking/properties/${countryCode}/${slug}/reviews`, { params });\n }\n\n /** Get room types and live rates. Generated from the OpenAPI spec; returns the raw response object. */\n async getRoomTypesAndLiveRates(\n countryCode: string,\n slug: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(`/v1/booking/properties/${countryCode}/${slug}/rooms`, { params });\n }\n\n /** Search properties. Generated from the OpenAPI spec; returns the raw response object. */\n async searchProperties(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/booking/search\", { params });\n }\n}\n","/**\n * Baidu API client.\n *\n * Baidu endpoints: search (web SERP), news (news vertical), images (image\n * search) and autocomplete (search-box suggestions).\n *\n * Baidu is China's #1 search engine (~60% of the market). Every request is\n * served from ScrapeBadger's own exits — no China-based proxy of your own is\n * needed.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n BaiduSearchParams,\n BaiduNewsParams,\n BaiduImagesParams,\n BaiduSearchResponse,\n BaiduNewsResponse,\n BaiduImagesResponse,\n BaiduAutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Baidu API operations.\n *\n * Organic and news results carry the **real target URL** in `url` (decoded\n * from Baidu's `mu` attribute), not just the `baidu.com/link?url=` tracking\n * redirect that competing APIs return — `baidu_url` holds that redirect\n * separately.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Web search\n * const results = await client.baidu.search(\"咖啡机\", { num: 20, language: \"zh-cn\" });\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title} — ${r.url}`);\n * }\n *\n * // News, most recent first\n * const news = await client.baidu.news(\"人工智能\", { sort: \"time\" });\n *\n * // Images\n * const images = await client.baidu.images(\"猫\");\n *\n * // Search-box suggestions\n * const suggestions = await client.baidu.autocomplete(\"咖啡\");\n * ```\n */\nexport class BaiduClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search baidu.com — the web SERP.\n *\n * Costs 5 credits.\n *\n * @param query - Search keywords, e.g. `\"咖啡机\"` or `\"coffee machine\"` (required).\n * @param options - Optional parameters (page, num, language, timeFrom, timeTo).\n * @returns Search response with organic results and Baidu's related searches.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(query: string, options: BaiduSearchParams = {}): Promise<BaiduSearchResponse> {\n return this.client.request<BaiduSearchResponse>(\"/v1/baidu/search\", {\n params: {\n query,\n page: options.page,\n num: options.num,\n language: options.language,\n time_from: options.timeFrom,\n time_to: options.timeTo,\n },\n });\n }\n\n /**\n * Search the Baidu news vertical.\n *\n * Costs 5 credits.\n *\n * @param query - Search keywords, e.g. `\"人工智能\"` (required).\n * @param options - Optional parameters (page, sort).\n * @returns News response with articles carrying publisher, date and real URLs.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async news(query: string, options: BaiduNewsParams = {}): Promise<BaiduNewsResponse> {\n return this.client.request<BaiduNewsResponse>(\"/v1/baidu/news\", {\n params: { query, page: options.page, sort: options.sort },\n });\n }\n\n /**\n * Search Baidu images.\n *\n * Costs 5 credits.\n *\n * @param query - Search keywords, e.g. `\"猫\"` (required).\n * @param options - Optional parameters (page). Baidu serves 30 images per page.\n * @returns Images response with full-size image URLs, Baidu-hosted thumbnail\n * copies, pixel dimensions and the source page each image came from.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async images(query: string, options: BaiduImagesParams = {}): Promise<BaiduImagesResponse> {\n return this.client.request<BaiduImagesResponse>(\"/v1/baidu/images\", {\n params: { query, page: options.page },\n });\n }\n\n /**\n * Baidu search-box suggestions — the cheapest call in this API.\n *\n * Costs 1 credit.\n *\n * @param query - Partial search term, e.g. `\"咖啡\"` or `\"coff\"` (required).\n * @returns Autocomplete response with Baidu's suggestions for the term.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async autocomplete(query: string): Promise<BaiduAutocompleteResponse> {\n return this.client.request<BaiduAutocompleteResponse>(\"/v1/baidu/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Yahoo Search API client.\n *\n * Web search and search-box autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YahooAutocompleteParams,\n YahooAutocompleteResponse,\n YahooSearchParams,\n YahooSearchResponse,\n} from \"./types.js\";\n\n/**\n * Client for Yahoo web search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yahoo.search.search(\"coffee machine\");\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title} — ${r.url}`);\n * }\n *\n * const suggestions = await client.yahoo.search.autocomplete(\"coff\");\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search yahoo.com — the web SERP.\n *\n * Yahoo serves 7 organic results per page, so `offset` moves in steps of 7\n * (page 2 is `offset: 7`). There is no page-size parameter.\n *\n * @param query - Search keywords, e.g. `\"coffee machine\"`.\n * @param params - Optional market, offset and safe-search filter.\n * @returns A page of organic results, ads and related searches.\n */\n async search(query: string, params: YahooSearchParams = {}): Promise<YahooSearchResponse> {\n return this.client.request<YahooSearchResponse>(\"/v1/yahoo/search\", {\n params: {\n query,\n market: params.market,\n offset: params.offset,\n safe_search: params.safe_search,\n },\n });\n }\n\n /**\n * Yahoo search-box suggestions — the cheapest call in this API.\n *\n * @param query - Partial search term, e.g. `\"coff\"`.\n * @param params - Optional market.\n */\n async autocomplete(\n query: string,\n params: YahooAutocompleteParams = {}\n ): Promise<YahooAutocompleteResponse> {\n return this.client.request<YahooAutocompleteResponse>(\"/v1/yahoo/autocomplete\", {\n params: {\n query,\n market: params.market,\n },\n });\n }\n}\n","/**\n * Yahoo Media API client.\n *\n * Image search and video search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YahooImagesParams,\n YahooImagesResponse,\n YahooVideosParams,\n YahooVideosResponse,\n} from \"./types.js\";\n\n/**\n * Client for Yahoo image and video search endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.yahoo.media.images(\"cats\");\n * for (const img of images.results) {\n * console.log(img.image_url, img.width, img.height);\n * }\n *\n * const videos = await client.yahoo.media.videos(\"cats\");\n * ```\n */\nexport class MediaClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Yahoo images.\n *\n * Yahoo renders ~60 tiles server-side with no native page-size parameter,\n * so `count` trims the list rather than paginating.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market and count.\n * @returns Full-size image URLs, thumbnails, pixel dimensions and the\n * source page each image came from.\n */\n async images(query: string, params: YahooImagesParams = {}): Promise<YahooImagesResponse> {\n return this.client.request<YahooImagesResponse>(\"/v1/yahoo/images\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n },\n });\n }\n\n /**\n * Search Yahoo videos.\n *\n * Like images, Yahoo has no native page-size parameter here, so `count`\n * trims the returned list.\n *\n * @param query - Search keywords, e.g. `\"cats\"`.\n * @param params - Optional market and count.\n * @returns Video URLs, thumbnails, duration, host platform and view counts.\n */\n async videos(query: string, params: YahooVideosParams = {}): Promise<YahooVideosResponse> {\n return this.client.request<YahooVideosResponse>(\"/v1/yahoo/videos\", {\n params: {\n query,\n market: params.market,\n count: params.count,\n },\n });\n }\n}\n","/**\n * Yahoo News API client.\n *\n * The Yahoo news vertical.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YahooNewsParams, YahooNewsResponse } from \"./types.js\";\n\n/**\n * Client for the Yahoo news endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const news = await client.yahoo.news.news(\"artificial intelligence\");\n * for (const article of news.results) {\n * console.log(article.source, article.published, article.title);\n * }\n * ```\n */\nexport class NewsClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search the Yahoo news vertical.\n *\n * @param query - Search keywords, e.g. `\"artificial intelligence\"`.\n * @param params - Optional market.\n * @returns Articles carrying publisher, syndication source and real URLs.\n * `published` is a relative age string (`\"26 minutes ago\"`) — Yahoo\n * renders no absolute date.\n */\n async news(query: string, params: YahooNewsParams = {}): Promise<YahooNewsResponse> {\n return this.client.request<YahooNewsResponse>(\"/v1/yahoo/news\", {\n params: {\n query,\n market: params.market,\n },\n });\n }\n}\n","/**\n * Yahoo Reference Data API client.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YahooMarketsResponse } from \"./types.js\";\n\n/**\n * Client for Yahoo reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.yahoo.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Yahoo markets.\n *\n * Yahoo Japan (`search.yahoo.co.jp`) is a separate engine and is not\n * covered by this API.\n *\n * @returns Every Yahoo market code, name, country and regional search host.\n */\n async markets(): Promise<YahooMarketsResponse> {\n return this.client.request<YahooMarketsResponse>(\"/v1/yahoo/markets\");\n }\n}\n","/**\n * Yahoo API client.\n *\n * Provides access to all Yahoo API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { MediaClient } from \"./media.js\";\nimport { NewsClient } from \"./news.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Yahoo API client with access to all Yahoo endpoints.\n *\n * Sub-clients:\n * - `search` - Web search and search-box autocomplete\n * - `media` - Image search and video search\n * - `news` - The news vertical\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yahoo.search.search(\"coffee machine\");\n * const images = await client.yahoo.media.images(\"cats\");\n * const videos = await client.yahoo.media.videos(\"cats\");\n * const news = await client.yahoo.news.news(\"ai\");\n * const suggestions = await client.yahoo.search.autocomplete(\"coff\");\n * const markets = await client.yahoo.reference.markets();\n * ```\n */\nexport class YahooClient {\n /** Client for web search and search-box autocomplete */\n readonly search: SearchClient;\n\n /** Client for image search and video search */\n readonly media: MediaClient;\n\n /** Client for the news vertical */\n readonly news: NewsClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Yahoo client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.media = new MediaClient(client);\n this.news = new NewsClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Yandex Search API client.\n *\n * Web search — organic results, ads, sitelinks, inline media, related\n * searches, and pagination.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YandexSearchParams, YandexSearchResponse } from \"./types.js\";\n\n/**\n * Client for the Yandex web-search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yandex.search.search(\"python asyncio\", { domain: \"com\" });\n * for (const item of results.organic_results) {\n * console.log(`${item.position}. ${item.title} — ${item.url}`);\n * }\n * ```\n */\nexport class SearchClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search yandex.<domain>.\n *\n * @param query - Search keywords, e.g. `\"python asyncio\"`.\n * @param params - Optional domain, page, lr (region id) and lang.\n * @returns A page of web results with organic results, ads and pagination.\n */\n async search(query: string, params: YandexSearchParams = {}): Promise<YandexSearchResponse> {\n return this.client.request<YandexSearchResponse>(\"/v1/yandex/search\", {\n params: {\n query,\n domain: params.domain,\n page: params.page,\n lr: params.lr,\n lang: params.lang,\n },\n });\n }\n}\n","/**\n * Yandex Images API client.\n *\n * Forward image search and reverse-image (CBIR) search.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YandexImagesParams,\n YandexImagesResponse,\n YandexReverseImageResponse,\n YandexReverseParams,\n} from \"./types.js\";\n\n/**\n * Client for the Yandex image search and reverse-image endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const images = await client.yandex.images.search(\"golden retriever\");\n * const reverse = await client.yandex.images.reverse(\"https://example.com/photo.jpg\");\n * ```\n */\nexport class ImagesClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Search Yandex Images.\n *\n * @param query - Search keywords.\n * @param params - Optional domain and page.\n */\n async search(query: string, params: YandexImagesParams = {}): Promise<YandexImagesResponse> {\n return this.client.request<YandexImagesResponse>(\"/v1/yandex/images/search\", {\n params: {\n query,\n domain: params.domain,\n page: params.page,\n },\n });\n }\n\n /**\n * Reverse-image (CBIR) search for a given image URL.\n *\n * @param imageUrl - The publicly reachable URL of the query image.\n * @param params - Optional domain.\n */\n async reverse(\n imageUrl: string,\n params: YandexReverseParams = {}\n ): Promise<YandexReverseImageResponse> {\n return this.client.request<YandexReverseImageResponse>(\"/v1/yandex/images/reverse\", {\n params: {\n image_url: imageUrl,\n domain: params.domain,\n },\n });\n }\n}\n","/**\n * Yandex Reference API client.\n *\n * The list of supported Yandex markets.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YandexMarketsResponse } from \"./types.js\";\n\n/**\n * Client for the Yandex markets endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.yandex.reference.markets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (lr ${m.default_lr})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n constructor(private readonly client: BaseClient) {}\n\n /**\n * Get the supported Yandex markets.\n */\n async markets(): Promise<YandexMarketsResponse> {\n return this.client.request<YandexMarketsResponse>(\"/v1/yandex/markets\");\n }\n}\n","/**\n * Yandex API client.\n *\n * Provides access to all Yandex API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ImagesClient } from \"./images.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Yandex API client with access to all Yandex endpoints.\n *\n * Sub-clients:\n * - `search` - Web search (organic + ads + sitelinks + inline media)\n * - `images` - Image search and reverse-image (CBIR) search\n * - `reference` - The supported-markets list\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.yandex.search.search(\"privacy\");\n * const images = await client.yandex.images.search(\"puppies\");\n * const reverse = await client.yandex.images.reverse(\"https://example.com/photo.jpg\");\n * const markets = await client.yandex.reference.markets();\n * ```\n */\nexport class YandexClient {\n /** Client for web search (organic + ads + sitelinks + inline media) */\n readonly search: SearchClient;\n\n /** Client for image search and reverse-image (CBIR) search */\n readonly images: ImagesClient;\n\n /** Client for the supported-markets list */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Yandex client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.images = new ImagesClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * YouTube Search API client.\n *\n * Provides methods for full-matrix search and keyword autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeSearchParams,\n YoutubeAutocompleteParams,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.youtube.search.search({ query: \"lofi beats\" });\n * for (const r of results.results) {\n * console.log(`${r.position}. ${r.title}`);\n * }\n *\n * const suggestions = await client.youtube.search.autocomplete(\"lofi\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search YouTube videos / channels / playlists with the full filter matrix.\n *\n * @param params - Search parameters including query, filters, and continuation.\n * @returns A page of search results with chips, refinements, and a continuation token.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: YoutubeSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/youtube/search\", {\n params: {\n query: params.query,\n type: params.type,\n sort_by: params.sort_by,\n upload_date: params.upload_date,\n duration: params.duration,\n features: params.features,\n gl: params.gl,\n hl: params.hl,\n continuation: params.continuation,\n },\n });\n }\n\n /**\n * Get YouTube keyword autocomplete suggestions.\n *\n * @param query - Partial search query prefix.\n * @param options - Optional region parameters (gl, hl).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: YoutubeAutocompleteParams = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/youtube/autocomplete\", {\n params: { query, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Videos API client.\n *\n * Provides methods for video detail, related videos, comments, replies,\n * transcript, captions, stream formats, live chat, batch detail, and oEmbed.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeVideoParams,\n YoutubeRelatedParams,\n YoutubeCommentsParams,\n YoutubeRepliesParams,\n YoutubeTranscriptParams,\n YoutubeCaptionsParams,\n YoutubeStreamsParams,\n YoutubeLiveChatParams,\n YoutubeBatchParams,\n YoutubeOEmbedParams,\n Video,\n RelatedResponse,\n CommentsResponse,\n RepliesResponse,\n Transcript,\n CaptionsResponse,\n StreamingData,\n LiveChatResponse,\n BatchResponse,\n OEmbed,\n} from \"./types.js\";\n\n/**\n * Client for YouTube video endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const video = await client.youtube.videos.get(\"dQw4w9WgXcQ\");\n * console.log(`${video.title} — ${video.view_count} views`);\n *\n * const comments = await client.youtube.videos.comments(\"dQw4w9WgXcQ\");\n * const transcript = await client.youtube.videos.transcript(\"dQw4w9WgXcQ\");\n * ```\n */\nexport class VideosClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single video's full detail (merged `player` + `next`).\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional region parameters (gl, hl).\n * @returns Full video detail including engagement, channel, chapters, and heatmap.\n * @throws NotFoundError - If the video doesn't exist or is unavailable.\n */\n async get(videoId: string, options: YoutubeVideoParams = {}): Promise<Video> {\n return this.client.request<Video>(`/v1/youtube/videos/${videoId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get related / recommended videos for a video.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional region parameters and a continuation token.\n * @returns Related results with a continuation token.\n */\n async related(videoId: string, options: YoutubeRelatedParams = {}): Promise<RelatedResponse> {\n return this.client.request<RelatedResponse>(`/v1/youtube/videos/${videoId}/related`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of top-level comments for a video.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional sort order, continuation token, and region.\n * @returns A page of comments with sorting tokens and a continuation token.\n */\n async comments(videoId: string, options: YoutubeCommentsParams = {}): Promise<CommentsResponse> {\n return this.client.request<CommentsResponse>(`/v1/youtube/videos/${videoId}/comments`, {\n params: {\n sort_by: options.sort_by,\n continuation: options.continuation,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Get a page of replies to a single comment.\n *\n * @param videoId - The YouTube video id.\n * @param commentId - The comment id whose replies to fetch.\n * @param options - The required replies continuation token plus region.\n * @returns A page of replies with a continuation token.\n */\n async replies(\n videoId: string,\n commentId: string,\n options: YoutubeRepliesParams\n ): Promise<RepliesResponse> {\n return this.client.request<RepliesResponse>(\n `/v1/youtube/videos/${videoId}/comments/${commentId}/replies`,\n { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }\n );\n }\n\n /**\n * Get a video's transcript in the selected language.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional language and region parameters.\n * @returns The transcript with timed segments and full text.\n */\n async transcript(videoId: string, options: YoutubeTranscriptParams = {}): Promise<Transcript> {\n return this.client.request<Transcript>(`/v1/youtube/videos/${videoId}/transcript`, {\n params: { language: options.language, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * List a video's available caption tracks.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional region parameters.\n * @returns The available caption tracks and translation languages.\n */\n async captions(videoId: string, options: YoutubeCaptionsParams = {}): Promise<CaptionsResponse> {\n return this.client.request<CaptionsResponse>(`/v1/youtube/videos/${videoId}/captions`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a video's stream / format metadata (best-effort; URLs may be PO-token gated).\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional content region and player client.\n * @returns Streaming metadata with muxed and adaptive formats.\n */\n async streams(videoId: string, options: YoutubeStreamsParams = {}): Promise<StreamingData> {\n return this.client.request<StreamingData>(`/v1/youtube/videos/${videoId}/streams`, {\n params: { gl: options.gl, client: options.client },\n });\n }\n\n /**\n * Get a page of live-chat (or chat-replay) messages for a video.\n *\n * @param videoId - The YouTube video id.\n * @param options - Optional continuation token, replay flag, and region.\n * @returns A page of live-chat messages with a continuation token.\n */\n async liveChat(videoId: string, options: YoutubeLiveChatParams = {}): Promise<LiveChatResponse> {\n return this.client.request<LiveChatResponse>(`/v1/youtube/videos/${videoId}/live_chat`, {\n params: {\n continuation: options.continuation,\n replay: options.replay,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Fetch detail for up to 50 videos concurrently.\n *\n * @param params - The video ids (≤50) plus optional region parameters.\n * @returns Successfully fetched videos plus per-id errors.\n */\n async batch(params: YoutubeBatchParams): Promise<BatchResponse> {\n return this.client.request<BatchResponse>(\"/v1/youtube/videos/batch\", {\n method: \"POST\",\n body: { video_ids: params.video_ids, gl: params.gl, hl: params.hl },\n });\n }\n\n /**\n * Get public oEmbed metadata for a YouTube URL (no proxy/InnerTube needed).\n *\n * @param url - A YouTube video/playlist/channel URL.\n * @returns The oEmbed metadata.\n */\n async oembed(url: string): Promise<OEmbed>;\n async oembed(params: YoutubeOEmbedParams): Promise<OEmbed>;\n async oembed(arg: string | YoutubeOEmbedParams): Promise<OEmbed> {\n const url = typeof arg === \"string\" ? arg : arg.url;\n return this.client.request<OEmbed>(\"/v1/youtube/oembed\", { params: { url } });\n }\n}\n","/**\n * YouTube Channels API client.\n *\n * Provides methods for channel detail, tab feeds (videos/shorts/streams/\n * playlists/community), about, subscriber count, in-channel search, and resolve.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeChannelParams,\n YoutubeChannelTabParams,\n YoutubeChannelSearchParams,\n YoutubeResolveParams,\n Channel,\n ChannelAbout,\n ChannelTabResponse,\n CommunityResponse,\n SubscriberCount,\n SearchResponse,\n ResolveResult,\n} from \"./types.js\";\n\n/**\n * Client for YouTube channel endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const channel = await client.youtube.channels.get(\"@MrBeast\");\n * console.log(`${channel.title} — ${channel.number_of_subscribers} subs`);\n *\n * const videos = await client.youtube.channels.videos(\"@MrBeast\");\n * const id = await client.youtube.channels.resolve({ handle: \"@MrBeast\" });\n * ```\n */\nexport class ChannelsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full channel detail (accepts a UC id, @handle, or custom URL).\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional region parameters.\n * @returns Full channel detail.\n * @throws NotFoundError - If the channel doesn't exist.\n */\n async get(channelId: string, options: YoutubeChannelParams = {}): Promise<Channel> {\n return this.client.request<Channel>(`/v1/youtube/channels/${channelId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's long-form videos.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of video cards with a continuation token.\n */\n async videos(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/videos`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's Shorts.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of Shorts cards with a continuation token.\n */\n async shorts(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/shorts`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's live streams.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of stream cards with a continuation token.\n */\n async streams(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/streams`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's playlists.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of playlist cards with a continuation token.\n */\n async playlists(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/channels/${channelId}/playlists`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of a channel's community posts.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional continuation token and region.\n * @returns A page of community posts with a continuation token.\n */\n async community(\n channelId: string,\n options: YoutubeChannelTabParams = {}\n ): Promise<CommunityResponse> {\n return this.client.request<CommunityResponse>(`/v1/youtube/channels/${channelId}/community`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a channel's lightweight about payload.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional region parameters.\n * @returns The channel about payload.\n */\n async about(channelId: string, options: YoutubeChannelParams = {}): Promise<ChannelAbout> {\n return this.client.request<ChannelAbout>(`/v1/youtube/channels/${channelId}/about`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a channel's subscriber count (fast).\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - Optional region parameters.\n * @returns The subscriber count.\n */\n async subscriberCount(\n channelId: string,\n options: YoutubeChannelParams = {}\n ): Promise<SubscriberCount> {\n return this.client.request<SubscriberCount>(\n `/v1/youtube/channels/${channelId}/subscriber_count`,\n { params: { gl: options.gl, hl: options.hl } }\n );\n }\n\n /**\n * Search within a single channel.\n *\n * @param channelId - The channel id, @handle, or custom URL.\n * @param options - The required query plus optional continuation and region.\n * @returns A page of search results scoped to the channel.\n */\n async search(channelId: string, options: YoutubeChannelSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(`/v1/youtube/channels/${channelId}/search`, {\n params: {\n query: options.query,\n continuation: options.continuation,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Resolve a @handle or URL to canonical YouTube ids.\n *\n * @param options - A `handle` or `url` (one is required) plus optional region.\n * @returns The resolved channel / video / playlist ids.\n */\n async resolve(options: YoutubeResolveParams = {}): Promise<ResolveResult> {\n return this.client.request<ResolveResult>(\"/v1/youtube/channels/resolve\", {\n params: { handle: options.handle, url: options.url, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Playlists API client.\n *\n * Provides methods for playlist detail, playlist items pagination, and mixes.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubePlaylistParams,\n YoutubePlaylistItemsParams,\n Playlist,\n PlaylistItemsResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube playlist and mix endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const playlist = await client.youtube.playlists.get(\"PL1234567890\");\n * console.log(`${playlist.title} — ${playlist.video_count} videos`);\n *\n * const page = await client.youtube.playlists.items(\"PL1234567890\", {\n * continuation: playlist.continuation ?? undefined,\n * });\n *\n * const mix = await client.youtube.playlists.mix(\"RDQM1234567890\");\n * ```\n */\nexport class PlaylistsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get full playlist detail plus the first page of items.\n *\n * @param playlistId - The playlist id.\n * @param options - Optional region parameters.\n * @returns Full playlist detail with a continuation token.\n * @throws NotFoundError - If the playlist doesn't exist.\n */\n async get(playlistId: string, options: YoutubePlaylistParams = {}): Promise<Playlist> {\n return this.client.request<Playlist>(`/v1/youtube/playlists/${playlistId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a continuation page of a playlist's items.\n *\n * @param playlistId - The playlist id.\n * @param options - Optional continuation token and region.\n * @returns A page of playlist items with a continuation token.\n */\n async items(\n playlistId: string,\n options: YoutubePlaylistItemsParams = {}\n ): Promise<PlaylistItemsResponse> {\n return this.client.request<PlaylistItemsResponse>(`/v1/youtube/playlists/${playlistId}/items`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Resolve an auto-generated mix / radio (RD…) queue.\n *\n * @param mixId - The mix / radio playlist id.\n * @param options - Optional region parameters.\n * @returns The mix as a playlist queue.\n */\n async mix(mixId: string, options: YoutubePlaylistParams = {}): Promise<Playlist> {\n return this.client.request<Playlist>(`/v1/youtube/mixes/${mixId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Community API client.\n *\n * Provides methods for community post detail and post comments.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubePostParams,\n YoutubePostCommentsParams,\n CommunityPost,\n CommentsResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube community post endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const post = await client.youtube.community.get(\"Ugkx1234567890\");\n * console.log(post.text);\n *\n * const comments = await client.youtube.community.comments(\"Ugkx1234567890\");\n * ```\n */\nexport class CommunityClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single community post's detail.\n *\n * @param postId - The community post id.\n * @param options - Optional region parameters.\n * @returns The community post.\n * @throws NotFoundError - If the post doesn't exist.\n */\n async get(postId: string, options: YoutubePostParams = {}): Promise<CommunityPost> {\n return this.client.request<CommunityPost>(`/v1/youtube/posts/${postId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of comments on a community post.\n *\n * @param postId - The community post id.\n * @param options - Optional continuation token and region.\n * @returns A page of comments with a continuation token.\n */\n async comments(\n postId: string,\n options: YoutubePostCommentsParams = {}\n ): Promise<CommentsResponse> {\n return this.client.request<CommentsResponse>(`/v1/youtube/posts/${postId}/comments`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Shorts API client.\n *\n * Provides methods for a single Short's detail and Shorts attributed to a sound.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeShortParams,\n YoutubeShortsBySoundParams,\n Short,\n ChannelTabResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube Shorts endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const short = await client.youtube.shorts.get(\"abc123XYZ\");\n * console.log(`${short.title} — ${short.sound_title}`);\n *\n * const bySound = await client.youtube.shorts.bySound(\"sound-id-123\");\n * ```\n */\nexport class ShortsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single Short's detail.\n *\n * @param videoId - The Short's video id.\n * @param options - Optional region parameters.\n * @returns The Short detail.\n * @throws NotFoundError - If the Short doesn't exist or is unavailable.\n */\n async get(videoId: string, options: YoutubeShortParams = {}): Promise<Short> {\n return this.client.request<Short>(`/v1/youtube/shorts/${videoId}`, {\n params: { gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of Shorts attributed to a given sound / music id (best-effort).\n *\n * @param soundId - The sound / music id.\n * @param options - Optional continuation token and region.\n * @returns A page of Shorts cards with a continuation token.\n */\n async bySound(\n soundId: string,\n options: YoutubeShortsBySoundParams = {}\n ): Promise<ChannelTabResponse> {\n return this.client.request<ChannelTabResponse>(`/v1/youtube/shorts/by_sound/${soundId}`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Trending API client.\n *\n * Provides methods for the trending feed, trending shorts, hashtag feed, and\n * the guest home feed.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeTrendingParams,\n YoutubeTrendingShortsParams,\n YoutubeHashtagParams,\n YoutubeHomeParams,\n TrendingResponse,\n HashtagResponse,\n HomeResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube trending, hashtag, and home-feed endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const trending = await client.youtube.trending.get({ gl: \"US\", type: \"music\" });\n * const shorts = await client.youtube.trending.shorts({ gl: \"US\" });\n * const tagged = await client.youtube.trending.hashtag(\"minecraft\");\n * const home = await client.youtube.trending.home();\n * ```\n */\nexport class TrendingClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a page of the trending feed.\n *\n * @param options - Optional feed type, continuation token, and region.\n * @returns A page of trending items with a continuation token.\n */\n async get(options: YoutubeTrendingParams = {}): Promise<TrendingResponse> {\n return this.client.request<TrendingResponse>(\"/v1/youtube/trending\", {\n params: {\n type: options.type,\n continuation: options.continuation,\n gl: options.gl,\n hl: options.hl,\n },\n });\n }\n\n /**\n * Get a page of trending Shorts.\n *\n * @param options - Optional continuation token and region.\n * @returns A page of trending Shorts with a continuation token.\n */\n async shorts(options: YoutubeTrendingShortsParams = {}): Promise<TrendingResponse> {\n return this.client.request<TrendingResponse>(\"/v1/youtube/trending/shorts\", {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of videos under a hashtag.\n *\n * @param tag - The hashtag (with or without a leading `#`).\n * @param options - Optional continuation token and region.\n * @returns A page of hashtag results with a continuation token.\n */\n async hashtag(tag: string, options: YoutubeHashtagParams = {}): Promise<HashtagResponse> {\n return this.client.request<HashtagResponse>(`/v1/youtube/hashtags/${tag}`, {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n\n /**\n * Get a page of the guest home / recommendations feed (best-effort).\n *\n * @param options - Optional continuation token and region.\n * @returns A page of home-feed results with a continuation token.\n */\n async home(options: YoutubeHomeParams = {}): Promise<HomeResponse> {\n return this.client.request<HomeResponse>(\"/v1/youtube/home\", {\n params: { continuation: options.continuation, gl: options.gl, hl: options.hl },\n });\n }\n}\n","/**\n * YouTube Music API client.\n *\n * Provides a method for searching YouTube Music (WEB_REMIX client).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { YoutubeMusicSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for YouTube Music endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.youtube.music.search({ query: \"daft punk\" });\n * for (const r of results.results) {\n * console.log(r.title);\n * }\n * ```\n */\nexport class MusicClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search YouTube Music (songs / albums / artists / playlists).\n *\n * @param params - The required query plus optional continuation and region.\n * @returns A page of search results with a continuation token.\n */\n async search(params: YoutubeMusicSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/youtube/music/search\", {\n params: {\n query: params.query,\n continuation: params.continuation,\n gl: params.gl,\n hl: params.hl,\n },\n });\n }\n}\n","/**\n * YouTube Reference Data API client.\n *\n * Provides methods for the static categories, languages, regions, and the\n * geo-targeted scraper market list (all zero-credit).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n YoutubeCategoriesParams,\n CategoriesResponse,\n LanguagesResponse,\n RegionsResponse,\n MarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for YouTube reference data endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const categories = await client.youtube.reference.categories({ gl: \"US\" });\n * const languages = await client.youtube.reference.languages();\n * const regions = await client.youtube.reference.regions();\n * const markets = await client.youtube.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List YouTube video categories (Data-API parity).\n *\n * @param options - Optional content region (default: \"US\").\n * @returns The categories for the region.\n */\n async categories(options: YoutubeCategoriesParams = {}): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/youtube/categories\", {\n params: { gl: options.gl },\n });\n }\n\n /**\n * List supported UI languages (hl codes).\n *\n * @returns The supported UI languages.\n */\n async languages(): Promise<LanguagesResponse> {\n return this.client.request<LanguagesResponse>(\"/v1/youtube/languages\");\n }\n\n /**\n * List supported content regions (gl codes).\n *\n * @returns The supported content regions.\n */\n async regions(): Promise<RegionsResponse> {\n return this.client.request<RegionsResponse>(\"/v1/youtube/regions\");\n }\n\n /**\n * List the regions the scraper explicitly geo-targets (proxy-pinned).\n *\n * @returns The supported scraper markets.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/youtube/markets\");\n }\n}\n","/**\n * YouTube API client.\n *\n * Provides access to all YouTube API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { VideosClient } from \"./videos.js\";\nimport { ChannelsClient } from \"./channels.js\";\nimport { PlaylistsClient } from \"./playlists.js\";\nimport { CommunityClient } from \"./community.js\";\nimport { ShortsClient } from \"./shorts.js\";\nimport { TrendingClient } from \"./trending.js\";\nimport { MusicClient } from \"./music.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * YouTube API client with access to all YouTube endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Full-matrix search and keyword autocomplete\n * - `videos` - Detail, related, comments, replies, transcript, captions, streams, live chat, batch, oEmbed\n * - `channels` - Detail, tab feeds, about, subscriber count, in-channel search, resolve\n * - `playlists` - Playlist detail, items pagination, mixes\n * - `community` - Community post detail and post comments\n * - `shorts` - Single Short detail and Shorts by sound\n * - `trending` - Trending feed, trending shorts, hashtag feed, home feed\n * - `music` - YouTube Music search\n * - `reference` - Reference data (categories, languages, regions, markets)\n *\n * All list endpoints paginate via an opaque `continuation` token (no page\n * numbers). Region is controlled by `gl` (content region) + `hl` (UI language).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search\n * const results = await client.youtube.search.search({ query: \"lofi beats\" });\n *\n * // Video detail\n * const video = await client.youtube.videos.get(\"dQw4w9WgXcQ\");\n *\n * // Channel detail (accepts a UC id, @handle, or custom URL)\n * const channel = await client.youtube.channels.get(\"@MrBeast\");\n *\n * // Playlist items\n * const playlist = await client.youtube.playlists.get(\"PL1234567890\");\n *\n * // Trending\n * const trending = await client.youtube.trending.get({ gl: \"US\" });\n *\n * // Reference data\n * const markets = await client.youtube.reference.markets();\n * ```\n */\nexport class YoutubeClient {\n /** Client for full-matrix search and keyword autocomplete */\n readonly search: SearchClient;\n\n /** Client for video detail, comments, transcript, captions, streams, live chat, batch, and oEmbed */\n readonly videos: VideosClient;\n\n /** Client for channel detail, tab feeds, about, subscriber count, search, and resolve */\n readonly channels: ChannelsClient;\n\n /** Client for playlist detail, items pagination, and mixes */\n readonly playlists: PlaylistsClient;\n\n /** Client for community post detail and post comments */\n readonly community: CommunityClient;\n\n /** Client for single-Short detail and Shorts by sound */\n readonly shorts: ShortsClient;\n\n /** Client for the trending feed, trending shorts, hashtag feed, and home feed */\n readonly trending: TrendingClient;\n\n /** Client for YouTube Music search */\n readonly music: MusicClient;\n\n /** Client for reference data (categories, languages, regions, markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new YouTube client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.videos = new VideosClient(client);\n this.channels = new ChannelsClient(client);\n this.playlists = new PlaylistsClient(client);\n this.community = new CommunityClient(client);\n this.shorts = new ShortsClient(client);\n this.trending = new TrendingClient(client);\n this.music = new MusicClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Realtor Search API client.\n *\n * Provides methods for property search and location autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n RealtorSearchOptions,\n RealtorAutocompleteOptions,\n SearchResponse,\n AutocompleteResponse,\n} from \"./types.js\";\n\n/**\n * Client for realtor search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.realtor.search.search(\"Austin, TX\");\n * for (const p of results.results) {\n * console.log(`${p.address?.line} — ${p.list_price_formatted}`);\n * }\n *\n * const suggestions = await client.realtor.search.autocomplete(\"Miami\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search a market for properties.\n *\n * @param location - Freetext location (\"Austin, TX\" / ZIP / \"Toronto, ON\").\n * Required unless a CA bounding box is provided.\n * @param options - Filters, sorting, and pagination.\n * @returns Search results with pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(location?: string, options: RealtorSearchOptions = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/realtor/search\", {\n params: {\n location,\n market: options.market,\n status: options.status,\n price_min: options.priceMin,\n price_max: options.priceMax,\n beds_min: options.bedsMin,\n baths_min: options.bathsMin,\n sqft_min: options.sqftMin,\n sqft_max: options.sqftMax,\n property_type: options.propertyType,\n sort: options.sort,\n page: options.page,\n limit: options.limit,\n lat_min: options.latMin,\n lat_max: options.latMax,\n lng_min: options.lngMin,\n lng_max: options.lngMax,\n },\n });\n }\n\n /**\n * Get location autocomplete suggestions.\n *\n * @param query - Partial location query.\n * @param options - Optional parameters (market, limit).\n * @returns Autocomplete suggestions.\n */\n async autocomplete(\n query: string,\n options: RealtorAutocompleteOptions = {}\n ): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/realtor/autocomplete\", {\n params: { query, market: options.market, limit: options.limit },\n });\n }\n}\n","/**\n * Realtor Properties API client.\n *\n * Provides a method for fetching full property detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { RealtorPropertyOptions, PropertyDetail } from \"./types.js\";\n\n/**\n * Client for the realtor property detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.realtor.properties.getProperty(\"1234567890\");\n * console.log(detail.address?.line, detail.list_price);\n * ```\n */\nexport class PropertiesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single property's full detail.\n *\n * @param propertyId - The property id.\n * @param options - Optional parameters (market).\n * @returns Property detail including details, amenities, and history.\n * @throws NotFoundError - If the property doesn't exist.\n */\n async getProperty(\n propertyId: string,\n options: RealtorPropertyOptions = {}\n ): Promise<PropertyDetail> {\n return this.client.request<PropertyDetail>(`/v1/realtor/properties/${propertyId}`, {\n params: { market: options.market },\n });\n }\n}\n","/**\n * Realtor Reference Data API client.\n *\n * Provides a method for fetching the static market list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse } from \"./types.js\";\n\n/**\n * Client for realtor reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.realtor.reference.listMarkets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get all supported realtor markets.\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/realtor/markets\");\n }\n}\n","/**\n * Realtor API client.\n *\n * Provides access to all Realtor API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { PropertiesClient } from \"./properties.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Realtor API client with access to all Realtor endpoints.\n *\n * Unified real-estate API over realtor.com (US) + realtor.ca (Canada).\n *\n * Provides sub-clients for different resource types:\n * - `search` - Property search and location autocomplete\n * - `properties` - Full property detail\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search properties\n * const results = await client.realtor.search.search(\"Austin, TX\");\n *\n * // Location autocomplete\n * const suggestions = await client.realtor.search.autocomplete(\"Miami\");\n *\n * // Get property detail\n * const detail = await client.realtor.properties.getProperty(\"1234567890\");\n *\n * // Reference data\n * const markets = await client.realtor.reference.listMarkets();\n * ```\n */\nexport class RealtorClient {\n /** Client for property search and location autocomplete */\n readonly search: SearchClient;\n\n /** Client for full property detail */\n readonly properties: PropertiesClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Realtor client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.properties = new PropertiesClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Leboncoin Search API client.\n *\n * Provides ad search across the single France marketplace, scoped by\n * category, geography, price, seller type, and ad type.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { LeboncoinSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for the Leboncoin search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.leboncoin.search.search({ text: \"velo\" });\n * for (const ad of results.ads) {\n * console.log(`${ad.subject} — ${ad.price_eur} EUR`);\n * }\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Leboncoin classified ads.\n *\n * France is a single market; scope results with `region_id` /\n * `department_id` / `city` (DOM-TOM are region values).\n *\n * @param params - Search parameters including text, filters, and pagination.\n * @returns Search results with ads, totals, and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: LeboncoinSearchParams = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/leboncoin/search\", {\n params: {\n text: params.text,\n category: params.category,\n region_id: params.region_id,\n department_id: params.department_id,\n city: params.city,\n zipcode: params.zipcode,\n price_min: params.price_min,\n price_max: params.price_max,\n owner_type: params.owner_type,\n ad_type: params.ad_type,\n sort: params.sort,\n page: params.page,\n limit: params.limit,\n },\n });\n }\n}\n","/**\n * Leboncoin Ads API client.\n *\n * Provides methods for fetching a single ad's detail and the ads Leboncoin\n * surfaces as similar to it.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { LeboncoinSimilarParams, AdResponse, SimilarResponse } from \"./types.js\";\n\n/**\n * Client for Leboncoin ad endpoints (detail, similar).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.leboncoin.ads.get(2934857123);\n * console.log(detail.ad.subject);\n *\n * const similar = await client.leboncoin.ads.similar(2934857123);\n * console.log(`${similar.ads.length} similar ads`);\n * ```\n */\nexport class AdsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single Leboncoin ad's full detail.\n *\n * @param listId - The Leboncoin ad list id.\n * @returns Ad detail response.\n * @throws NotFoundError - If the ad doesn't exist.\n */\n async get(listId: number | string): Promise<AdResponse> {\n return this.client.request<AdResponse>(`/v1/leboncoin/ads/${listId}`);\n }\n\n /**\n * Get the ads Leboncoin surfaces as similar to a given ad.\n *\n * @param listId - The Leboncoin ad list id.\n * @param options - Optional parameters (limit).\n * @returns Similar-ads response.\n */\n async similar(\n listId: number | string,\n options: LeboncoinSimilarParams = {}\n ): Promise<SimilarResponse> {\n return this.client.request<SimilarResponse>(`/v1/leboncoin/ads/${listId}/similar`, {\n params: { limit: options.limit },\n });\n }\n}\n","/**\n * Leboncoin Sellers API client.\n *\n * Provides methods for a seller's public profile and their active listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n LeboncoinSellerListingsParams,\n SellerResponse,\n SellerListingsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Leboncoin seller endpoints (profile, listings).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.leboncoin.sellers.get(\"a1b2c3d4-...\");\n * console.log(profile.seller.name);\n *\n * const listings = await client.leboncoin.sellers.listings(\"a1b2c3d4-...\");\n * console.log(`${listings.total} ads`);\n * ```\n */\nexport class SellersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a Leboncoin seller's public profile.\n *\n * @param userId - The seller user id.\n * @returns Seller profile response.\n * @throws NotFoundError - If the seller doesn't exist.\n */\n async get(userId: string): Promise<SellerResponse> {\n return this.client.request<SellerResponse>(`/v1/leboncoin/sellers/${userId}`);\n }\n\n /**\n * List a Leboncoin seller's active ads.\n *\n * @param userId - The seller user id.\n * @param options - Optional parameters (page, limit).\n * @returns Seller listings response with ads and pagination.\n */\n async listings(\n userId: string,\n options: LeboncoinSellerListingsParams = {}\n ): Promise<SellerListingsResponse> {\n return this.client.request<SellerListingsResponse>(`/v1/leboncoin/sellers/${userId}/listings`, {\n params: { page: options.page, limit: options.limit },\n });\n }\n}\n","/**\n * Leboncoin Reference Data API client.\n *\n * Provides the static category / region / department lists, the market list,\n * and location autocomplete for building search filters.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n LeboncoinDepartmentsParams,\n CategoriesResponse,\n RegionsResponse,\n DepartmentsResponse,\n LocationSearchResponse,\n MarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for Leboncoin reference endpoints (categories, regions, departments,\n * location autocomplete, markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const { categories } = await client.leboncoin.reference.categories();\n * const { regions } = await client.leboncoin.reference.regions();\n * const { departments } = await client.leboncoin.reference.departments({ region_id: \"12\" });\n * const { suggestions } = await client.leboncoin.reference.locations(\"Paris\");\n * const { markets } = await client.leboncoin.reference.markets();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List all Leboncoin categories.\n *\n * @returns Categories response.\n */\n async categories(): Promise<CategoriesResponse> {\n return this.client.request<CategoriesResponse>(\"/v1/leboncoin/categories\");\n }\n\n /**\n * List all Leboncoin regions.\n *\n * @returns Regions response.\n */\n async regions(): Promise<RegionsResponse> {\n return this.client.request<RegionsResponse>(\"/v1/leboncoin/regions\");\n }\n\n /**\n * List Leboncoin departments, optionally filtered by region.\n *\n * @param options - Optional parameters (region_id).\n * @returns Departments response.\n */\n async departments(options: LeboncoinDepartmentsParams = {}): Promise<DepartmentsResponse> {\n return this.client.request<DepartmentsResponse>(\"/v1/leboncoin/departments\", {\n params: { region_id: options.region_id },\n });\n }\n\n /**\n * Resolve a place name to Leboncoin location ids (for building filters).\n *\n * @param query - Place name to resolve.\n * @returns Location search response with suggestions.\n */\n async locations(query: string): Promise<LocationSearchResponse> {\n return this.client.request<LocationSearchResponse>(\"/v1/leboncoin/locations/search\", {\n params: { q: query },\n });\n }\n\n /**\n * List the supported Leboncoin markets (France is the single market).\n *\n * @returns Markets response.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/leboncoin/markets\");\n }\n}\n","/**\n * Leboncoin API client.\n *\n * Provides access to all Leboncoin API endpoints through specialized\n * sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { AdsClient } from \"./ads.js\";\nimport { SellersClient } from \"./sellers.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Leboncoin API client with access to all Leboncoin endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - Ad search across the single France marketplace\n * - `ads` - Ad detail and similar ads\n * - `sellers` - Seller profile and their active listings\n * - `reference` - Reference data (categories, regions, departments,\n * location autocomplete, markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search ads\n * const results = await client.leboncoin.search.search({ text: \"velo\" });\n *\n * // Get an ad\n * const ad = await client.leboncoin.ads.get(2934857123);\n *\n * // Similar ads\n * const similar = await client.leboncoin.ads.similar(2934857123);\n *\n * // Seller profile + listings\n * const seller = await client.leboncoin.sellers.get(\"a1b2c3d4-...\");\n * const listings = await client.leboncoin.sellers.listings(\"a1b2c3d4-...\");\n *\n * // Reference data\n * const { categories } = await client.leboncoin.reference.categories();\n * ```\n */\nexport class LeboncoinClient {\n /** Client for ad search */\n readonly search: SearchClient;\n\n /** Client for ad detail and similar ads */\n readonly ads: AdsClient;\n\n /** Client for seller profile and listings */\n readonly sellers: SellersClient;\n\n /** Client for reference data (categories, regions, departments, locations, markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Leboncoin client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.ads = new AdsClient(client);\n this.sellers = new SellersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Zillow Search API client.\n *\n * Provides methods for property search and location autocomplete.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ZillowSearchOptions, SearchResponse, AutocompleteResponse } from \"./types.js\";\n\n/**\n * Client for zillow search and autocomplete endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.zillow.search.search(\"Austin, TX\", { bedsMin: 3 });\n * for (const l of results.results) {\n * console.log(`${l.address} — ${l.price_raw}`);\n * }\n *\n * const suggestions = await client.zillow.search.autocomplete(\"Miami\");\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search Zillow for properties.\n *\n * Beat the ~820-result (20-page) cap by re-issuing the search over\n * subdivided `north/south/east/west` map-bound boxes returned in\n * `map_bounds`.\n *\n * @param location - City/state, ZIP, address, or neighborhood (\"Austin, TX\").\n * @param options - Filters, sorting, pagination, and map bounds.\n * @returns Search results with pagination and map metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(location: string, options: ZillowSearchOptions = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/zillow/search\", {\n params: {\n location,\n status: options.status,\n page: options.page,\n sort: options.sort,\n price_min: options.priceMin,\n price_max: options.priceMax,\n beds_min: options.bedsMin,\n baths_min: options.bathsMin,\n home_type: options.homeType,\n sqft_min: options.sqftMin,\n sqft_max: options.sqftMax,\n lot_min: options.lotMin,\n lot_max: options.lotMax,\n year_built_min: options.yearBuiltMin,\n year_built_max: options.yearBuiltMax,\n hoa_max: options.hoaMax,\n keywords: options.keywords,\n days_on: options.daysOn,\n north: options.north,\n south: options.south,\n east: options.east,\n west: options.west,\n },\n });\n }\n\n /**\n * Resolve a search term to Zillow regions/addresses (regionId, lat/lng).\n *\n * @param query - Partial location — city, ZIP, address, or neighborhood.\n * @returns Autocomplete suggestions.\n */\n async autocomplete(query: string): Promise<AutocompleteResponse> {\n return this.client.request<AutocompleteResponse>(\"/v1/zillow/autocomplete\", {\n params: { query },\n });\n }\n}\n","/**\n * Zillow Properties API client.\n *\n * Provides a method for fetching full property detail.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { PropertyResponse } from \"./types.js\";\n\n/**\n * Client for the zillow property detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const { property } = await client.zillow.properties.getProperty(\"2078029085\");\n * console.log(property.street_address, property.price);\n * ```\n */\nexport class PropertiesClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single Zillow property's full detail by its zpid.\n *\n * Returns price/valuation, specs, resoFacts (home_facts), price & tax\n * history, schools, listing agent, mortgage rates and photos.\n *\n * @param zpid - The Zillow property id.\n * @returns Property detail wrapped in `{ property }`.\n * @throws NotFoundError - If the property doesn't exist.\n */\n async getProperty(zpid: string): Promise<PropertyResponse> {\n return this.client.request<PropertyResponse>(`/v1/zillow/property/${zpid}`);\n }\n}\n","/**\n * Zillow Agent API client.\n *\n * Provides a method for fetching an agent profile and their listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ZillowAgentOptions, AgentResponse } from \"./types.js\";\n\n/**\n * Client for the zillow agent profile endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const { agent } = await client.zillow.agent.getAgent({ username: \"some-agent\" });\n * console.log(agent.name, agent.review_count, agent.listings.length);\n * ```\n */\nexport class AgentClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a Zillow real-estate professional's profile and their active listings.\n *\n * Provide either a `username` (screen name) or a full `url`.\n *\n * @param options - The agent `username` or profile `url`.\n * @returns Agent profile wrapped in `{ agent }`.\n * @throws NotFoundError - If the agent doesn't exist.\n * @throws ValidationError - If neither username nor url is provided.\n */\n async getAgent(options: ZillowAgentOptions = {}): Promise<AgentResponse> {\n return this.client.request<AgentResponse>(\"/v1/zillow/agent\", {\n params: { username: options.username, url: options.url },\n });\n }\n}\n","/**\n * Zillow Reference Data API client.\n *\n * Provides a method for fetching the coverage market list.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse } from \"./types.js\";\n\n/**\n * Client for zillow reference data endpoints (markets).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.zillow.reference.listMarkets();\n * for (const m of markets.markets) {\n * console.log(`${m.code}: ${m.domain} (${m.currency})`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List Zillow coverage regions (US + Canada, all served via zillow.com).\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/zillow/markets\");\n }\n}\n","/**\n * Zillow API client.\n *\n * Provides access to all Zillow API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { PropertiesClient } from \"./properties.js\";\nimport { AgentClient } from \"./agent.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * Zillow API client with access to all Zillow endpoints.\n *\n * Maximal-coverage real-estate API over zillow.com (US + Canadian inventory,\n * all served from zillow.com behind a US IP).\n *\n * Provides sub-clients for different resource types:\n * - `search` - Property search and location autocomplete\n * - `properties` - Full property detail\n * - `agent` - Agent profile + their listings\n * - `reference` - Reference data (markets)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search properties\n * const results = await client.zillow.search.search(\"Austin, TX\");\n *\n * // Location autocomplete\n * const suggestions = await client.zillow.search.autocomplete(\"Miami\");\n *\n * // Get property detail\n * const { property } = await client.zillow.properties.getProperty(\"2078029085\");\n *\n * // Get an agent profile\n * const { agent } = await client.zillow.agent.getAgent({ username: \"some-agent\" });\n *\n * // Reference data\n * const markets = await client.zillow.reference.listMarkets();\n * ```\n */\nexport class ZillowClient {\n private readonly _gen: BaseClient;\n\n /** Client for property search and location autocomplete */\n readonly search: SearchClient;\n\n /** Client for full property detail */\n readonly properties: PropertiesClient;\n\n /** Client for agent profile + listings */\n readonly agent: AgentClient;\n\n /** Client for reference data (markets) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new Zillow client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.search = new SearchClient(client);\n this.properties = new PropertiesClient(client);\n this.agent = new AgentClient(client);\n this.reference = new ReferenceClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get property detail by URL. Generated from the OpenAPI spec; returns the raw response object. */\n async getPropertyDetailByUrl(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/zillow/property\", { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Immobiliare API client.\n *\n * Immobiliare endpoints: autocomplete (resolve a free-text place to geography\n * ids), search (list listings by location or explicit ids), getListing (full\n * single-listing detail), getAgency / getAgencyListings (agency profile +\n * active listings), priceStats (€/m² time series per area), markets, and\n * reference (filter enums). Markets: it, es, gr, lu (the Immobiliare Group).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n ImmobiliareAutocompleteParams,\n ImmobiliareSearchParams,\n ImmobiliareListingParams,\n ImmobiliareAgencyParams,\n ImmobiliareAgencyListingsParams,\n ImmobiliarePriceStatsParams,\n SuggestResponse,\n SearchResponse,\n Listing,\n AgencyProfile,\n AgencyListingsResponse,\n PriceStatsResponse,\n MarketsResponse,\n ReferenceResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Immobiliare API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Resolve a place name to geography ids\n * const hits = await client.immobiliare.autocomplete(\"Milano\");\n * const city = hits.suggestions[0];\n *\n * // Search listings\n * const results = await client.immobiliare.search({\n * city_id: city.city_id ?? undefined,\n * price_max: 500000,\n * });\n * for (const listing of results.listings) {\n * console.log(`${listing.id}: ${listing.title}`);\n * }\n *\n * // Full single-listing detail\n * const detail = await client.immobiliare.getListing(123456789);\n * console.log(detail.price?.formatted);\n *\n * // Supported markets\n * const markets = await client.immobiliare.markets();\n * ```\n */\nexport class ImmobiliareClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Resolve a free-text place name into geography ids for search.\n *\n * @param query - Free-text place name, e.g. \"Milano\".\n * @param options - Optional parameters (market).\n * @returns Suggest response with region/province/city/zone id candidates.\n */\n async autocomplete(\n query: string,\n options: ImmobiliareAutocompleteParams = {}\n ): Promise<SuggestResponse> {\n return this.client.request<SuggestResponse>(\"/v1/immobiliare/autocomplete\", {\n params: { query, market: options.market },\n });\n }\n\n /**\n * Search Immobiliare-group listings.\n *\n * Scope the search by `location` (free text, auto-resolved) OR explicit\n * `region_id` / `province_id` / `city_id` from {@link autocomplete}.\n *\n * @param options - Search parameters (market, location/ids, contract,\n * category, price/surface/room/bathroom filters, sort, page).\n * @returns Search response with `listings` and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(options: ImmobiliareSearchParams = {}): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/immobiliare/search\", {\n params: {\n market: options.market,\n location: options.location,\n region_id: options.region_id,\n province_id: options.province_id,\n city_id: options.city_id,\n contract: options.contract,\n category: options.category,\n price_min: options.price_min,\n price_max: options.price_max,\n surface_min: options.surface_min,\n surface_max: options.surface_max,\n rooms_min: options.rooms_min,\n rooms_max: options.rooms_max,\n bathrooms_min: options.bathrooms_min,\n sort: options.sort,\n page: options.page,\n },\n });\n }\n\n /**\n * Get the full detail for a single Immobiliare listing.\n *\n * @param listingId - The Immobiliare listing id.\n * @param options - Optional parameters (market).\n * @returns The full listing detail.\n * @throws NotFoundError - If the listing doesn't exist.\n */\n async getListing(listingId: number, options: ImmobiliareListingParams = {}): Promise<Listing> {\n return this.client.request<Listing>(`/v1/immobiliare/listings/${listingId}`, {\n params: { market: options.market },\n });\n }\n\n /**\n * Get an agency/advertiser profile.\n *\n * @param agencyId - The Immobiliare agency id.\n * @param options - Optional parameters (market).\n * @returns The full agency profile.\n * @throws NotFoundError - If the agency doesn't exist.\n */\n async getAgency(agencyId: number, options: ImmobiliareAgencyParams = {}): Promise<AgencyProfile> {\n return this.client.request<AgencyProfile>(`/v1/immobiliare/agencies/${agencyId}`, {\n params: { market: options.market },\n });\n }\n\n /**\n * Get an agency's active listings (25 per page).\n *\n * @param agencyId - The Immobiliare agency id.\n * @param options - Optional parameters (market, page).\n * @returns Agency-listings response with `listings` and pagination.\n */\n async getAgencyListings(\n agencyId: number,\n options: ImmobiliareAgencyListingsParams = {}\n ): Promise<AgencyListingsResponse> {\n return this.client.request<AgencyListingsResponse>(\n `/v1/immobiliare/agencies/${agencyId}/listings`,\n {\n params: { market: options.market, page: options.page },\n }\n );\n }\n\n /**\n * Get the historical average €/m² time series for an area.\n *\n * @param regionId - Region id, e.g. \"lom\" (required).\n * @param options - Optional parameters (province_id, city_id, market, contract).\n * @returns Price-stats response with monthly `points` (label + EUR/m² value).\n */\n async priceStats(\n regionId: string,\n options: ImmobiliarePriceStatsParams = {}\n ): Promise<PriceStatsResponse> {\n return this.client.request<PriceStatsResponse>(\"/v1/immobiliare/market-insights/prices\", {\n params: {\n market: options.market,\n region_id: regionId,\n province_id: options.province_id,\n city_id: options.city_id,\n contract: options.contract,\n },\n });\n }\n\n /**\n * Get all supported Immobiliare-group markets (it, es, gr, lu).\n *\n * @returns A bare array of supported markets (code, domain, country,\n * locale, currency, name).\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/immobiliare/markets\");\n }\n\n /**\n * Get the filter enums accepted by {@link search}.\n *\n * @returns Reference response with `contracts`, `categories`, and `sorts`.\n */\n async reference(): Promise<ReferenceResponse> {\n return this.client.request<ReferenceResponse>(\"/v1/immobiliare/reference\");\n }\n}\n","/**\n * LoopNet Search API client.\n *\n * Provides commercial-listing search for for-lease / for-sale / auction\n * listings across 5 markets (us, ca, uk, fr, es).\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { LoopNetSearchParams, SearchResponse } from \"./types.js\";\n\n/**\n * Client for the LoopNet listing search endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const results = await client.loopnet.search.search({ location: \"Houston, TX\" });\n * for (const listing of results.results) {\n * console.log(`${listing.position}. ${listing.address} — ${listing.price_text}`);\n * }\n * ```\n */\nexport class SearchClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search LoopNet for for-lease / for-sale / auction commercial listings.\n *\n * Costs 10 credits.\n *\n * @param params - Search parameters including location, filters, and pagination.\n * @returns Search results with listing cards and pagination metadata.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(params: LoopNetSearchParams): Promise<SearchResponse> {\n return this.client.request<SearchResponse>(\"/v1/loopnet/search\", {\n params: {\n location: params.location,\n market: params.market,\n listing_type: params.listing_type,\n property_type: params.property_type,\n page: params.page,\n min_price: params.min_price,\n max_price: params.max_price,\n price_type: params.price_type,\n min_size: params.min_size,\n max_size: params.max_size,\n },\n });\n }\n}\n","/**\n * LoopNet Listings API client.\n *\n * Provides full listing detail lookup by listing id.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ListingResponse, LoopNetMarket } from \"./types.js\";\n\n/** Options for the listing detail endpoint. */\nexport interface LoopNetListingParams {\n /** Coverage market (default: \"us\") */\n market?: LoopNetMarket;\n}\n\n/**\n * Client for the LoopNet listing detail endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const detail = await client.loopnet.listings.get(\"12345678\");\n * console.log(detail.listing.address, detail.listing.price_text);\n * ```\n */\nexport class ListingsClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a single LoopNet listing's full detail by listing id.\n *\n * Costs 12 credits.\n *\n * @param listingId - The LoopNet listing id.\n * @param params - Optional market selector.\n * @returns Listing detail response.\n * @throws NotFoundError - If the listing doesn't exist.\n */\n async get(listingId: string, params: LoopNetListingParams = {}): Promise<ListingResponse> {\n return this.client.request<ListingResponse>(`/v1/loopnet/listings/${listingId}`, {\n params: { market: params.market },\n });\n }\n}\n","/**\n * LoopNet Brokers API client.\n *\n * Provides a commercial broker's profile and their active listings.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { BrokerResponse, LoopNetMarket } from \"./types.js\";\n\n/** Options for the broker profile endpoint. */\nexport interface LoopNetBrokerParams {\n /** Coverage market (default: \"us\") */\n market?: LoopNetMarket;\n}\n\n/**\n * Client for the LoopNet broker profile endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const profile = await client.loopnet.brokers.get(\"jane-doe\", \"w7x2k9\");\n * console.log(profile.broker.name, profile.broker.listing_count);\n * ```\n */\nexport class BrokersClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get a LoopNet broker's profile and their active listings.\n *\n * Costs 8 credits.\n *\n * @param slug - The broker's profile URL slug.\n * @param brokerId - The LoopNet broker id.\n * @param params - Optional market selector.\n * @returns Broker profile response with the broker and their listings.\n * @throws NotFoundError - If the broker doesn't exist.\n */\n async get(\n slug: string,\n brokerId: string,\n params: LoopNetBrokerParams = {}\n ): Promise<BrokerResponse> {\n return this.client.request<BrokerResponse>(`/v1/loopnet/brokers/${slug}/${brokerId}`, {\n params: { market: params.market },\n });\n }\n}\n","/**\n * LoopNet Reference Data API client.\n *\n * Provides the static coverage-market and property-type lists.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { MarketsResponse, PropertyTypesResponse } from \"./types.js\";\n\n/**\n * Client for LoopNet reference endpoints (markets, property types).\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const markets = await client.loopnet.reference.markets();\n * const types = await client.loopnet.reference.propertyTypes();\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * List LoopNet coverage markets (us, ca, uk, fr, es).\n *\n * Free — costs 0 credits.\n *\n * @returns Markets response with all supported coverage markets.\n */\n async markets(): Promise<MarketsResponse> {\n return this.client.request<MarketsResponse>(\"/v1/loopnet/markets\");\n }\n\n /**\n * List LoopNet property-type facets (Office, Retail, Industrial, …).\n *\n * Free — costs 0 credits.\n *\n * @returns Property-types response with all searchable property-type slugs.\n */\n async propertyTypes(): Promise<PropertyTypesResponse> {\n return this.client.request<PropertyTypesResponse>(\"/v1/loopnet/property-types\");\n }\n}\n","/**\n * LoopNet API client.\n *\n * Provides access to all LoopNet API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { SearchClient } from \"./search.js\";\nimport { ListingsClient } from \"./listings.js\";\nimport { BrokersClient } from \"./brokers.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * LoopNet API client with access to all LoopNet endpoints.\n *\n * Provides sub-clients for different resource types:\n * - `search` - For-lease / for-sale / auction commercial-listing search\n * - `listings` - Listing detail (by listing id)\n * - `brokers` - Broker profile and their active listings\n * - `reference` - Reference data (markets, property types)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search listings\n * const results = await client.loopnet.search.search({ location: \"Houston, TX\" });\n *\n * // Get listing detail\n * const detail = await client.loopnet.listings.get(\"12345678\");\n *\n * // Get a broker profile\n * const broker = await client.loopnet.brokers.get(\"jane-doe\", \"w7x2k9\");\n *\n * // Reference data\n * const markets = await client.loopnet.reference.markets();\n * ```\n */\nexport class LoopNetClient {\n /** Client for for-lease / for-sale / auction commercial-listing search */\n readonly search: SearchClient;\n\n /** Client for listing detail (by listing id) */\n readonly listings: ListingsClient;\n\n /** Client for broker profile and their active listings */\n readonly brokers: BrokersClient;\n\n /** Client for reference data (markets, property types) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new LoopNet client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this.search = new SearchClient(client);\n this.listings = new ListingsClient(client);\n this.brokers = new BrokersClient(client);\n this.reference = new ReferenceClient(client);\n }\n}\n","/**\n * Perplexity API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\n\n/** Client for all Perplexity API operations. (Generated from the OpenAPI spec.) */\nexport class PerplexityClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /** Ask Perplexity a question. Generated from the OpenAPI spec; returns the raw response object. */\n async askPerplexityAQuestion(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/ask\", { params });\n }\n\n /** Ask Perplexity a question (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async askPerplexityAQuestionPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/ask\", { method: \"POST\", params, body });\n }\n\n /** Measure a brand's visibility in a Perplexity answer. Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAPerplexityAnswer(\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/brand-visibility\", { params });\n }\n\n /** Measure a brand's visibility in a Perplexity answer (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAPerplexityAnswerPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this.client.request(\"/v1/perplexity/brand-visibility\", { method: \"POST\", params, body });\n }\n}\n","/**\n * Depop API client.\n *\n * Depop endpoints: search (product search), getProduct (full single-product\n * detail, by slug), getUser (shop / seller profile, by username),\n * getUserProducts (a seller's products), and listMarkets. Single host\n * (www.depop.com) localised by a `market` param → country + currency.\n *\n * Data is browser-rendered (cloakbrowser), so each call takes a few seconds\n * to return.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n DepopSearchParams,\n DepopProductParams,\n DepopUserParams,\n DepopUserProductsParams,\n DepopSearchResponse,\n DepopProductDetail,\n DepopShopProfile,\n DepopUserProductsResponse,\n DepopMarketsResponse,\n} from \"./types.js\";\n\n/**\n * Client for all Depop API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search products\n * const results = await client.depop.search(\"vintage denim jacket\", { market: \"gb\" });\n * for (const product of results.products) {\n * console.log(`${product.brand} — ${product.price} ${product.currency}`);\n * }\n *\n * // Full single-product detail\n * const detail = await client.depop.getProduct(\"some-product-slug\");\n * console.log(detail.title);\n *\n * // Shop profile\n * const shop = await client.depop.getUser(\"someseller\");\n *\n * // A seller's products\n * const items = await client.depop.getUserProducts(\"someseller\");\n *\n * // Supported markets\n * const markets = await client.depop.listMarkets();\n * ```\n */\nexport class DepopClient {\n private readonly _gen: BaseClient;\n\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this._gen = client;\n this.client = client;\n }\n\n /**\n * Search Depop for products.\n *\n * Costs 10 credits.\n *\n * @param query - Search keywords (required).\n * @param options - Optional parameters (market, perPage, page, price/brand/\n * size/colour/condition/gender filters, sort).\n * @returns Search response with matching product cards and pagination meta.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async search(query: string, options: DepopSearchParams = {}): Promise<DepopSearchResponse> {\n return this.client.request<DepopSearchResponse>(\"/v1/depop/search\", {\n params: {\n query,\n market: options.market ?? \"us\",\n per_page: options.perPage,\n page: options.page,\n price_min: options.priceMin,\n price_max: options.priceMax,\n brands: options.brands,\n sizes: options.sizes,\n colours: options.colours,\n conditions: options.conditions,\n gender: options.gender,\n sort: options.sort,\n },\n });\n }\n\n /**\n * Get a single Depop product's full detail by slug.\n *\n * Costs 10 credits.\n *\n * @param slug - The Depop product slug.\n * @param options - Optional parameters (market).\n * @returns Full product detail.\n * @throws NotFoundError - If the product doesn't exist.\n */\n async getProduct(slug: string, options: DepopProductParams = {}): Promise<DepopProductDetail> {\n return this.client.request<DepopProductDetail>(`/v1/depop/products/${slug}`, {\n params: { market: options.market ?? \"us\" },\n });\n }\n\n /**\n * Get a Depop shop / seller profile by username.\n *\n * Costs 10 credits.\n *\n * @param username - The Depop seller username.\n * @param options - Optional parameters (market).\n * @returns Shop profile.\n * @throws NotFoundError - If the user doesn't exist.\n */\n async getUser(username: string, options: DepopUserParams = {}): Promise<DepopShopProfile> {\n return this.client.request<DepopShopProfile>(`/v1/depop/users/${username}`, {\n params: { market: options.market ?? \"us\" },\n });\n }\n\n /**\n * Get a Depop seller's products.\n *\n * Costs 10 credits.\n *\n * @param username - The Depop seller username.\n * @param options - Optional parameters (market, perPage, page).\n * @returns User products response with product cards and pagination meta.\n * @throws NotFoundError - If the user doesn't exist.\n */\n async getUserProducts(\n username: string,\n options: DepopUserProductsParams = {}\n ): Promise<DepopUserProductsResponse> {\n return this.client.request<DepopUserProductsResponse>(`/v1/depop/users/${username}/products`, {\n params: {\n market: options.market ?? \"us\",\n per_page: options.perPage,\n page: options.page,\n },\n });\n }\n\n /**\n * Get all supported Depop markets.\n *\n * Free — this endpoint costs no credits.\n *\n * @returns Markets response with all supported markets.\n */\n async listMarkets(): Promise<DepopMarketsResponse> {\n return this.client.request<DepopMarketsResponse>(\"/v1/depop/markets\");\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Get product detail. Generated from the OpenAPI spec; returns the raw response object. */\n async getProductDetail(\n productId: string,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(`/v1/depop/products/${productId}`, { params });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * LinkedIn API client.\n *\n * LinkedIn endpoints cover the public, logged-out surface: guest job search +\n * detail + company jobs, public company / school / profile pages, public\n * posts / articles, LinkedIn Learning courses, and a geo/company typeahead.\n * Requests are localised by a `country` residential-proxy param.\n *\n * Company/school/profile/post/course data is SSR-rendered, so those calls take\n * a few seconds to return; the guest job APIs are faster HTML fragments.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type {\n LinkedInJobsSearchParams,\n LinkedInCompanyJobsParams,\n LinkedInCountryParams,\n LinkedInJobsSearchResponse,\n JobDetail,\n Company,\n School,\n Profile,\n Post,\n LearningCourse,\n LinkedInGeoSuggestResponse,\n LinkedInHealthResponse,\n} from \"./types.js\";\n\n/**\n * Client for all LinkedIn API operations.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Search jobs\n * const results = await client.linkedin.jobsSearch({ keywords: \"python\", location: \"New York\" });\n * for (const job of results.jobs) {\n * console.log(`${job.title} — ${job.company}`);\n * }\n *\n * // Single job detail\n * const job = await client.linkedin.getJob(\"3901234567\");\n *\n * // Company / school / profile\n * const company = await client.linkedin.getCompany(\"microsoft\");\n * const school = await client.linkedin.getSchool(\"stanford-university\");\n * const profile = await client.linkedin.getProfile(\"williamhgates\");\n *\n * // Posts, articles, courses\n * const post = await client.linkedin.getPost(\"some-post-slug\");\n * const course = await client.linkedin.getCourse(\"learning-python\");\n *\n * // Geo / company typeahead\n * const geo = await client.linkedin.geoSuggest(\"London\");\n * ```\n */\nexport class LinkedInClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Search LinkedIn jobs (guest search API).\n *\n * @param options - Optional parameters (keywords, location, geoId, companyId,\n * datePosted, experience, jobType, workplace, sort, start, country).\n * @returns Jobs search response with matching job cards and pagination meta.\n * @throws AuthenticationError - If the API key is invalid.\n * @throws ValidationError - If the parameters are invalid.\n */\n async jobsSearch(options: LinkedInJobsSearchParams = {}): Promise<LinkedInJobsSearchResponse> {\n return this.client.request<LinkedInJobsSearchResponse>(\"/v1/linkedin/jobs/search\", {\n params: {\n keywords: options.keywords,\n location: options.location,\n geo_id: options.geoId,\n company_id: options.companyId,\n date_posted: options.datePosted,\n experience: options.experience,\n job_type: options.jobType,\n workplace: options.workplace,\n sort: options.sort,\n start: options.start ?? 0,\n country: options.country ?? \"us\",\n },\n });\n }\n\n /**\n * Get full detail for one LinkedIn job posting.\n *\n * @param jobId - The numeric LinkedIn job id.\n * @param options - Optional parameters (country).\n * @returns Full job detail.\n * @throws NotFoundError - If the job doesn't exist.\n */\n async getJob(jobId: string, options: LinkedInCountryParams = {}): Promise<JobDetail> {\n return this.client.request<JobDetail>(`/v1/linkedin/jobs/${jobId}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a company's job postings.\n *\n * @param companyId - The numeric LinkedIn company id.\n * @param options - Optional parameters (start, country).\n * @returns Jobs search response with the company's job cards and pagination meta.\n * @throws NotFoundError - If the company doesn't exist.\n */\n async companyJobs(\n companyId: string,\n options: LinkedInCompanyJobsParams = {}\n ): Promise<LinkedInJobsSearchResponse> {\n return this.client.request<LinkedInJobsSearchResponse>(\n `/v1/linkedin/companies/${companyId}/jobs`,\n {\n params: {\n start: options.start ?? 0,\n country: options.country ?? \"us\",\n },\n }\n );\n }\n\n /**\n * Get a public LinkedIn company page.\n *\n * @param universalName - The company's universal name (URL slug).\n * @param options - Optional parameters (country).\n * @returns Company profile.\n * @throws NotFoundError - If the company doesn't exist.\n */\n async getCompany(universalName: string, options: LinkedInCountryParams = {}): Promise<Company> {\n return this.client.request<Company>(`/v1/linkedin/companies/${universalName}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn school page.\n *\n * @param universalName - The school's universal name (URL slug).\n * @param options - Optional parameters (country).\n * @returns School profile.\n * @throws NotFoundError - If the school doesn't exist.\n */\n async getSchool(universalName: string, options: LinkedInCountryParams = {}): Promise<School> {\n return this.client.request<School>(`/v1/linkedin/schools/${universalName}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn profile.\n *\n * @param publicId - The profile's public id (URL slug).\n * @param options - Optional parameters (country).\n * @returns Public profile.\n * @throws NotFoundError - If the profile doesn't exist.\n */\n async getProfile(publicId: string, options: LinkedInCountryParams = {}): Promise<Profile> {\n return this.client.request<Profile>(`/v1/linkedin/profiles/${publicId}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn post (activity share).\n *\n * @param postSlug - The post slug (last URL segment).\n * @param options - Optional parameters (country).\n * @returns Post detail.\n * @throws NotFoundError - If the post doesn't exist.\n */\n async getPost(postSlug: string, options: LinkedInCountryParams = {}): Promise<Post> {\n return this.client.request<Post>(`/v1/linkedin/posts/${postSlug}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn article (`/pulse/`).\n *\n * @param articleSlug - The article slug (last URL segment).\n * @param options - Optional parameters (country).\n * @returns Article detail (Post shape).\n * @throws NotFoundError - If the article doesn't exist.\n */\n async getArticle(articleSlug: string, options: LinkedInCountryParams = {}): Promise<Post> {\n return this.client.request<Post>(`/v1/linkedin/articles/${articleSlug}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Get a public LinkedIn Learning course.\n *\n * @param courseSlug - The course slug (last URL segment).\n * @param options - Optional parameters (country).\n * @returns Course detail.\n * @throws NotFoundError - If the course doesn't exist.\n */\n async getCourse(\n courseSlug: string,\n options: LinkedInCountryParams = {}\n ): Promise<LearningCourse> {\n return this.client.request<LearningCourse>(`/v1/linkedin/learning/${courseSlug}`, {\n params: { country: options.country ?? \"us\" },\n });\n }\n\n /**\n * Suggest geo / company ids for a query (typeahead).\n *\n * @param query - Location or company name, e.g. \"London\".\n * @param type - \"geo\" | \"company\" (default: \"geo\").\n * @returns Geo-suggest response with matching suggestions.\n */\n async geoSuggest(query: string, type = \"geo\"): Promise<LinkedInGeoSuggestResponse> {\n return this.client.request<LinkedInGeoSuggestResponse>(\"/v1/linkedin/geo/suggest\", {\n params: { query, type },\n });\n }\n\n /**\n * LinkedIn scraper health check.\n *\n * Free — this endpoint costs no credits.\n *\n * @returns Health payload (status, service, version, products).\n */\n async health(): Promise<LinkedInHealthResponse> {\n return this.client.request<LinkedInHealthResponse>(\"/v1/linkedin/health\");\n }\n}\n","/**\n * ChatGPT Ask API client.\n *\n * Sends a prompt to the real chatgpt.com and returns the answer as structured\n * JSON, including the web sources ChatGPT cited.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ChatGPTAskParams, ChatGPTAskResponse } from \"./types.js\";\n\n/**\n * Client for the ChatGPT ask endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.chatgpt.ask.ask({\n * prompt: \"best running shoes 2026\",\n * });\n * console.log(result.answer);\n * for (const citation of result.citations) {\n * console.log(`${citation.domain}: ${citation.url}`);\n * }\n * ```\n */\nexport class AskClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Ask ChatGPT a question and get the answer with its sources.\n *\n * Costs 20 credits. Typical latency is 20-25s ungrounded, 30-70s with web search.\n *\n * @param params - Ask parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"auto\").\n * @returns The answer, its citations, and the full retrieved search set.\n *\n * @example\n * ```typescript\n * const result = await client.chatgpt.ask.ask({\n * prompt: \"what is the best CRM for a 10-person startup?\",\n * country: \"GB\",\n * web_search: \"force\",\n * });\n * console.log(result.web_search_triggered, result.model);\n * for (const source of result.search_results) {\n * console.log(`${source.cited ? \"*\" : \" \"} ${source.url}`);\n * }\n * ```\n */\n async ask(params: ChatGPTAskParams): Promise<ChatGPTAskResponse> {\n return this.client.request<ChatGPTAskResponse>(\"/v1/chatgpt/ask\", {\n params: {\n prompt: params.prompt,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * ChatGPT Brand Visibility API client.\n *\n * Answer-engine-optimisation (AEO/GEO) analysis: ask ChatGPT a prompt and get\n * back how a brand fares in the answer, next to its competitors.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ChatGPTBrandVisibilityParams, ChatGPTBrandVisibilityResponse } from \"./types.js\";\n\n/**\n * Client for the ChatGPT brand-visibility endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.chatgpt.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * competitors: [\"Bright Data\", \"Apify\"],\n * });\n * console.log(result.mentioned, result.share_of_voice_pct);\n * ```\n */\nexport class BrandClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Analyse how a brand shows up in ChatGPT's answer to a prompt.\n *\n * Costs 25 credits.\n *\n * @param params - Brand-visibility parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.brand - The brand name to look for in the answer.\n * @param params.domain - The brand's domain, used to detect brand citations.\n * @param params.aliases - Other spellings that should count as mentions.\n * @param params.competitors - Competitors to measure share of voice against.\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"force\").\n * @returns The brand analysis plus the answer and its citations.\n *\n * @example\n * ```typescript\n * const result = await client.chatgpt.brand.visibility({\n * prompt: \"which proxy provider should I use?\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * aliases: [\"Scrape Badger\"],\n * competitors: [\"Bright Data\", \"Oxylabs\"],\n * country: \"DE\",\n * });\n * console.log(`position score: ${result.position_score}`);\n * for (const competitor of result.competitors) {\n * console.log(`${competitor.name}: ${competitor.mention_count}`);\n * }\n * ```\n */\n async visibility(params: ChatGPTBrandVisibilityParams): Promise<ChatGPTBrandVisibilityResponse> {\n return this.client.request<ChatGPTBrandVisibilityResponse>(\"/v1/chatgpt/brand-visibility\", {\n params: {\n prompt: params.prompt,\n brand: params.brand,\n domain: params.domain,\n aliases: params.aliases?.length ? params.aliases.join(\",\") : undefined,\n competitors: params.competitors?.length ? params.competitors.join(\",\") : undefined,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * ChatGPT Reference Data API client.\n *\n * Provides the list of models chatgpt.com currently offers.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { ChatGPTModelsParams, ChatGPTModelsResponse } from \"./types.js\";\n\n/**\n * Client for ChatGPT reference data endpoints.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.chatgpt.reference.models();\n * for (const model of result.models) {\n * console.log(`${model.slug}: ${model.title}`);\n * }\n * ```\n */\nexport class ReferenceClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Get the models chatgpt.com currently offers.\n *\n * Costs 1 credit.\n *\n * @param params - Optional parameters.\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @returns The available models.\n *\n * @example\n * ```typescript\n * const result = await client.chatgpt.reference.models({ country: \"GB\" });\n * console.log(`${result.count} models`);\n * for (const model of result.models) {\n * console.log(`${model.slug}: ${model.max_tokens} tokens`);\n * }\n * ```\n */\n async models(params: ChatGPTModelsParams = {}): Promise<ChatGPTModelsResponse> {\n return this.client.request<ChatGPTModelsResponse>(\"/v1/chatgpt/models\", {\n params: { country: params.country },\n });\n }\n}\n","/**\n * ChatGPT API client.\n *\n * Provides access to all ChatGPT API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { AskClient } from \"./ask.js\";\nimport { BrandClient } from \"./brand.js\";\nimport { ReferenceClient } from \"./reference.js\";\n\n/**\n * ChatGPT API client with access to all ChatGPT endpoints.\n *\n * Prompts the real chatgpt.com — not the OpenAI API — anonymously, and returns\n * the answer as structured JSON including the web sources ChatGPT cited.\n *\n * Sub-clients:\n * - `ask` - Send a prompt and get the answer with its sources\n * - `brand` - AEO/GEO brand-visibility analysis\n * - `reference` - Reference data (available models)\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Ask a question\n * const result = await client.chatgpt.ask.ask({ prompt: \"best running shoes 2026\" });\n *\n * // Brand visibility\n * const brand = await client.chatgpt.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * competitors: [\"Bright Data\"],\n * });\n *\n * // Available models\n * const models = await client.chatgpt.reference.models();\n * ```\n */\nexport class ChatGPTClient {\n private readonly _gen: BaseClient;\n\n /** Client for asking ChatGPT a question */\n readonly ask: AskClient;\n\n /** Client for AEO/GEO brand-visibility analysis */\n readonly brand: BrandClient;\n\n /** Client for reference data (available models) */\n readonly reference: ReferenceClient;\n\n /**\n * Create a new ChatGPT client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.ask = new AskClient(client);\n this.brand = new BrandClient(client);\n this.reference = new ReferenceClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Ask ChatGPT a question (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async askChatgptAQuestionPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/chatgpt/ask\", { method: \"POST\", params, body });\n }\n\n /** Measure a brand's visibility in a ChatGPT answer (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAChatgptAnswerPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/chatgpt/brand-visibility\", { method: \"POST\", params, body });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Gemini Ask API client.\n *\n * Sends a prompt to the real gemini.google.com and returns the answer as\n * structured JSON, including the web sources Gemini cited.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GeminiAskParams, GeminiAskResponse } from \"./types.js\";\n\n/**\n * Client for the Gemini ask endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.gemini.ask.ask({\n * prompt: \"best running shoes 2026\",\n * });\n * console.log(result.answer);\n * for (const citation of result.citations) {\n * console.log(`${citation.domain}: ${citation.url}`);\n * }\n * ```\n */\nexport class AskClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Ask Gemini a question and get the answer with its sources.\n *\n * @param params - Ask parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"auto\").\n * @returns The answer, its citations, and the full retrieved search set.\n *\n * @example\n * ```typescript\n * const result = await client.gemini.ask.ask({\n * prompt: \"what is the best CRM for a 10-person startup?\",\n * country: \"GB\",\n * web_search: \"force\",\n * });\n * console.log(result.web_search_triggered, result.model);\n * for (const source of result.search_results) {\n * console.log(`${source.cited ? \"*\" : \" \"} ${source.url}`);\n * }\n * ```\n */\n async ask(params: GeminiAskParams): Promise<GeminiAskResponse> {\n return this.client.request<GeminiAskResponse>(\"/v1/gemini/ask\", {\n params: {\n prompt: params.prompt,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * Gemini Brand Visibility API client.\n *\n * Answer-engine-optimisation (AEO/GEO) analysis: ask Gemini a prompt and get\n * back how a brand fares in the answer, next to its competitors.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport type { GeminiBrandVisibilityParams, GeminiBrandVisibilityResponse } from \"./types.js\";\n\n/**\n * Client for the Gemini brand-visibility endpoint.\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * const result = await client.gemini.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * competitors: [\"Bright Data\", \"Apify\"],\n * });\n * console.log(result.mentioned, result.share_of_voice_pct);\n * ```\n */\nexport class BrandClient {\n private readonly client: BaseClient;\n\n constructor(client: BaseClient) {\n this.client = client;\n }\n\n /**\n * Analyse how a brand shows up in Gemini's answer to a prompt.\n *\n * @param params - Brand-visibility parameters.\n * @param params.prompt - The prompt to send (max 4096 characters).\n * @param params.brand - The brand name to look for in the answer.\n * @param params.domain - The brand's domain, used to detect brand citations.\n * @param params.aliases - Other spellings that should count as mentions.\n * @param params.competitors - Competitors to measure share of voice against.\n * @param params.country - ISO-3166 alpha-2 egress country (default: \"US\").\n * @param params.web_search - \"auto\", \"force\", or \"off\" (default: \"force\").\n * @returns The brand analysis plus the answer and its citations.\n *\n * @example\n * ```typescript\n * const result = await client.gemini.brand.visibility({\n * prompt: \"which proxy provider should I use?\",\n * brand: \"ScrapeBadger\",\n * domain: \"scrapebadger.com\",\n * aliases: [\"Scrape Badger\"],\n * competitors: [\"Bright Data\", \"Oxylabs\"],\n * country: \"DE\",\n * });\n * console.log(`position score: ${result.position_score}`);\n * for (const competitor of result.competitors) {\n * console.log(`${competitor.name}: ${competitor.mention_count}`);\n * }\n * ```\n */\n async visibility(params: GeminiBrandVisibilityParams): Promise<GeminiBrandVisibilityResponse> {\n return this.client.request<GeminiBrandVisibilityResponse>(\"/v1/gemini/brand-visibility\", {\n params: {\n prompt: params.prompt,\n brand: params.brand,\n domain: params.domain,\n aliases: params.aliases?.length ? params.aliases.join(\",\") : undefined,\n competitors: params.competitors?.length ? params.competitors.join(\",\") : undefined,\n country: params.country,\n web_search: params.web_search,\n },\n });\n }\n}\n","/**\n * Gemini API client.\n *\n * Provides access to all Gemini API endpoints through specialized sub-clients.\n */\n\nimport type { BaseClient } from \"../internal/client.js\";\nimport { AskClient } from \"./ask.js\";\nimport { BrandClient } from \"./brand.js\";\n\n/**\n * Gemini API client with access to all Gemini endpoints.\n *\n * Prompts the real gemini.google.com — not the Gemini API — anonymously, and\n * returns the answer as structured JSON including the web sources Gemini\n * cited.\n *\n * Sub-clients:\n * - `ask` - Send a prompt and get the answer with its sources\n * - `brand` - AEO/GEO brand-visibility analysis\n *\n * @example\n * ```typescript\n * const client = new ScrapeBadger({ apiKey: \"key\" });\n *\n * // Ask a question\n * const result = await client.gemini.ask.ask({ prompt: \"best running shoes 2026\" });\n *\n * // Brand visibility\n * const brand = await client.gemini.brand.visibility({\n * prompt: \"best web scraping API\",\n * brand: \"ScrapeBadger\",\n * competitors: [\"Bright Data\"],\n * });\n * ```\n */\nexport class GeminiClient {\n private readonly _gen: BaseClient;\n\n /** Client for asking Gemini a question */\n readonly ask: AskClient;\n\n /** Client for AEO/GEO brand-visibility analysis */\n readonly brand: BrandClient;\n\n /**\n * Create a new Gemini client.\n *\n * @param client - The base HTTP client for making requests.\n */\n constructor(client: BaseClient) {\n this._gen = client;\n this.ask = new AskClient(client);\n this.brand = new BrandClient(client);\n }\n\n // --- BEGIN generated by sdk/codegen/facade — do not edit ---\n\n /** Ask Gemini a question (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async askGeminiAQuestionPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/gemini/ask\", { method: \"POST\", params, body });\n }\n\n /** Measure a brand's visibility in a Gemini answer (POST). Generated from the OpenAPI spec; returns the raw response object. */\n async measureABrandSVisibilityInAGeminiAnswerPost(\n body?: unknown,\n params: Record<string, string | number | boolean | undefined> = {}\n ): Promise<Record<string, unknown>> {\n return this._gen.request(\"/v1/gemini/brand-visibility\", { method: \"POST\", params, body });\n }\n // --- END generated by sdk/codegen/facade ---\n}\n","/**\n * Main ScrapeBadger client.\n *\n * This is the primary entry point for the ScrapeBadger SDK.\n */\n\nimport { BaseClient } from \"./internal/client.js\";\nimport { type ScrapeBadgerConfig, resolveConfig, getApiKeyFromEnv } from \"./internal/config.js\";\nimport { TwitterClient } from \"./twitter/client.js\";\nimport { WebClient } from \"./web/client.js\";\nimport { VintedClient } from \"./vinted/client.js\";\nimport { GoogleClient } from \"./google/client.js\";\nimport { GooglePlayClient } from \"./google_play/client.js\";\nimport { IdealistaClient } from \"./idealista/client.js\";\nimport { RedditClient } from \"./reddit/client.js\";\nimport { ApartmentsClient } from \"./apartments/client.js\";\nimport { AppStoreClient } from \"./app_store/client.js\";\nimport { InstagramClient } from \"./instagram/client.js\";\nimport { RedfinClient } from \"./redfin/client.js\";\nimport { AccountClient } from \"./account/client.js\";\nimport { AirbnbClient } from \"./airbnb/client.js\";\nimport { AmazonClient } from \"./amazon/client.js\";\nimport { ShopeeClient } from \"./shopee/client.js\";\nimport { TikTokClient } from \"./tiktok/client.js\";\nimport { EbayClient } from \"./ebay/client.js\";\nimport { FacebookClient } from \"./facebook/client.js\";\nimport { WalmartClient } from \"./walmart/client.js\";\nimport { DuckDuckGoClient } from \"./duckduckgo/client.js\";\nimport { BingClient } from \"./bing/client.js\";\nimport { BookingClient } from \"./booking/client.js\";\nimport { BaiduClient } from \"./baidu/client.js\";\nimport { YahooClient } from \"./yahoo/client.js\";\nimport { YandexClient } from \"./yandex/client.js\";\nimport { YoutubeClient } from \"./youtube/client.js\";\nimport { RealtorClient } from \"./realtor/client.js\";\nimport { LeboncoinClient } from \"./leboncoin/client.js\";\nimport { ZillowClient } from \"./zillow/client.js\";\nimport { ImmobiliareClient } from \"./immobiliare/client.js\";\nimport { LoopNetClient } from \"./loopnet/client.js\";\nimport { PerplexityClient } from \"./perplexity/client.js\";\nimport { DepopClient } from \"./depop/client.js\";\nimport { LinkedInClient } from \"./linkedin/client.js\";\nimport { ChatGPTClient } from \"./chatgpt/client.js\";\nimport { GeminiClient } from \"./gemini/client.js\";\n\n/**\n * ScrapeBadger API client.\n *\n * The main client for interacting with the ScrapeBadger API.\n * Provides access to all available scrapers through typed sub-clients.\n *\n * @example\n * ```typescript\n * import { ScrapeBadger } from \"scrapebadger\";\n *\n * // Create client with API key\n * const client = new ScrapeBadger({ apiKey: \"your-api-key\" });\n *\n * // Or use environment variable (SCRAPEBADGER_API_KEY)\n * const client = new ScrapeBadger();\n *\n * // Access Twitter API\n * const tweet = await client.twitter.tweets.getById(\"1234567890\");\n * const user = await client.twitter.users.getByUsername(\"elonmusk\");\n *\n * // Search with automatic pagination\n * for await (const tweet of client.twitter.tweets.searchAll(\"python\")) {\n * console.log(tweet.text);\n * }\n *\n * // Collect all results into an array\n * import { collectAll } from \"scrapebadger\";\n * const tweets = await collectAll(\n * client.twitter.tweets.searchAll(\"python\", { maxItems: 100 })\n * );\n * ```\n */\nexport class ScrapeBadger {\n private readonly baseClient: BaseClient;\n\n /** Twitter API client */\n readonly twitter: TwitterClient;\n\n /** Web scraping API client */\n readonly web: WebClient;\n\n /** Vinted scraper API client */\n readonly vinted: VintedClient;\n\n /** Google Scraper API client — 19 Google product APIs */\n readonly google: GoogleClient;\n /** Google_Play API client. (Generated from the OpenAPI spec.) */\n readonly google_play: GooglePlayClient;\n /** Idealista API client. (Generated from the OpenAPI spec.) */\n readonly idealista: IdealistaClient;\n\n /** Reddit scraper API client */\n readonly reddit: RedditClient;\n\n /** Apartments.com scraper API client — search + property with unit-level pricing (US) */\n readonly apartments: ApartmentsClient;\n /** App_Store API client. (Generated from the OpenAPI spec.) */\n readonly app_store: AppStoreClient;\n\n /** Instagram scraper API client — users, media, search, hashtags, locations, audio */\n readonly instagram: InstagramClient;\n\n /** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */\n readonly redfin: RedfinClient;\n\n /** Amazon scraper API client — 14 endpoints */\n /** Account API client. (Generated from the OpenAPI spec.) */\n readonly account: AccountClient;\n /** Airbnb API client. (Generated from the OpenAPI spec.) */\n readonly airbnb: AirbnbClient;\n readonly amazon: AmazonClient;\n\n /** Shopee scraper API client — 6 endpoints across 11 markets */\n readonly shopee: ShopeeClient;\n\n /** TikTok scraper API client — 26 endpoints */\n readonly tiktok: TikTokClient;\n\n /** eBay scraper API client — 12 endpoints across 18 markets */\n readonly ebay: EbayClient;\n /** Facebook API client. (Generated from the OpenAPI spec.) */\n readonly facebook: FacebookClient;\n\n /** Walmart scraper API client — 11 endpoints (walmart.com, US-only) */\n readonly walmart: WalmartClient;\n\n /** DuckDuckGo scraper API client — search, images, news, videos, autocomplete, instant, regions */\n readonly duckduckgo: DuckDuckGoClient;\n\n /** Bing scraper API client — 6 endpoints (search, images, videos, news, autocomplete, markets) */\n readonly bing: BingClient;\n /** Booking API client. (Generated from the OpenAPI spec.) */\n readonly booking: BookingClient;\n\n /** Baidu scraper API client — search, news, images, autocomplete (baidu.com, China's #1 search engine) */\n readonly baidu: BaiduClient;\n\n /** Yahoo scraper API client — 6 endpoints (search, images, videos, news, autocomplete, markets) across 35 markets */\n readonly yahoo: YahooClient;\n\n /** Yandex scraper API client — web search, image search, reverse-image (CBIR), markets (tr/com/ru/by/kz/uz) */\n readonly yandex: YandexClient;\n\n /** YouTube scraper API client — 39 endpoints */\n readonly youtube: YoutubeClient;\n\n /** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */\n readonly realtor: RealtorClient;\n\n /** Leboncoin scraper API client — 10 endpoints (France) */\n readonly leboncoin: LeboncoinClient;\n\n /** Zillow scraper API client — 5 endpoints (search, property, agent, autocomplete, markets) */\n readonly zillow: ZillowClient;\n\n /** Immobiliare scraper API client — 8 endpoints across 4 markets (it, es, gr, lu) */\n readonly immobiliare: ImmobiliareClient;\n\n /** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */\n readonly loopnet: LoopNetClient;\n /** Perplexity API client. (Generated from the OpenAPI spec.) */\n readonly perplexity: PerplexityClient;\n\n /** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */\n readonly depop: DepopClient;\n\n /** LinkedIn scraper API client — 11 no-auth endpoints (jobs, company, school, profile, post, article, learning, geo) */\n readonly linkedin: LinkedInClient;\n\n /** ChatGPT scraper API client — ask, brand visibility, models (the real chatgpt.com, anonymous) */\n readonly chatgpt: ChatGPTClient;\n\n /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */\n readonly gemini: GeminiClient;\n\n /**\n * Create a new ScrapeBadger client.\n *\n * @param config - Configuration options. If apiKey is not provided,\n * it will be read from the SCRAPEBADGER_API_KEY environment variable.\n * @throws Error if no API key is provided or found in environment.\n *\n * @example\n * ```typescript\n * // With explicit API key\n * const client = new ScrapeBadger({ apiKey: \"your-api-key\" });\n *\n * // With custom options\n * const client = new ScrapeBadger({\n * apiKey: \"your-api-key\",\n * baseUrl: \"https://custom.api.com\",\n * timeout: 60000,\n * maxRetries: 5\n * });\n *\n * // Using environment variable\n * // Set SCRAPEBADGER_API_KEY=your-api-key\n * const client = new ScrapeBadger();\n * ```\n */\n constructor(config: Partial<ScrapeBadgerConfig> = {}) {\n // Use provided API key or fall back to environment variable\n const apiKey = config.apiKey ?? getApiKeyFromEnv();\n\n if (!apiKey) {\n throw new Error(\n \"API key is required. Pass it in the config or set SCRAPEBADGER_API_KEY environment variable.\"\n );\n }\n\n const resolvedConfig = resolveConfig({ ...config, apiKey });\n this.baseClient = new BaseClient(resolvedConfig);\n\n // Initialize sub-clients\n this.twitter = new TwitterClient(this.baseClient);\n this.web = new WebClient(this.baseClient);\n this.vinted = new VintedClient(this.baseClient);\n this.google = new GoogleClient(this.baseClient);\n this.google_play = new GooglePlayClient(this.baseClient);\n this.idealista = new IdealistaClient(this.baseClient);\n this.reddit = new RedditClient(this.baseClient);\n this.apartments = new ApartmentsClient(this.baseClient);\n this.app_store = new AppStoreClient(this.baseClient);\n this.instagram = new InstagramClient(this.baseClient);\n this.redfin = new RedfinClient(this.baseClient);\n this.account = new AccountClient(this.baseClient);\n this.airbnb = new AirbnbClient(this.baseClient);\n this.amazon = new AmazonClient(this.baseClient);\n this.shopee = new ShopeeClient(this.baseClient);\n this.tiktok = new TikTokClient(this.baseClient);\n this.ebay = new EbayClient(this.baseClient);\n this.facebook = new FacebookClient(this.baseClient);\n this.walmart = new WalmartClient(this.baseClient);\n this.duckduckgo = new DuckDuckGoClient(this.baseClient);\n this.bing = new BingClient(this.baseClient);\n this.booking = new BookingClient(this.baseClient);\n this.baidu = new BaiduClient(this.baseClient);\n this.yahoo = new YahooClient(this.baseClient);\n this.yandex = new YandexClient(this.baseClient);\n this.youtube = new YoutubeClient(this.baseClient);\n this.realtor = new RealtorClient(this.baseClient);\n this.leboncoin = new LeboncoinClient(this.baseClient);\n this.zillow = new ZillowClient(this.baseClient);\n this.immobiliare = new ImmobiliareClient(this.baseClient);\n this.loopnet = new LoopNetClient(this.baseClient);\n this.perplexity = new PerplexityClient(this.baseClient);\n this.depop = new DepopClient(this.baseClient);\n this.linkedin = new LinkedInClient(this.baseClient);\n this.chatgpt = new ChatGPTClient(this.baseClient);\n this.gemini = new GeminiClient(this.baseClient);\n }\n}\n"]}
|