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.
@@ -0,0 +1,131 @@
1
+ // Generated by scripts/generate.mjs from https://scrapingrabbit.com/openapi.json. Do not edit by hand.
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ /** One method per API endpoint (31). Each returns the answer's `data`. */
4
+ export class Methods {
5
+ /** Your current balance. Free: it does not cost a credit, but it counts toward the rate limit. */
6
+ accountCredits(options) {
7
+ return this.request("/account/credits", {}, options);
8
+ }
9
+ /** 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. */
10
+ amazonBestSellersViewer(params, options) {
11
+ return this.request("/amazon/bestsellers", params, options);
12
+ }
13
+ /** 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. */
14
+ amazonKeywordTool(params, options) {
15
+ return this.request("/amazon/autocomplete", params, options);
16
+ }
17
+ /** 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. */
18
+ amazonProductSearch(params, options) {
19
+ return this.request("/amazon/search", params, options);
20
+ }
21
+ /** 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. */
22
+ appStoreReviewsViewer(params, options) {
23
+ return this.request("/apple/reviews", params, options);
24
+ }
25
+ /** 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. */
26
+ appStoreSearch(params, options) {
27
+ return this.request("/apple/search", params, options);
28
+ }
29
+ /** 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. */
30
+ domainAgeChecker(params, options) {
31
+ return this.request("/seo/domain-age", params, options);
32
+ }
33
+ /** 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. */
34
+ domainAuthorityChecker(params, options) {
35
+ return this.request("/seo/domain-authority", params, options);
36
+ }
37
+ /** 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. */
38
+ emailVerifier(params, options) {
39
+ return this.request("/email/verify", params, options);
40
+ }
41
+ /** 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. */
42
+ googleAutocomplete(params, options) {
43
+ return this.request("/google/autocomplete", params, options);
44
+ }
45
+ /** 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. */
46
+ googleMapsBusinessSearch(params, options) {
47
+ return this.request("/google/maps", params, options);
48
+ }
49
+ /** 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. */
50
+ googleNewsSearch(params, options) {
51
+ return this.request("/google/news", params, options);
52
+ }
53
+ /** 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. */
54
+ googleTrendsExplorer(params, options) {
55
+ return this.request("/google/trends", params, options);
56
+ }
57
+ /** 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. */
58
+ instagramHighlightViewer(params, options) {
59
+ return this.request("/instagram/highlights", params, options);
60
+ }
61
+ /** 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. */
62
+ instagramProfileViewer(params, options) {
63
+ return this.request("/instagram/profile", params, options);
64
+ }
65
+ /** 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. */
66
+ instagramUsernameChecker(params, options) {
67
+ return this.request("/instagram/username/check", params, options);
68
+ }
69
+ /** 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. */
70
+ snapchatProfileViewer(params, options) {
71
+ return this.request("/snapchat/profile", params, options);
72
+ }
73
+ /** 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. */
74
+ tiktokEngagementRateCalculator(params, options) {
75
+ return this.request("/tiktok/engagement", params, options);
76
+ }
77
+ /** 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. */
78
+ tiktokProfileViewer(params, options) {
79
+ return this.request("/tiktok/profile", params, options);
80
+ }
81
+ /** 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. */
82
+ tiktokTranscript(params, options) {
83
+ return this.request("/tiktok/transcript", params, options);
84
+ }
85
+ /** 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. */
86
+ tiktokUsernameChecker(params, options) {
87
+ return this.request("/tiktok/username/check", params, options);
88
+ }
89
+ /** 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. */
90
+ walmartKeywordTool(params, options) {
91
+ return this.request("/walmart/autocomplete", params, options);
92
+ }
93
+ /** 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. */
94
+ walmartProductSearch(params, options) {
95
+ return this.request("/walmart/search", params, options);
96
+ }
97
+ /** 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. */
98
+ websiteTrafficChecker(params, options) {
99
+ return this.request("/seo/website-traffic", params, options);
100
+ }
101
+ /** 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. */
102
+ xVideoTranscript(params, options) {
103
+ return this.request("/twitter/transcript", params, options);
104
+ }
105
+ /** 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. */
106
+ youtubeBannerDownloader(params, options) {
107
+ return this.request("/youtube/channel/banner", params, options);
108
+ }
109
+ /** 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. */
110
+ youtubeChannelIdFinder(params, options) {
111
+ return this.request("/youtube/resolve", params, options);
112
+ }
113
+ /** 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. */
114
+ youtubeChannelViewer(params, options) {
115
+ return this.request("/youtube/channel", params, options);
116
+ }
117
+ /** 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. */
118
+ youtubeCommentExtractor(params, options) {
119
+ return this.request("/youtube/comments", params, options);
120
+ }
121
+ /** 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. */
122
+ youtubeTagExtractor(params, options) {
123
+ return this.request("/youtube/video", params, options);
124
+ }
125
+ /** 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. */
126
+ youtubeTranscript(params, options) {
127
+ return this.request("/youtube/transcript", params, options);
128
+ }
129
+ }
130
+ /** Every endpoint's method name, for tests and tooling. */
131
+ export const METHOD_NAMES = ["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"];
package/package.json CHANGED
@@ -1,6 +1,64 @@
1
1
  {
2
2
  "name": "scrapingrabbit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Node.js and TypeScript client for the ScrapingRabbit web data API: YouTube transcripts and comments, TikTok, Instagram, X, Amazon, Google and SEO data. Typed, zero dependencies.",
5
+ "type": "module",
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/esm/index.js",
8
+ "types": "./dist/esm/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/esm/index.d.ts",
13
+ "default": "./dist/esm/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/cjs/index.d.ts",
17
+ "default": "./dist/cjs/index.js"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "sideEffects": false,
27
+ "scripts": {
28
+ "generate": "node scripts/generate.mjs",
29
+ "build": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node -e \"require('fs').writeFileSync('dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }))\"",
30
+ "test": "node --test test/client.test.mjs",
31
+ "prepare": "npm run build"
32
+ },
33
+ "engines": {
34
+ "node": ">=18"
35
+ },
36
+ "keywords": [
37
+ "scrapingrabbit",
38
+ "scraping",
39
+ "web-scraping",
40
+ "api",
41
+ "sdk",
42
+ "youtube-transcript",
43
+ "tiktok",
44
+ "instagram",
45
+ "twitter",
46
+ "amazon",
47
+ "seo",
48
+ "typescript"
49
+ ],
50
+ "homepage": "https://scrapingrabbit.com/docs",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/scrapingrabbit/scrapingrabbit-node.git"
54
+ },
55
+ "bugs": {
56
+ "url": "https://github.com/scrapingrabbit/scrapingrabbit-node/issues"
57
+ },
58
+ "license": "MIT",
59
+ "author": "ScrapingRabbit",
60
+ "devDependencies": {
61
+ "@types/node": "^22.0.0",
62
+ "typescript": "^5.6.0"
63
+ }
64
+ }