scrapingrabbit 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ScrapingRabbit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,80 @@
1
- # Temporary Holding Version
1
+ # scrapingrabbit
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Node.js and TypeScript client for the [ScrapingRabbit](https://scrapingrabbit.com) web data API: YouTube transcripts and comments, TikTok, Instagram, X, Amazon, Google and SEO data as JSON.
4
+
5
+ - One method per API endpoint (31), generated from the API's [OpenAPI file](https://scrapingrabbit.com/openapi.json), with typed parameters.
6
+ - Zero dependencies. Node 18+, ESM and CommonJS.
7
+ - Rate limits (`429`), server errors and network errors are retried; refusals are not.
8
+ - You pay credits only when a call returns data. Failed calls are free, so retrying is safe.
9
+ - New accounts get 100 free credits and a first key, no card needed: [scrapingrabbit.com/login](https://scrapingrabbit.com/login).
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install scrapingrabbit
15
+ ```
16
+
17
+ ## Use
18
+
19
+ ```ts
20
+ import { ScrapingRabbit, ScrapingRabbitError } from "scrapingrabbit";
21
+
22
+ const client = new ScrapingRabbit(); // reads SCRAPINGRABBIT_API_KEY, or pass { apiKey: "sr_live_..." }
23
+
24
+ try {
25
+ const transcript = await client.youtubeTranscript({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" });
26
+ console.log(transcript.language, transcript.transcript.length, "lines");
27
+ } catch (error) {
28
+ if (error instanceof ScrapingRabbitError) console.log(error.code, error.status); // e.g. UPSTREAM_NOT_FOUND when a video has no captions
29
+ else throw error;
30
+ }
31
+ ```
32
+
33
+ CommonJS:
34
+
35
+ ```js
36
+ const { ScrapingRabbit } = require("scrapingrabbit");
37
+ ```
38
+
39
+ Each method resolves to the answer's `data`. It is typed `any` by default; pass your own type if you want one:
40
+
41
+ ```ts
42
+ const page = await client.youtubeCommentExtractor<{ pagination: { next_page_token?: string } }>({ url: videoUrl });
43
+ const more = await client.youtubeCommentExtractor({ url: videoUrl, next_page_token: page.pagination.next_page_token });
44
+ ```
45
+
46
+ ## Options
47
+
48
+ ```ts
49
+ new ScrapingRabbit({
50
+ apiKey: "sr_live_...", // default: process.env.SCRAPINGRABBIT_API_KEY
51
+ timeoutMs: 90_000, // per call
52
+ maxRetries: 2, // for 429, 5xx and network errors
53
+ });
54
+
55
+ await client.accountCredits({ signal: AbortSignal.timeout(5_000) }); // per-call signal or timeoutMs
56
+ ```
57
+
58
+ Keep the key on your server. Anyone who can read it can spend your credits.
59
+
60
+ ## Errors
61
+
62
+ `ScrapingRabbitError` has `.code` (for example `RATE_LIMITED`, `PAYMENT_REQUIRED`, `INVALID_PARAMETERS`, `TIMEOUT`, `NETWORK_ERROR`), `.status` and `.retryAfter` (seconds). The full list is in the [docs](https://scrapingrabbit.com/docs).
63
+
64
+ ## Also available
65
+
66
+ [Python client](https://github.com/scrapingrabbit/scrapingrabbit-python) · [MCP server](https://github.com/scrapingrabbit/scrapingrabbit-mcp) · [Agent skill](https://github.com/scrapingrabbit/scrapingrabbit-skills) · [Examples](https://github.com/scrapingrabbit/scrapingrabbit-examples)
67
+
68
+ ## Develop
69
+
70
+ ```bash
71
+ npm run generate # refresh src/methods.generated.ts from the live OpenAPI file, then commit it
72
+ npm run build
73
+ npm test # runs the built client against a local fake API
74
+ ```
75
+
76
+ Release: bump `version` in package.json, then push a matching tag (`npm version patch && git push --follow-tags`). The publish workflow uses npm trusted publishing, so no token is stored.
77
+
78
+ ## License
79
+
80
+ MIT
@@ -0,0 +1,29 @@
1
+ import { Methods, type RequestOptions } from "./methods.generated.js";
2
+ export declare const DEFAULT_BASE_URL = "https://api.scrapingrabbit.com/v1";
3
+ export interface ClientOptions {
4
+ /** Defaults to the SCRAPINGRABBIT_API_KEY environment variable. */
5
+ apiKey?: string;
6
+ baseUrl?: string;
7
+ /** Per-call timeout in milliseconds. Default 90000. */
8
+ timeoutMs?: number;
9
+ /** Retries for rate limits (429), server errors (5xx) and network errors. Default 2. */
10
+ maxRetries?: number;
11
+ /** Custom fetch (tests, proxies). Defaults to the global fetch (Node 18+). */
12
+ fetch?: typeof fetch;
13
+ }
14
+ /** The API refused or failed a call. Failed calls are not charged. */
15
+ export declare class ScrapingRabbitError extends Error {
16
+ readonly code: string;
17
+ readonly status: number | undefined;
18
+ readonly retryAfter: number | undefined;
19
+ constructor(message: string, code?: string, status?: number, retryAfter?: number);
20
+ }
21
+ /**
22
+ * ScrapingRabbit API client. `new ScrapingRabbit().youtubeTranscript({ url })` resolves to the answer's `data`.
23
+ * Keep the key on the server: anyone who can read it can spend your credits.
24
+ */
25
+ export declare class ScrapingRabbit extends Methods {
26
+ #private;
27
+ constructor(options?: ClientOptions);
28
+ protected request<T>(path: string, query: object, options?: RequestOptions): Promise<T>;
29
+ }
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScrapingRabbit = exports.ScrapingRabbitError = exports.DEFAULT_BASE_URL = void 0;
4
+ const methods_generated_js_1 = require("./methods.generated.js");
5
+ exports.DEFAULT_BASE_URL = "https://api.scrapingrabbit.com/v1";
6
+ // Longer than the API's slowest route class (70 s at the gateway), so the API's own answer arrives first.
7
+ const DEFAULT_TIMEOUT_MS = 90_000;
8
+ const MAX_WAIT_MS = 30_000;
9
+ /** The API refused or failed a call. Failed calls are not charged. */
10
+ class ScrapingRabbitError extends Error {
11
+ code;
12
+ status;
13
+ retryAfter;
14
+ constructor(message, code = "UNKNOWN", status, retryAfter) {
15
+ super(`${code}: ${message}`);
16
+ this.name = "ScrapingRabbitError";
17
+ this.code = code;
18
+ this.status = status;
19
+ this.retryAfter = retryAfter;
20
+ }
21
+ }
22
+ exports.ScrapingRabbitError = ScrapingRabbitError;
23
+ const backoff = (attempt) => Math.min(1000 * 2 ** attempt, MAX_WAIT_MS);
24
+ /** Waits `ms`, or rejects with the signal's reason the moment it aborts. */
25
+ function sleep(ms, signal) {
26
+ return new Promise((resolve, reject) => {
27
+ if (signal?.aborted)
28
+ return reject(signal.reason);
29
+ const onAbort = () => {
30
+ clearTimeout(timer);
31
+ reject(signal?.reason);
32
+ };
33
+ const timer = setTimeout(() => {
34
+ signal?.removeEventListener("abort", onAbort);
35
+ resolve();
36
+ }, ms);
37
+ signal?.addEventListener("abort", onAbort, { once: true });
38
+ });
39
+ }
40
+ /** Milliseconds to wait before retrying, or undefined to give up. Refusals (4xx other than 429) are final. */
41
+ function retryDelay(error, attempt) {
42
+ if (error.code === "NETWORK_ERROR")
43
+ return backoff(attempt);
44
+ if (error.status === 429) {
45
+ if (error.retryAfter === undefined)
46
+ return backoff(attempt);
47
+ // Retrying sooner than the server asked only earns another 429; past our cap, the caller decides.
48
+ return error.retryAfter * 1000 <= MAX_WAIT_MS ? error.retryAfter * 1000 : undefined;
49
+ }
50
+ // A 504 means a slow route already used its full time at the gateway, so repeating it rarely helps.
51
+ if (error.status !== undefined && error.status >= 500 && error.status !== 504)
52
+ return backoff(attempt);
53
+ return undefined;
54
+ }
55
+ /**
56
+ * Aborts when either signal does (AbortSignal.any needs Node 20.3; this package supports Node 18).
57
+ * Call `cleanup` when done, or a signal reused across calls collects one listener per call.
58
+ */
59
+ function eitherSignal(a, b) {
60
+ const controller = new AbortController();
61
+ const added = [];
62
+ for (const source of [a, b]) {
63
+ if (source.aborted) {
64
+ controller.abort(source.reason);
65
+ break;
66
+ }
67
+ const onAbort = () => controller.abort(source.reason);
68
+ source.addEventListener("abort", onAbort, { once: true });
69
+ added.push([source, onAbort]);
70
+ }
71
+ return {
72
+ signal: controller.signal,
73
+ cleanup: () => {
74
+ for (const [source, onAbort] of added)
75
+ source.removeEventListener("abort", onAbort);
76
+ },
77
+ };
78
+ }
79
+ function readEnvKey() {
80
+ const env = globalThis.process?.env;
81
+ return env?.SCRAPINGRABBIT_API_KEY;
82
+ }
83
+ /** The envelope's `data` for a success, otherwise a ScrapingRabbitError. `text` is the fully read body. */
84
+ function unwrap(response, text) {
85
+ let body;
86
+ try {
87
+ body = JSON.parse(text);
88
+ }
89
+ catch {
90
+ body = undefined; // not JSON (for example a proxy's HTML error page)
91
+ }
92
+ const envelope = body !== null && typeof body === "object" ? body : undefined;
93
+ if (response.ok && envelope && envelope.success !== false) {
94
+ return ("data" in envelope ? envelope.data : envelope);
95
+ }
96
+ const header = response.headers.get("retry-after");
97
+ const retryAfter = header !== null && /^\d+(\.\d+)?$/.test(header) ? Number(header) : undefined;
98
+ const message = envelope?.message !== undefined ? String(envelope.message) : `HTTP ${response.status}`;
99
+ const code = envelope?.code !== undefined ? String(envelope.code) : "UNKNOWN";
100
+ throw new ScrapingRabbitError(message, code, response.status, retryAfter);
101
+ }
102
+ /**
103
+ * ScrapingRabbit API client. `new ScrapingRabbit().youtubeTranscript({ url })` resolves to the answer's `data`.
104
+ * Keep the key on the server: anyone who can read it can spend your credits.
105
+ */
106
+ class ScrapingRabbit extends methods_generated_js_1.Methods {
107
+ #apiKey;
108
+ #baseUrl;
109
+ #timeoutMs;
110
+ #maxRetries;
111
+ #fetch;
112
+ constructor(options = {}) {
113
+ super();
114
+ const apiKey = options.apiKey ?? readEnvKey();
115
+ if (!apiKey) {
116
+ throw new ScrapingRabbitError("No API key. Pass { apiKey } or set SCRAPINGRABBIT_API_KEY. Get a free key (100 credits, no card) at https://scrapingrabbit.com/login", "MISSING_API_KEY");
117
+ }
118
+ const fetchImpl = options.fetch ?? globalThis.fetch;
119
+ if (typeof fetchImpl !== "function")
120
+ throw new ScrapingRabbitError("No fetch available. Use Node 18+ or pass { fetch }.", "NO_FETCH");
121
+ this.#apiKey = apiKey;
122
+ this.#baseUrl = (options.baseUrl ?? exports.DEFAULT_BASE_URL).replace(/\/+$/, "");
123
+ this.#timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
124
+ this.#maxRetries = Math.max(0, options.maxRetries ?? 2);
125
+ this.#fetch = fetchImpl;
126
+ }
127
+ async request(path, query, options = {}) {
128
+ const url = new URL(this.#baseUrl + path);
129
+ for (const [name, value] of Object.entries(query)) {
130
+ if (value !== undefined && value !== null && value !== "")
131
+ url.searchParams.set(name, String(value));
132
+ }
133
+ // Retrying is safe: a call is charged only when it succeeds.
134
+ for (let attempt = 0;; attempt++) {
135
+ try {
136
+ return await this.#once(url, options);
137
+ }
138
+ catch (error) {
139
+ if (!(error instanceof ScrapingRabbitError))
140
+ throw error;
141
+ const wait = retryDelay(error, attempt);
142
+ if (wait === undefined || attempt >= this.#maxRetries)
143
+ throw error;
144
+ await sleep(wait, options.signal);
145
+ }
146
+ }
147
+ }
148
+ async #once(url, options) {
149
+ const timeoutMs = options.timeoutMs ?? this.#timeoutMs;
150
+ const timeout = AbortSignal.timeout(timeoutMs);
151
+ const combined = options.signal ? eitherSignal(options.signal, timeout) : { signal: timeout, cleanup: () => { } };
152
+ try {
153
+ let response;
154
+ let text;
155
+ try {
156
+ // The key only travels in this header, never in the URL.
157
+ response = await this.#fetch(url, { headers: { "x-api-key": this.#apiKey, accept: "application/json" }, signal: combined.signal });
158
+ // Read the body under the same signal, so a cancel or timeout mid-download is reported as such.
159
+ text = await response.text();
160
+ }
161
+ catch (error) {
162
+ if (options.signal?.aborted)
163
+ throw options.signal.reason ?? error;
164
+ if (timeout.aborted)
165
+ throw new ScrapingRabbitError(`No answer within ${timeoutMs} ms`, "TIMEOUT");
166
+ throw new ScrapingRabbitError(`Could not reach the API: ${error instanceof Error ? error.message : String(error)}`, "NETWORK_ERROR");
167
+ }
168
+ return unwrap(response, text);
169
+ }
170
+ finally {
171
+ combined.cleanup();
172
+ }
173
+ }
174
+ }
175
+ exports.ScrapingRabbit = ScrapingRabbit;
@@ -0,0 +1,2 @@
1
+ export { ScrapingRabbit, ScrapingRabbitError, DEFAULT_BASE_URL, type ClientOptions } from "./client.js";
2
+ export * from "./methods.generated.js";
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.DEFAULT_BASE_URL = exports.ScrapingRabbitError = exports.ScrapingRabbit = void 0;
18
+ var client_js_1 = require("./client.js");
19
+ Object.defineProperty(exports, "ScrapingRabbit", { enumerable: true, get: function () { return client_js_1.ScrapingRabbit; } });
20
+ Object.defineProperty(exports, "ScrapingRabbitError", { enumerable: true, get: function () { return client_js_1.ScrapingRabbitError; } });
21
+ Object.defineProperty(exports, "DEFAULT_BASE_URL", { enumerable: true, get: function () { return client_js_1.DEFAULT_BASE_URL; } });
22
+ __exportStar(require("./methods.generated.js"), exports);
@@ -0,0 +1,196 @@
1
+ export interface RequestOptions {
2
+ /** Cancel the call. */
3
+ signal?: AbortSignal;
4
+ /** Override the client's timeout for this call, in milliseconds. */
5
+ timeoutMs?: number;
6
+ }
7
+ export interface AmazonBestSellersViewerParams {
8
+ /** Category id. Use a category id such as electronics, books or home-garden. A sub-category looks like electronics/281407. */
9
+ category_id: string;
10
+ }
11
+ export interface AmazonKeywordToolParams {
12
+ /** Start of a search. Type a word or phrase a shopper might start with. */
13
+ query: string;
14
+ }
15
+ export interface AmazonProductSearchParams {
16
+ /** Product search. Type what you would search for on Amazon. */
17
+ query: string;
18
+ }
19
+ export interface AppStoreReviewsViewerParams {
20
+ /** App Store link or app id. Paste an App Store link, or the number after 'id' in it. */
21
+ product_id: string;
22
+ }
23
+ export interface AppStoreSearchParams {
24
+ /** App name or topic. Type an app name or what the app does. */
25
+ query: string;
26
+ }
27
+ export interface DomainAgeCheckerParams {
28
+ /** Domain name. Enter a domain such as example.com. Links are cleaned up for you. */
29
+ domain: string;
30
+ }
31
+ export interface DomainAuthorityCheckerParams {
32
+ /** Domain name. Enter a domain such as example.com. Links are cleaned up for you. */
33
+ domain: string;
34
+ }
35
+ export interface EmailVerifierParams {
36
+ /** Email address. Enter one email address. */
37
+ email: string;
38
+ }
39
+ export interface GoogleAutocompleteParams {
40
+ /** Start of a search. Type a word or phrase. Add a trailing space to see what usually comes next. */
41
+ query: string;
42
+ }
43
+ export interface GoogleMapsBusinessSearchParams {
44
+ /** What and where. Type a business type and a place, like a search on Google Maps. */
45
+ query: string;
46
+ }
47
+ export interface GoogleNewsSearchParams {
48
+ /** Topic or company. Type a topic, a company or a person. */
49
+ query: string;
50
+ }
51
+ export interface GoogleTrendsExplorerParams {
52
+ /** Search term. Type one search term. */
53
+ query: string;
54
+ }
55
+ export interface InstagramHighlightViewerParams {
56
+ /** Instagram username. Type a username with or without the @, or paste a profile link. */
57
+ username: string;
58
+ }
59
+ export interface InstagramProfileViewerParams {
60
+ /** Instagram username. Type a username with or without the @, or paste a profile link. */
61
+ username: string;
62
+ }
63
+ export interface InstagramUsernameCheckerParams {
64
+ /** Instagram username. Type a username with or without the @, or paste a profile link. */
65
+ username: string;
66
+ }
67
+ export interface SnapchatProfileViewerParams {
68
+ /** Snapchat username. Enter a username, with or without the @. */
69
+ username: string;
70
+ }
71
+ export interface TiktokEngagementRateCalculatorParams {
72
+ /** TikTok username. Type a username with or without the @, or paste a profile link. */
73
+ username: string;
74
+ }
75
+ export interface TiktokProfileViewerParams {
76
+ /** TikTok username. Type a username with or without the @, or paste a profile link. */
77
+ username: string;
78
+ }
79
+ export interface TiktokTranscriptParams {
80
+ /** TikTok video link. Paste the full video link. Short vm.tiktok.com links are not supported, open them first and copy the long link. */
81
+ url: string;
82
+ }
83
+ export interface TiktokUsernameCheckerParams {
84
+ /** TikTok username. Type a username with or without the @, or paste a profile link. */
85
+ username: string;
86
+ }
87
+ export interface WalmartKeywordToolParams {
88
+ /** Start of a search. Type a word or phrase a shopper might start with. */
89
+ query: string;
90
+ }
91
+ export interface WalmartProductSearchParams {
92
+ /** Product search. Type what you would search for on Walmart. */
93
+ query: string;
94
+ }
95
+ export interface WebsiteTrafficCheckerParams {
96
+ /** Domain name. Enter a domain such as example.com. Links are cleaned up for you. */
97
+ domain: string;
98
+ }
99
+ export interface XVideoTranscriptParams {
100
+ /** X post link. Paste the link of a post that has a video. x.com and twitter.com links both work. */
101
+ url: string;
102
+ }
103
+ export interface YoutubeBannerDownloaderParams {
104
+ /** Channel handle or link. Enter a handle like @mkbhd, a youtube.com link or a channel ID. */
105
+ channel_id: string;
106
+ }
107
+ export interface YoutubeChannelIdFinderParams {
108
+ /** Channel handle or link. Enter a handle like @mkbhd, or a youtube.com/@handle link. */
109
+ handle: string;
110
+ }
111
+ export interface YoutubeChannelViewerParams {
112
+ /** Channel handle or link. Use a @handle, a channel link, or a channel ID that starts with UC. */
113
+ channel_id: string;
114
+ }
115
+ export interface YoutubeCommentExtractorParams {
116
+ /** YouTube video link. Works with watch, youtu.be, Shorts and embed links, or a bare video ID. */
117
+ url: string;
118
+ /** Get the next page of comments. Pass the pagination.next_page_token from the previous answer, unchanged. Each page is one call. */
119
+ next_page_token?: string;
120
+ }
121
+ export interface YoutubeTagExtractorParams {
122
+ /** YouTube video link. Works with watch, youtu.be, Shorts and embed links, or a bare video ID. */
123
+ url: string;
124
+ }
125
+ export interface YoutubeTranscriptParams {
126
+ /** YouTube video link. Works with watch, youtu.be, Shorts and embed links, or a bare video ID. */
127
+ url: string;
128
+ }
129
+ /** One method per API endpoint (31). Each returns the answer's `data`. */
130
+ export declare abstract class Methods {
131
+ protected abstract request<T>(path: string, query: object, options?: RequestOptions): Promise<T>;
132
+ /** Your current balance. Free: it does not cost a credit, but it counts toward the rate limit. */
133
+ accountCredits<T = any>(options?: RequestOptions): Promise<T>;
134
+ /** See the top-selling products in any Amazon category. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Amazon.com only, and the list changes through the day. A wrong category id returns no results. */
135
+ amazonBestSellersViewer<T = any>(params: AmazonBestSellersViewerParams, options?: RequestOptions): Promise<T>;
136
+ /** See the searches Amazon suggests as shoppers type. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Suggestions show what is popular, not how many searches happen. Results can differ by country and change over time. */
137
+ amazonKeywordTool<T = any>(params: AmazonKeywordToolParams, options?: RequestOptions): Promise<T>;
138
+ /** Search Amazon and compare products by rating and price. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). One page of results per search, from Amazon.com. Prices and stock change often, and some listings show no price. */
139
+ amazonProductSearch<T = any>(params: AmazonProductSearchParams, options?: RequestOptions): Promise<T>;
140
+ /** Read what users say about any app on the App Store. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Shows one page of the most helpful reviews from the US store. Reviews are as the store shows them. We do not edit them. */
141
+ appStoreReviewsViewer<T = any>(params: AppStoreReviewsViewerParams, options?: RequestOptions): Promise<T>;
142
+ /** Search the App Store and compare apps by rating and price. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Results are from the US App Store. The order is the store's own and changes over time. */
143
+ appStoreSearch<T = any>(params: AppStoreSearchParams, options?: RequestOptions): Promise<T>;
144
+ /** See when a domain was registered and how old it is. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). The date is when the domain was first registered, not when the website launched. Some registries do not publish creation dates, so a few domains return no result. */
145
+ domainAgeChecker<T = any>(params: DomainAgeCheckerParams, options?: RequestOptions): Promise<T>;
146
+ /** See a website's Moz Domain Authority, Page Authority and spam score. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Domain Authority is a Moz score. It is a rough guide to link strength, not a Google ranking factor. Scores move as Moz updates its index, so compare sites on the same day. A new site with few links usually scores low even if its content is good. */
147
+ domainAuthorityChecker<T = any>(params: DomainAuthorityCheckerParams, options?: RequestOptions): Promise<T>;
148
+ /** Check the format, mail servers and type of any email address. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). This checks the format and the domain's mail setup. It does not connect to the mailbox, so it cannot prove a specific inbox exists. Catch-all domains accept every address, so a valid result there is not a guarantee. */
149
+ emailVerifier<T = any>(params: EmailVerifierParams, options?: RequestOptions): Promise<T>;
150
+ /** See the searches Google suggests as people type. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Suggestions are not search volumes. They show what is popular, not how many searches happen. Results can differ by country, language and time. */
151
+ googleAutocomplete<T = any>(params: GoogleAutocompleteParams, options?: RequestOptions): Promise<T>;
152
+ /** Find local businesses with their ratings, phone numbers and websites. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Each search returns one page of results, around 20 businesses. Phone numbers and websites appear only where the business published them. */
153
+ googleMapsBusinessSearch<T = any>(params: GoogleMapsBusinessSearchParams, options?: RequestOptions): Promise<T>;
154
+ /** Get the latest headlines on any topic from Google News. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Headlines come from Google News and link to the publisher's own page. Results change often, so the list can differ from one hour to the next. */
155
+ googleNewsSearch<T = any>(params: GoogleNewsSearchParams, options?: RequestOptions): Promise<T>;
156
+ /** See how interest in a search term moved over the past year. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Values are relative on a 0 to 100 scale, where 100 is the term's own peak. They are not search counts. Very rare terms may have too little data to chart. */
157
+ googleTrendsExplorer<T = any>(params: GoogleTrendsExplorerParams, options?: RequestOptions): Promise<T>;
158
+ /** Browse a profile's Instagram highlights and the stories inside them. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Photo and video links come from Instagram's own servers and may stop working after a while, so open them while you need them. A private account may show no highlights. */
159
+ instagramHighlightViewer<T = any>(params: InstagramHighlightViewerParams, options?: RequestOptions): Promise<T>;
160
+ /** View the public stats, bio and links of an Instagram profile. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Only public information is returned. Private accounts show their public header only. Counts are a snapshot and can differ slightly from the app. */
161
+ instagramProfileViewer<T = any>(params: InstagramProfileViewerParams, options?: RequestOptions): Promise<T>;
162
+ /** See if an Instagram username is free, or who has it. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Results come from public Instagram data at the time of the search. A name shown as available can still be blocked by Instagram at sign-up. */
163
+ instagramUsernameChecker<T = any>(params: InstagramUsernameCheckerParams, options?: RequestOptions): Promise<T>;
164
+ /** See a public Snapchat profile without an account. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Only public profiles can be read. Private accounts show no data. Subscriber counts shown are the ones Snapchat publishes on the profile. */
165
+ snapchatProfileViewer<T = any>(params: SnapchatProfileViewerParams, options?: RequestOptions): Promise<T>;
166
+ /** See an account's engagement rate from its recent videos. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). The rate uses only the latest 10 videos, so a recent viral or flop video moves it a lot. Very large accounts often have a low rate by followers but a high rate by views, so read both numbers. Only public data is used. */
167
+ tiktokEngagementRateCalculator<T = any>(params: TiktokEngagementRateCalculatorParams, options?: RequestOptions): Promise<T>;
168
+ /** View the public stats, bio and link of a TikTok profile. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Only public information is returned. Counts are a snapshot and can differ slightly from the app. */
169
+ tiktokProfileViewer<T = any>(params: TiktokProfileViewerParams, options?: RequestOptions): Promise<T>;
170
+ /** Get the spoken words of any TikTok video as text. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). A transcript exists only when TikTok has captions for the video. Videos with no speech or no captions return nothing. Auto-generated captions can contain mistakes. Photo posts and private videos have no transcript. */
171
+ tiktokTranscript<T = any>(params: TiktokTranscriptParams, options?: RequestOptions): Promise<T>;
172
+ /** See if a TikTok username is free, or who has it. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Results come from public TikTok data at the time of the search. A name shown as available can still be blocked by TikTok at sign-up. */
173
+ tiktokUsernameChecker<T = any>(params: TiktokUsernameCheckerParams, options?: RequestOptions): Promise<T>;
174
+ /** See the searches Walmart suggests as shoppers type. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Suggestions show what is popular, not how many searches happen. Results can differ over time. */
175
+ walmartKeywordTool<T = any>(params: WalmartKeywordToolParams, options?: RequestOptions): Promise<T>;
176
+ /** Search Walmart and compare products by price and rating. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). One page of results per search. Prices and stock change often, and some listings show a price range or no price. Walmart sometimes blocks a lookup. If you see an error, try again. */
177
+ walmartProductSearch<T = any>(params: WalmartProductSearchParams, options?: RequestOptions): Promise<T>;
178
+ /** Estimate a site's organic search traffic and ranking keywords. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). These are estimates built from the keywords a site ranks for. They are not the site's own analytics. Brand-new sites and very small sites often show no data. */
179
+ websiteTrafficChecker<T = any>(params: WebsiteTrafficCheckerParams, options?: RequestOptions): Promise<T>;
180
+ /** Get the spoken words of any X video as text. Costs 5 credits per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). A transcript exists only when X has captions for the video. Many videos have none. Auto-generated captions can contain mistakes. Posts without a video, and private accounts, have no transcript. */
181
+ xVideoTranscript<T = any>(params: XVideoTranscriptParams, options?: RequestOptions): Promise<T>;
182
+ /** Get a channel's full-size banner and profile picture. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Channels without a banner show only the profile picture. Images belong to the channel owner. Use them only as the owner allows. */
183
+ youtubeBannerDownloader<T = any>(params: YoutubeBannerDownloaderParams, options?: RequestOptions): Promise<T>;
184
+ /** Turn a YouTube @handle into the channel ID. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Needs a channel handle (starting with @) or a link that contains one. Channels that have no handle cannot be looked up this way. */
185
+ youtubeChannelIdFinder<T = any>(params: YoutubeChannelIdFinderParams, options?: RequestOptions): Promise<T>;
186
+ /** See a channel's subscribers, views, video count and links. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Only public information is returned. Hidden subscriber counts show as unavailable. YouTube rounds large counts, so figures are close but not exact. */
187
+ youtubeChannelViewer<T = any>(params: YoutubeChannelViewerParams, options?: RequestOptions): Promise<T>;
188
+ /** Read the top comments of any YouTube video with likes and replies. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). This page shows the first page of top comments, not every comment on the video. Videos with comments turned off return nothing. */
189
+ youtubeCommentExtractor<T = any>(params: YoutubeCommentExtractorParams, options?: RequestOptions): Promise<T>;
190
+ /** See the tags and keywords any YouTube video uses. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). Tags are only shown when the creator added them. Many videos have none. Tags are a small signal for YouTube search. Title, description and viewer behavior matter far more. */
191
+ youtubeTagExtractor<T = any>(params: YoutubeTagExtractorParams, options?: RequestOptions): Promise<T>;
192
+ /** Convert any YouTube video to a transcript with timestamps. Costs 1 credit per successful call. Time limit: 30 seconds (504 UPSTREAM_TIMEOUT after that, not charged). A transcript exists only when the video has captions, written by the creator or generated by YouTube. Private videos and videos with captions turned off return no transcript. Auto-generated captions can contain mistakes, especially with names and technical terms. */
193
+ youtubeTranscript<T = any>(params: YoutubeTranscriptParams, options?: RequestOptions): Promise<T>;
194
+ }
195
+ /** Every endpoint's method name, for tests and tooling. */
196
+ export declare const METHOD_NAMES: readonly ["accountCredits", "amazonBestSellersViewer", "amazonKeywordTool", "amazonProductSearch", "appStoreReviewsViewer", "appStoreSearch", "domainAgeChecker", "domainAuthorityChecker", "emailVerifier", "googleAutocomplete", "googleMapsBusinessSearch", "googleNewsSearch", "googleTrendsExplorer", "instagramHighlightViewer", "instagramProfileViewer", "instagramUsernameChecker", "snapchatProfileViewer", "tiktokEngagementRateCalculator", "tiktokProfileViewer", "tiktokTranscript", "tiktokUsernameChecker", "walmartKeywordTool", "walmartProductSearch", "websiteTrafficChecker", "xVideoTranscript", "youtubeBannerDownloader", "youtubeChannelIdFinder", "youtubeChannelViewer", "youtubeCommentExtractor", "youtubeTagExtractor", "youtubeTranscript"];