@mrscraper/sdk 4.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -188
- package/dist/api.d.ts +81 -64
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +62 -107
- package/dist/api.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +57 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +64 -0
- package/dist/internal.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
Node.js SDK for [MrScraper](https://mrscraper.com)
|
|
5
|
+
Node.js SDK for [MrScraper](https://mrscraper.com) page scraping, Web Search, and account status. Requires Node.js 18 or newer and ES modules.
|
|
6
6
|
|
|
7
7
|
## Install and authenticate
|
|
8
8
|
|
|
@@ -11,176 +11,141 @@ npm install @mrscraper/sdk
|
|
|
11
11
|
export MRSCRAPER_API_TOKEN="YOUR_TOKEN"
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
The SDK reads `MRSCRAPER_API_TOKEN` automatically. You can instead pass `token` in any call's options object. All functions are async and return `{ status_code, data, headers }`. JSON responses are parsed, HTML and other text remain strings, and
|
|
14
|
+
The SDK reads `MRSCRAPER_API_TOKEN` automatically. You can instead pass `token` in any call's options object. All functions are async and return `{ status_code, data, headers }`. JSON responses are parsed, HTML and other text remain strings, and binary responses are returned as Node.js `Buffer` values in `data`.
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Public functions
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
| Function | Purpose |
|
|
19
|
+
|----------|---------|
|
|
20
|
+
| `scraper_api(url, options?)` | Fetch a public web page as rendered HTML, Markdown, screenshot, or a combination |
|
|
21
|
+
| `web_search(query, options?)` | Search the web for real-time results: website URLs, titles, and descriptions |
|
|
22
|
+
| `account(options?)` | Read account identity, subscription, quota, and rate limits |
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|----------|----------------------|
|
|
22
|
-
| `scraper_html(url, options)` | POST with `html=true`; Markdown and screenshot flags omitted |
|
|
23
|
-
| `scraper_markdown(url, options)` | POST with `markdown=true`; HTML and screenshot flags omitted |
|
|
24
|
-
| `get_screenshot(url, options)` | GET with `screenshot=full`, `browserRendering=true`, `waitUntil=domcontentloaded`, and `timeout=300` |
|
|
25
|
-
| `scraper_json(url, options)` | POST with `html=true`, `agent=general`, and a prompt |
|
|
26
|
-
| `scraper_multiple_page(url, options)` | POST with `agent=listing`, a prompt, and `maxPages=3`; output flags omitted |
|
|
27
|
-
| `scraper_sitemap(url, options)` | POST with `agent=map`, `maxDepth=2`, `maxPages=3`, and `limit=1000`; output flags omitted |
|
|
28
|
-
| `scrape_brand(url, options)` | POST with `action=brand-scraping` and `bundle=clean`; output flags omitted |
|
|
29
|
-
| `get_brand(job_id, options)` | GET `/neo/brand?id=...`; optional `output` downloads an artifact |
|
|
30
|
-
| `web_search(queryOrUrl, options)` | Fetch Google search results |
|
|
31
|
-
| `account(options)` | Read account identity, subscription, quota, and rate limits |
|
|
24
|
+
The package also exports `MrScraperError` and the TypeScript types `ScraperApiOptions`, `ScraperApiData`, `WebSearchOptions`, `WebSearchResponse`, `WebSearchResult`, `AccountOptions`, `AccountSummary`, and `MrScraperResponse`.
|
|
32
25
|
|
|
33
|
-
### Migrating from
|
|
26
|
+
### Migrating from 4.x to 5.0
|
|
34
27
|
|
|
35
|
-
Version
|
|
28
|
+
Version 5.0.0 returns to three public functions. The format-specific functions from 4.x (`scraper_html`, `scraper_markdown`, `get_screenshot`, `scraper_json`, `scraper_multiple_page`, `scraper_sitemap`, `scrape_brand`, and `get_brand`) and their option types are no longer exported. Use `scraper_api` with output flags instead:
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const screenshot = await get_screenshot(url);
|
|
47
|
-
```
|
|
30
|
+
| 4.x call | 5.0 replacement |
|
|
31
|
+
|----------|-----------------|
|
|
32
|
+
| `scraper_html(url, options)` | `scraper_api(url, options)` |
|
|
33
|
+
| `scraper_markdown(url, options)` | `scraper_api(url, { ...options, html: false, markdown: true })` |
|
|
34
|
+
| `get_screenshot(url, { full_page: false })` | `scraper_api(url, { html: false, screenshot: true })` |
|
|
35
|
+
| `web_search(query, { region: "us" })` | `web_search(query, { country: "us" })` |
|
|
36
|
+
| `ScraperOptions` type | `ScraperApiOptions` |
|
|
37
|
+
|
|
38
|
+
Other changes:
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
- `scraper_api` sends a `GET` request with the target URL, page options, `maxRetries`, and `tokenCap` in the query string. Multiple outputs can be requested in one call.
|
|
41
|
+
- A screenshot from `scraper_api` is a base64-encoded image (JPEG) in `data.screenshot`, not a `Buffer`.
|
|
42
|
+
- `web_search` now calls the MrScraper API with `action: "websearch"`. Its first argument is the search query, and it accepts `country` and `num_results` (10 to 100). The `raw`, `format`, `region`, `language`, `page`, and `render_js` options and search URL input are removed. Results are returned as JSON.
|
|
43
|
+
- `account` is unchanged.
|
|
50
44
|
|
|
51
|
-
|
|
45
|
+
## Scraper API
|
|
52
46
|
|
|
53
|
-
|
|
47
|
+
Fetch a public web page as rendered HTML, Markdown, screenshot, or a combination. Common controls support JavaScript rendering, geolocation, proxies, cookies, custom target headers, and waiting for page content.
|
|
54
48
|
|
|
55
49
|
```typescript
|
|
56
|
-
import {
|
|
50
|
+
import { writeFile } from "node:fs/promises";
|
|
51
|
+
import { scraper_api } from "@mrscraper/sdk";
|
|
52
|
+
|
|
53
|
+
const html = await scraper_api("https://books.toscrape.com/");
|
|
54
|
+
console.log(html.data); // HTML string
|
|
57
55
|
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const combined = await scraper_api("https://books.toscrape.com/", {
|
|
57
|
+
html: true,
|
|
58
|
+
markdown: true,
|
|
59
|
+
screenshot: true,
|
|
60
|
+
proxy_country: "us",
|
|
61
|
+
});
|
|
62
|
+
if (typeof combined.data !== "string") {
|
|
63
|
+
console.log(combined.data.markdown);
|
|
64
|
+
if (combined.data.screenshot) {
|
|
65
|
+
await writeFile("page.jpg", Buffer.from(combined.data.screenshot, "base64"));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
61
68
|
```
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
Requesting only HTML (the default) returns the page as a string. Requesting Markdown or a screenshot returns an object with an entry for each requested output, such as `{ html, markdown, screenshot }`, where `screenshot` is a base64-encoded JPEG image. At least one of `html`, `markdown`, or `screenshot` must be `true`.
|
|
71
|
+
|
|
72
|
+
The SDK sends a `GET` request to `https://api.mrscraper.com` with the API token in the `x-api-token` header and every option, including the target `url`, in the query string:
|
|
64
73
|
|
|
65
|
-
|
|
74
|
+
```bash
|
|
75
|
+
curl --get 'https://api.mrscraper.com' \
|
|
76
|
+
--header 'x-api-token: {MRSCRAPER_API_TOKEN}' \
|
|
77
|
+
--data-urlencode 'token={MRSCRAPER_API_TOKEN}' \
|
|
78
|
+
--data-urlencode 'url=https://books.toscrape.com/' \
|
|
79
|
+
--data-urlencode 'html=true' \
|
|
80
|
+
--data-urlencode 'markdown=false' \
|
|
81
|
+
--data-urlencode 'timeout=120' \
|
|
82
|
+
--data-urlencode 'geoCode=US' \
|
|
83
|
+
--data-urlencode 'maxRetries=3'
|
|
84
|
+
```
|
|
66
85
|
|
|
67
86
|
| Option | Default | Description |
|
|
68
87
|
|--------|---------|-------------|
|
|
69
88
|
| `token` | Environment variable | API token override |
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
89
|
+
| `html`, `markdown`, `screenshot` | `true`, `false`, `false` | Outputs to return; combine as needed. `screenshot: true` enables browser rendering. |
|
|
90
|
+
| `timeout` | `120` | Page timeout in seconds, from 1 to 300; the HTTP timeout is 30 seconds longer |
|
|
91
|
+
| `geo_code`, `proxy_country` | `"US"`, unset | Geolocation country code and optional proxy country |
|
|
92
|
+
| `browser_rendering` | unset | `true` to force a browser, `false` to disable it, unset for automatic selection |
|
|
73
93
|
| `super` | `false` | Enable real device routing |
|
|
74
94
|
| `use_proxy`, `proxy` | `true`, unset | Allow a proxy or supply `username:password@host:port` |
|
|
75
|
-
| `home_page` | `false` | Visit the site's root
|
|
76
|
-
| `wait_for_selector` | unset | Wait for a CSS selector |
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `cookie_jar`, `headers` | unset | Cookie configuration and target request headers; `headers` accepts an object or JSON string |
|
|
95
|
+
| `home_page` | `false` | Visit the site's root before the target page (sent as `warmStart`) |
|
|
96
|
+
| `wait_for_selector`, `wait_until` | unset | Wait for a CSS selector or a page lifecycle event such as `"domcontentloaded"` |
|
|
97
|
+
| `block_resources`, `bypass_proxy` | `false`, `false` | Block images, CSS, and fonts, or enable proxy bypass behavior |
|
|
98
|
+
| `cookie_jar`, `headers` | unset | Cookie configuration string and target request headers; `headers` accepts an object or JSON string |
|
|
80
99
|
| `max_retries`, `token_cap` | `3`, unset | Nonnegative integer retry count and optional token budget |
|
|
81
100
|
| `stream` | unset | Request a streamed response, buffered into the normal return value |
|
|
82
|
-
| `discard_token_secret` | `""` | Value for the `x-discard-token-secret`
|
|
101
|
+
| `discard_token_secret` | `""` | Value for the `x-discard-token-secret` request header |
|
|
83
102
|
|
|
84
|
-
Unset
|
|
103
|
+
Unset options use the service defaults. Explicit `false`, `0`, and empty strings are preserved where supported.
|
|
85
104
|
|
|
86
|
-
##
|
|
105
|
+
## Web Search
|
|
87
106
|
|
|
88
|
-
|
|
89
|
-
import { writeFile } from "node:fs/promises";
|
|
90
|
-
import { get_screenshot } from "@mrscraper/sdk";
|
|
91
|
-
|
|
92
|
-
const result = await get_screenshot("https://example.com", {
|
|
93
|
-
full_page: true, // Default; false sends screenshot=true for the viewport.
|
|
94
|
-
token_cap: 30,
|
|
95
|
-
});
|
|
96
|
-
if (Buffer.isBuffer(result.data)) await writeFile("page.png", result.data);
|
|
97
|
-
else console.log(result.data); // The API may also return JSON metadata.
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## JSON and multiple-page extraction
|
|
107
|
+
Search the web for real-time results: website URLs, titles, and descriptions.
|
|
101
108
|
|
|
102
109
|
```typescript
|
|
103
|
-
import {
|
|
104
|
-
|
|
105
|
-
const page = await scraper_json("https://mrscraper.com/pricing", {
|
|
106
|
-
prompt: "Extract all plan names and prices.",
|
|
107
|
-
super: true,
|
|
108
|
-
});
|
|
109
|
-
const listings = await scraper_multiple_page("https://books.toscrape.com", {
|
|
110
|
-
prompt: "Extract each book title and price.",
|
|
111
|
-
max_pages: 3,
|
|
112
|
-
});
|
|
113
|
-
console.log(page.data, listings.data);
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
`ScraperJsonOptions.prompt` defaults to `"Extract all data as complete as possible."`. `ScraperMultiplePageOptions.prompt` defaults to `"Extract all entry data as complete as possible."`, and `max_pages` must be a positive integer. These become `prompt` and `maxPages` in the JSON body.
|
|
117
|
-
|
|
118
|
-
## Sitemap discovery
|
|
110
|
+
import { web_search } from "@mrscraper/sdk";
|
|
119
111
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const result = await scraper_sitemap("https://docs.mrscraper.com", {
|
|
124
|
-
max_depth: 2,
|
|
125
|
-
max_pages: 3,
|
|
126
|
-
limit: 1000,
|
|
127
|
-
include_patterns: String.raw`/products/.*`,
|
|
128
|
-
exclude_patterns: String.raw`/blog/.*`,
|
|
112
|
+
const result = await web_search("e-menessaptieka.lv linkedin", {
|
|
113
|
+
country: "us",
|
|
114
|
+
num_results: 10,
|
|
129
115
|
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
`ScraperSitemapOptions` maps `max_depth`, `max_pages`, `include_patterns`, and `exclude_patterns` to `maxDepth`, `maxPages`, `includePatterns`, and `excludePatterns` in the JSON body. Pattern strings are forwarded unchanged; unset or `null` patterns are omitted. `max_depth` must be a nonnegative integer; `max_pages` and `limit` must be positive integers.
|
|
134
|
-
|
|
135
|
-
## Brand scraping and downloads
|
|
136
|
-
|
|
137
|
-
```typescript
|
|
138
|
-
import { writeFile } from "node:fs/promises";
|
|
139
|
-
import { scrape_brand, get_brand } from "@mrscraper/sdk";
|
|
140
|
-
|
|
141
|
-
const created = await scrape_brand("https://www.brooksrunning.com", { bundle: "clean" });
|
|
142
|
-
console.log(created.data); // Read the job ID from the API response.
|
|
143
|
-
|
|
144
|
-
const jobId = "JOB_ID_FROM_RESPONSE";
|
|
145
|
-
const job = await get_brand(jobId);
|
|
146
|
-
console.log(job.data); // Check job status before downloading.
|
|
147
|
-
|
|
148
|
-
const download = await get_brand(jobId, { output: "bundle" });
|
|
149
|
-
if (Buffer.isBuffer(download.data)) await writeFile("brand.zip", download.data);
|
|
116
|
+
for (const item of result.data.data) {
|
|
117
|
+
console.log(item.rank, item.title, item.url);
|
|
118
|
+
}
|
|
150
119
|
```
|
|
151
120
|
|
|
152
|
-
|
|
121
|
+
The SDK sends this request:
|
|
153
122
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
format: "json",
|
|
165
|
-
});
|
|
166
|
-
console.log(result.data);
|
|
123
|
+
```bash
|
|
124
|
+
curl --location 'https://api.mrscraper.com' \
|
|
125
|
+
--header 'x-api-token: {MRSCRAPER_API_TOKEN}' \
|
|
126
|
+
--header 'Content-Type: application/json' \
|
|
127
|
+
--data '{
|
|
128
|
+
"action": "websearch",
|
|
129
|
+
"query": "e-menessaptieka.lv linkedin",
|
|
130
|
+
"country": "us",
|
|
131
|
+
"numResults": 10
|
|
132
|
+
}'
|
|
167
133
|
```
|
|
168
134
|
|
|
169
|
-
`
|
|
135
|
+
`result.data` is a `WebSearchResponse` with `success`, `message`, and `data`. Each item in `data` is a `WebSearchResult` with `rank`, `title`, `url`, `description`, and `source`.
|
|
170
136
|
|
|
171
137
|
| Option | Default | Description |
|
|
172
138
|
|--------|---------|-------------|
|
|
173
|
-
| `
|
|
139
|
+
| `query` | Required first argument | The search query; must not be empty |
|
|
174
140
|
| `token` | Environment variable | API token override |
|
|
175
|
-
| `
|
|
176
|
-
| `
|
|
177
|
-
| `region`, `language` | unset | Country and language |
|
|
178
|
-
| `page` | unset | One based result page |
|
|
179
|
-
| `render_js` | `false` | Render JavaScript features |
|
|
141
|
+
| `country` | unset | Country code for localized results, such as `"us"`; omitted to use the service default |
|
|
142
|
+
| `num_results` | `10` | Number of results, an integer from 10 to 100 (sent as `numResults`) |
|
|
180
143
|
| `timeout` | `600` | HTTP request timeout in seconds |
|
|
181
144
|
|
|
182
145
|
## Account status
|
|
183
146
|
|
|
147
|
+
Account returns an overview of the account associated with your API token, including user identity, subscription status, token usage, remaining quota, and rate limits. Use it to monitor consumption and check available tokens before running scraping or search jobs.
|
|
148
|
+
|
|
184
149
|
```typescript
|
|
185
150
|
import { account } from "@mrscraper/sdk";
|
|
186
151
|
|
|
@@ -190,8 +155,7 @@ console.log(result.data.token_remaining);
|
|
|
190
155
|
console.log(result.data.user.email);
|
|
191
156
|
```
|
|
192
157
|
|
|
193
|
-
`account`
|
|
194
|
-
with Bearer and `x-api-token` authentication. The timeout defaults to 30 seconds
|
|
158
|
+
`account` checks the account associated with the configured API token. The timeout defaults to 30 seconds
|
|
195
159
|
and must be positive. `data` is an `AccountSummary` with `subscription_status`,
|
|
196
160
|
`enterprise`, `token_usage`, `token_limit`, `token_remaining`, `usage_percent`,
|
|
197
161
|
`rate_limit`, `rate_ttl`, `auto_renew`, `ends_at`, and `user` (`name`, `email`,
|
|
@@ -200,14 +164,14 @@ API keys, billing identifiers, and sensitive response headers are excluded.
|
|
|
200
164
|
|
|
201
165
|
## Errors and types
|
|
202
166
|
|
|
203
|
-
All functions reject with `MrScraperError` for API, authentication, network, and timeout errors. `status` contains the HTTP status for API errors and is `undefined` for network errors. Invalid options throw `TypeError` or `RangeError
|
|
167
|
+
All functions reject with `MrScraperError` for API, authentication, network, and timeout errors. `status` contains the HTTP status for API errors and is `undefined` for network errors. Invalid options throw `TypeError` or `RangeError` before any request is sent.
|
|
204
168
|
|
|
205
169
|
```typescript
|
|
206
|
-
import {
|
|
207
|
-
import type {
|
|
170
|
+
import { scraper_api, MrScraperError } from "@mrscraper/sdk";
|
|
171
|
+
import type { MrScraperResponse, ScraperApiData } from "@mrscraper/sdk";
|
|
208
172
|
|
|
209
173
|
try {
|
|
210
|
-
const result: MrScraperResponse = await
|
|
174
|
+
const result: MrScraperResponse<ScraperApiData> = await scraper_api("https://example.com");
|
|
211
175
|
console.log(result.data);
|
|
212
176
|
} catch (error) {
|
|
213
177
|
if (error instanceof MrScraperError) {
|
|
@@ -226,7 +190,7 @@ npm test
|
|
|
226
190
|
npm run build
|
|
227
191
|
```
|
|
228
192
|
|
|
229
|
-
`npm test` builds the SDK, checks TypeScript usage
|
|
193
|
+
`npm test` builds the SDK, checks TypeScript usage, and runs response-mock and local HTTP contract tests. It does not call the live API or require a token.
|
|
230
194
|
|
|
231
195
|
## Manual tests with a real token
|
|
232
196
|
|
|
@@ -237,78 +201,45 @@ npm run build
|
|
|
237
201
|
export MRSCRAPER_API_TOKEN="YOUR_TOKEN"
|
|
238
202
|
```
|
|
239
203
|
|
|
240
|
-
|
|
204
|
+
The `file.js` helper calls the three public functions against the live API:
|
|
241
205
|
|
|
242
206
|
```bash
|
|
243
|
-
node --
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
207
|
+
node file.js --help
|
|
208
|
+
node file.js # account, scraper_api (HTML), and web_search
|
|
209
|
+
node file.js account
|
|
210
|
+
node file.js scraper_api "https://books.toscrape.com/"
|
|
211
|
+
node file.js scraper_api "https://books.toscrape.com/" '{"markdown":true,"screenshot":true}'
|
|
212
|
+
node file.js web_search "e-menessaptieka.lv linkedin" '{"country":"us","num_results":10}'
|
|
249
213
|
```
|
|
250
214
|
|
|
251
|
-
|
|
215
|
+
Screenshots are saved under `manual-results/`; other responses are previewed. You can also call the built SDK directly:
|
|
252
216
|
|
|
253
217
|
```bash
|
|
254
218
|
node --input-type=module <<'NODE'
|
|
255
|
-
import {
|
|
256
|
-
|
|
257
|
-
const result = await scraper_markdown("https://example.com");
|
|
258
|
-
console.log(result.status_code, result.data);
|
|
259
|
-
NODE
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Start a brand-scraping job:
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
node --input-type=module <<'NODE'
|
|
266
|
-
import { scrape_brand } from "./dist/index.js";
|
|
219
|
+
import { account } from "./dist/index.js";
|
|
267
220
|
|
|
268
|
-
const result = await
|
|
221
|
+
const result = await account();
|
|
269
222
|
console.log(result.status_code, result.data);
|
|
270
223
|
NODE
|
|
271
224
|
```
|
|
272
225
|
|
|
273
|
-
|
|
226
|
+
These commands make live API requests, print the HTTP status and response data, and exit with a nonzero status on errors. To run the other examples from a checkout, replace imports from `@mrscraper/sdk` with `./dist/index.js`.
|
|
274
227
|
|
|
275
228
|
## Publish manually to npm
|
|
276
229
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
Update `package.json` and `package-lock.json` together, run the tests, and preview the package. Run the version command once; skip it if both files already specify `4.0.0`:
|
|
230
|
+
This checkout prepares version **5.0.0**, a major release that removes the 4.x
|
|
231
|
+
format-specific functions. Publishing remains manual. Validate and preview the package:
|
|
280
232
|
|
|
281
233
|
```bash
|
|
282
|
-
npm view @mrscraper/sdk versions --json
|
|
283
|
-
npm version 4.0.0 --no-git-tag-version
|
|
284
234
|
npm ci
|
|
285
235
|
npm test
|
|
236
|
+
npm pack --dry-run
|
|
286
237
|
npm publish --dry-run --access public
|
|
287
238
|
```
|
|
288
239
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
git add README.md package.json package-lock.json \
|
|
295
|
-
src/api.ts src/index.ts \
|
|
296
|
-
tests/api.test.mjs tests/scraping.test.mjs tests/types.test.ts
|
|
297
|
-
git restore --staged -- file.js
|
|
298
|
-
git diff --cached --name-only
|
|
299
|
-
git diff --cached --check
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Confirm that `file.js` does not appear in the staged file list, then commit and push the current branch:
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
git commit -m "feat!: add format-specific scraping services"
|
|
306
|
-
git push -u origin HEAD
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
The uncommitted changes in `file.js` remain on your machine; its previously committed version remains in Git. If the repository uses pull requests, complete its review and merge process before publishing the release.
|
|
310
|
-
|
|
311
|
-
Log in with an npm account that has publishing access to `@mrscraper/sdk`, publish, and verify that `latest` points to `4.0.0`:
|
|
240
|
+
The package includes `dist/`, `README.md`, `LICENSE`, `mrscraper.jpeg`, and
|
|
241
|
+
`package.json`. The `files` list excludes the local `file.js` helper. Commit
|
|
242
|
+
and push the release files, then publish with your npm account:
|
|
312
243
|
|
|
313
244
|
```bash
|
|
314
245
|
npm login
|
|
@@ -318,9 +249,10 @@ npm view @mrscraper/sdk version
|
|
|
318
249
|
npm view @mrscraper/sdk dist-tags --json
|
|
319
250
|
```
|
|
320
251
|
|
|
321
|
-
Complete npm's browser login and two-factor authentication prompts. The
|
|
322
|
-
|
|
323
|
-
|
|
252
|
+
Complete npm's browser login and two-factor authentication prompts. The
|
|
253
|
+
`prepublishOnly` script rebuilds `dist` before publishing. Each version can be
|
|
254
|
+
published only once. For later releases, update `package.json` and
|
|
255
|
+
`package-lock.json` together with a new version before validating and publishing.
|
|
324
256
|
|
|
325
257
|
## License
|
|
326
258
|
|
package/dist/api.d.ts
CHANGED
|
@@ -31,11 +31,17 @@ export interface AccountSummary {
|
|
|
31
31
|
verified: boolean;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
35
|
-
export interface
|
|
34
|
+
/** Options for `scraper_api`. At least one of html, markdown, or screenshot must be true. */
|
|
35
|
+
export interface ScraperApiOptions {
|
|
36
36
|
/** Overrides MRSCRAPER_API_TOKEN for this call. */
|
|
37
37
|
token?: string;
|
|
38
|
-
/**
|
|
38
|
+
/** Return the page HTML. Defaults to true. */
|
|
39
|
+
html?: boolean;
|
|
40
|
+
/** Return the page as Markdown. Defaults to false. */
|
|
41
|
+
markdown?: boolean;
|
|
42
|
+
/** Capture a screenshot. Defaults to false; true also enables browser rendering. */
|
|
43
|
+
screenshot?: boolean;
|
|
44
|
+
/** Page timeout in seconds, from 1 to 300. Defaults to 120. */
|
|
39
45
|
timeout?: number;
|
|
40
46
|
geo_code?: string;
|
|
41
47
|
proxy_country?: string | null;
|
|
@@ -56,74 +62,85 @@ export interface ScraperOptions {
|
|
|
56
62
|
stream?: boolean | null;
|
|
57
63
|
discard_token_secret?: string;
|
|
58
64
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
/**
|
|
66
|
+
* `scraper_api` data: an HTML string when only HTML is requested, otherwise an
|
|
67
|
+
* object with an entry for each requested output (the screenshot is base64).
|
|
68
|
+
*/
|
|
69
|
+
export type ScraperApiData = string | {
|
|
70
|
+
html?: string;
|
|
71
|
+
markdown?: string;
|
|
72
|
+
screenshot?: string;
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
};
|
|
75
|
+
export interface WebSearchOptions {
|
|
76
|
+
/** Overrides MRSCRAPER_API_TOKEN for this call. */
|
|
77
|
+
token?: string;
|
|
78
|
+
/** Country code for localized results, such as "us". Omitted when unset. */
|
|
79
|
+
country?: string | null;
|
|
80
|
+
/** Number of results, an integer from 10 to 100. Defaults to 10. */
|
|
81
|
+
num_results?: number;
|
|
82
|
+
/** HTTP request timeout in seconds. Defaults to 600. */
|
|
83
|
+
timeout?: number;
|
|
62
84
|
}
|
|
63
|
-
export interface
|
|
64
|
-
|
|
65
|
-
|
|
85
|
+
export interface WebSearchResult {
|
|
86
|
+
rank: number;
|
|
87
|
+
title: string;
|
|
88
|
+
url: string;
|
|
89
|
+
description: string;
|
|
90
|
+
source: string;
|
|
66
91
|
}
|
|
67
|
-
export interface
|
|
68
|
-
|
|
92
|
+
export interface WebSearchResponse {
|
|
93
|
+
success: boolean;
|
|
94
|
+
message: string;
|
|
95
|
+
data: WebSearchResult[];
|
|
96
|
+
}
|
|
97
|
+
export declare function requireToken(explicitToken?: string): string;
|
|
98
|
+
export declare function authHeaders(token: string): Record<string, string>;
|
|
99
|
+
export declare function setIfPresent(params: URLSearchParams, key: string, value: unknown): void;
|
|
100
|
+
export declare function request<T>(method: "GET" | "POST", url: string, body: Record<string, unknown> | undefined, headers: Record<string, string>, timeoutSeconds: number, token: string): Promise<MrScraperResponse<T>>;
|
|
101
|
+
/**
|
|
102
|
+
* Return account identity, subscription, quota, and rate limits for the API
|
|
103
|
+
* token. API tokens, billing identifiers, and sensitive headers are excluded.
|
|
104
|
+
*/
|
|
105
|
+
export declare function account(options?: AccountOptions): Promise<MrScraperResponse<AccountSummary>>;
|
|
106
|
+
/** Shared page, browser, proxy, and retry controls without output flags. */
|
|
107
|
+
export type ScrapeOptions = Omit<ScraperApiOptions, "html" | "markdown" | "screenshot">;
|
|
108
|
+
/** Output, method, and agent selection made by the SDK rather than by caller options. */
|
|
109
|
+
export interface ScrapeRequest {
|
|
110
|
+
method?: "GET" | "POST";
|
|
111
|
+
html?: boolean;
|
|
112
|
+
markdown?: boolean;
|
|
113
|
+
screenshot?: true | "full";
|
|
114
|
+
agent?: "general" | "listing" | "map";
|
|
69
115
|
prompt?: string;
|
|
70
|
-
/** Positive integer, defaults to 3. */
|
|
71
116
|
max_pages?: number;
|
|
72
|
-
}
|
|
73
|
-
export interface ScraperSitemapOptions extends ScraperOptions {
|
|
74
|
-
/** Nonnegative integer, defaults to 2. */
|
|
75
117
|
max_depth?: number;
|
|
76
|
-
/** Positive integer, defaults to 3. */
|
|
77
|
-
max_pages?: number;
|
|
78
|
-
/** Positive integer, defaults to 1000. */
|
|
79
118
|
limit?: number;
|
|
80
|
-
/** Pattern strings are forwarded unchanged; unset patterns are omitted. */
|
|
81
119
|
include_patterns?: string | null;
|
|
82
120
|
exclude_patterns?: string | null;
|
|
121
|
+
action?: "brand-scraping";
|
|
122
|
+
bundle?: "clean" | "full" | "none";
|
|
83
123
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/** HTTP request timeout in seconds. */
|
|
107
|
-
timeout?: number;
|
|
108
|
-
}
|
|
109
|
-
/** Check account identity, subscription, quota, and rate limits. */
|
|
110
|
-
export declare function account(options?: AccountOptions): Promise<MrScraperResponse<AccountSummary>>;
|
|
111
|
-
/** Fetch HTML. Only html=true is sent; other output flags are omitted. */
|
|
112
|
-
export declare function scraper_html<T = unknown>(url: string, options?: ScraperOptions): Promise<MrScraperResponse<T>>;
|
|
113
|
-
/** Fetch Markdown. Only markdown=true is sent; other output flags are omitted. */
|
|
114
|
-
export declare function scraper_markdown<T = unknown>(url: string, options?: ScraperOptions): Promise<MrScraperResponse<T>>;
|
|
115
|
-
/** Capture a screenshot using GET. Images are returned as Buffer in data. */
|
|
116
|
-
export declare function get_screenshot<T = unknown>(url: string, options?: ScreenshotOptions): Promise<MrScraperResponse<T>>;
|
|
117
|
-
/** Extract structured JSON with the general agent and html=true. */
|
|
118
|
-
export declare function scraper_json<T = unknown>(url: string, options?: ScraperJsonOptions): Promise<MrScraperResponse<T>>;
|
|
119
|
-
/** Extract entries across multiple pages using the listing agent. */
|
|
120
|
-
export declare function scraper_multiple_page<T = unknown>(url: string, options?: ScraperMultiplePageOptions): Promise<MrScraperResponse<T>>;
|
|
121
|
-
/** Discover URLs with the map agent; pattern strings are preserved unchanged. */
|
|
122
|
-
export declare function scraper_sitemap<T = unknown>(url: string, options?: ScraperSitemapOptions): Promise<MrScraperResponse<T>>;
|
|
123
|
-
/** Start a brand-scraping job; use the returned job ID with get_brand. */
|
|
124
|
-
export declare function scrape_brand<T = unknown>(url: string, options?: ScrapeBrandOptions): Promise<MrScraperResponse<T>>;
|
|
125
|
-
/** Read a brand job or download HTML, a ZIP bundle, or a screenshot. */
|
|
126
|
-
export declare function get_brand<T = unknown>(job_id: string, options?: GetBrandOptions): Promise<MrScraperResponse<T>>;
|
|
127
|
-
/** Fetch Google search results. Accepts query text or a Google search URL. */
|
|
128
|
-
export declare function web_search<T = unknown>(url: string, options?: WebSearchOptions): Promise<MrScraperResponse<T>>;
|
|
124
|
+
/**
|
|
125
|
+
* Build and send a scraping request for `scraper_api` and the internal
|
|
126
|
+
* format-specific helpers. GET and brand requests carry the URL and retry
|
|
127
|
+
* controls in the query; other POSTs carry them in the JSON body.
|
|
128
|
+
*/
|
|
129
|
+
export declare function scrape<T>(url: string, options: ScrapeOptions, selected: ScrapeRequest): Promise<MrScraperResponse<T>>;
|
|
130
|
+
/**
|
|
131
|
+
* Fetch a public web page as rendered HTML, Markdown, screenshot, or a combination.
|
|
132
|
+
*
|
|
133
|
+
* Sends a GET request; the target URL, page options, and retry controls are all
|
|
134
|
+
* query parameters. HTML alone returns a string; any combination with Markdown
|
|
135
|
+
* or a screenshot returns an object such as `{ html, markdown, screenshot }`,
|
|
136
|
+
* where the screenshot is base64. At least one output must be true.
|
|
137
|
+
*/
|
|
138
|
+
export declare function scraper_api<T = ScraperApiData>(url: string, options?: ScraperApiOptions): Promise<MrScraperResponse<T>>;
|
|
139
|
+
/**
|
|
140
|
+
* Search the web for real-time results: website URLs, titles, and descriptions.
|
|
141
|
+
*
|
|
142
|
+
* Sends `{ action: "websearch", query, country, numResults }` as a JSON POST
|
|
143
|
+
* to the MrScraper API. `country` is omitted when unset.
|
|
144
|
+
*/
|
|
145
|
+
export declare function web_search<T = WebSearchResponse>(query: string, options?: WebSearchOptions): Promise<MrScraperResponse<T>>;
|
|
129
146
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;gBAExB,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAK7C;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE;QACJ,IAAI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,MAAM,EACb,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAuB/B"}
|
package/dist/api.js
CHANGED
|
@@ -7,14 +7,19 @@ export class MrScraperError extends Error {
|
|
|
7
7
|
this.status = status;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
const API_URL = "https://api.mrscraper.com";
|
|
11
|
+
const MIN_SEARCH_RESULTS = 10;
|
|
12
|
+
const MAX_SEARCH_RESULTS = 100;
|
|
13
|
+
// The helpers below are exported for the SDK's internal modules only; the
|
|
14
|
+
// package entry point (index.ts) does not re-export them.
|
|
15
|
+
export function requireToken(explicitToken) {
|
|
11
16
|
const token = explicitToken || process.env.MRSCRAPER_API_TOKEN || "";
|
|
12
17
|
if (!token.trim()) {
|
|
13
18
|
throw new MrScraperError("API token is not set. Pass token in the options or set MRSCRAPER_API_TOKEN. Get your token at https://app.mrscraper.com.");
|
|
14
19
|
}
|
|
15
20
|
return token;
|
|
16
21
|
}
|
|
17
|
-
function authHeaders(token) {
|
|
22
|
+
export function authHeaders(token) {
|
|
18
23
|
return {
|
|
19
24
|
"Content-Type": "application/json",
|
|
20
25
|
accept: "application/json",
|
|
@@ -22,12 +27,12 @@ function authHeaders(token) {
|
|
|
22
27
|
"x-api-token": token,
|
|
23
28
|
};
|
|
24
29
|
}
|
|
25
|
-
function setIfPresent(params, key, value) {
|
|
30
|
+
export function setIfPresent(params, key, value) {
|
|
26
31
|
if (value !== null && value !== undefined) {
|
|
27
32
|
params.set(key, typeof value === "boolean" ? String(value) : String(value));
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
|
-
async function request(method, url, body, headers, timeoutSeconds, token) {
|
|
35
|
+
export async function request(method, url, body, headers, timeoutSeconds, token) {
|
|
31
36
|
const controller = new AbortController();
|
|
32
37
|
const timer = setTimeout(() => controller.abort(), timeoutSeconds * 1000);
|
|
33
38
|
try {
|
|
@@ -74,7 +79,10 @@ async function request(method, url, body, headers, timeoutSeconds, token) {
|
|
|
74
79
|
clearTimeout(timer);
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Return account identity, subscription, quota, and rate limits for the API
|
|
84
|
+
* token. API tokens, billing identifiers, and sensitive headers are excluded.
|
|
85
|
+
*/
|
|
78
86
|
export async function account(options = {}) {
|
|
79
87
|
const token = requireToken(options.token);
|
|
80
88
|
const timeout = options.timeout ?? 30;
|
|
@@ -124,8 +132,12 @@ function validateInteger(name, value, minimum) {
|
|
|
124
132
|
throw new RangeError(`${name} must be an integer greater than or equal to ${minimum}`);
|
|
125
133
|
}
|
|
126
134
|
}
|
|
127
|
-
|
|
128
|
-
|
|
135
|
+
/**
|
|
136
|
+
* Build and send a scraping request for `scraper_api` and the internal
|
|
137
|
+
* format-specific helpers. GET and brand requests carry the URL and retry
|
|
138
|
+
* controls in the query; other POSTs carry them in the JSON body.
|
|
139
|
+
*/
|
|
140
|
+
export async function scrape(url, options, selected) {
|
|
129
141
|
const token = requireToken(options.token);
|
|
130
142
|
const timeout = options.timeout ?? 120;
|
|
131
143
|
const maxRetries = options.max_retries ?? 3;
|
|
@@ -201,116 +213,59 @@ async function scraper_api(url, options, selected) {
|
|
|
201
213
|
if (value != null)
|
|
202
214
|
body[name] = value;
|
|
203
215
|
}
|
|
204
|
-
return request(method,
|
|
216
|
+
return request(method, `${API_URL}/?${params}`, method === "GET" ? undefined : body, headers, timeout + 30, token);
|
|
205
217
|
}
|
|
206
|
-
/**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return scraper_api(url, {
|
|
220
|
-
...options,
|
|
221
|
-
timeout: options.timeout ?? 300,
|
|
222
|
-
wait_until: options.wait_until === undefined ? "domcontentloaded" : options.wait_until,
|
|
223
|
-
}, { method: "GET", screenshot: fullPage ? "full" : true });
|
|
224
|
-
}
|
|
225
|
-
/** Extract structured JSON with the general agent and html=true. */
|
|
226
|
-
export async function scraper_json(url, options = {}) {
|
|
227
|
-
return scraper_api(url, options, {
|
|
228
|
-
html: true, agent: "general", prompt: options.prompt ?? "Extract all data as complete as possible.",
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
/** Extract entries across multiple pages using the listing agent. */
|
|
232
|
-
export async function scraper_multiple_page(url, options = {}) {
|
|
233
|
-
return scraper_api(url, options, {
|
|
234
|
-
agent: "listing", prompt: options.prompt ?? "Extract all entry data as complete as possible.",
|
|
235
|
-
max_pages: options.max_pages ?? 3,
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
/** Discover URLs with the map agent; pattern strings are preserved unchanged. */
|
|
239
|
-
export async function scraper_sitemap(url, options = {}) {
|
|
240
|
-
return scraper_api(url, options, {
|
|
241
|
-
agent: "map", max_depth: options.max_depth ?? 2, max_pages: options.max_pages ?? 3,
|
|
242
|
-
limit: options.limit ?? 1000, include_patterns: options.include_patterns,
|
|
243
|
-
exclude_patterns: options.exclude_patterns,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
/** Start a brand-scraping job; use the returned job ID with get_brand. */
|
|
247
|
-
export async function scrape_brand(url, options = {}) {
|
|
248
|
-
return scraper_api(url, options, { action: "brand-scraping", bundle: options.bundle ?? "clean" });
|
|
249
|
-
}
|
|
250
|
-
/** Read a brand job or download HTML, a ZIP bundle, or a screenshot. */
|
|
251
|
-
export async function get_brand(job_id, options = {}) {
|
|
252
|
-
const token = requireToken(options.token);
|
|
253
|
-
if (typeof job_id !== "string" || !job_id.trim())
|
|
254
|
-
throw new TypeError("job_id must be a non-empty string");
|
|
255
|
-
if (options.output != null && !["html", "bundle", "screenshot", "screenshot_full"].includes(options.output)) {
|
|
256
|
-
throw new TypeError("output must be 'html', 'bundle', 'screenshot', or 'screenshot_full'");
|
|
218
|
+
/**
|
|
219
|
+
* Fetch a public web page as rendered HTML, Markdown, screenshot, or a combination.
|
|
220
|
+
*
|
|
221
|
+
* Sends a GET request; the target URL, page options, and retry controls are all
|
|
222
|
+
* query parameters. HTML alone returns a string; any combination with Markdown
|
|
223
|
+
* or a screenshot returns an object such as `{ html, markdown, screenshot }`,
|
|
224
|
+
* where the screenshot is base64. At least one output must be true.
|
|
225
|
+
*/
|
|
226
|
+
export async function scraper_api(url, options = {}) {
|
|
227
|
+
const { html = true, markdown = false, screenshot = false, ...rest } = options;
|
|
228
|
+
for (const [name, value] of [["html", html], ["markdown", markdown], ["screenshot", screenshot]]) {
|
|
229
|
+
if (typeof value !== "boolean")
|
|
230
|
+
throw new TypeError(`${name} must be a boolean`);
|
|
257
231
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
throw new RangeError("timeout must be greater than 0 seconds");
|
|
261
|
-
const params = new URLSearchParams({ id: job_id });
|
|
262
|
-
setIfPresent(params, "output", options.output);
|
|
263
|
-
return request("GET", `https://api.mrscraper.com/neo/brand?${params}`, undefined, authHeaders(token), timeout, token);
|
|
264
|
-
}
|
|
265
|
-
function normalizeSerpInput(input) {
|
|
266
|
-
const value = input.trim();
|
|
267
|
-
if (!value)
|
|
268
|
-
throw new TypeError("A Google search query or URL is required");
|
|
269
|
-
if (!/^https?:\/\//i.test(value)) {
|
|
270
|
-
return { query: value, region: null, language: null, page: null };
|
|
232
|
+
if (!html && !markdown && !screenshot) {
|
|
233
|
+
throw new TypeError("At least one of html, markdown, or screenshot must be true");
|
|
271
234
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
return {
|
|
279
|
-
query,
|
|
280
|
-
region: parsed.searchParams.get("gl"),
|
|
281
|
-
language: parsed.searchParams.get("hl"),
|
|
282
|
-
page: start > 0 ? Math.floor(start / 10) + 1 : null,
|
|
283
|
-
};
|
|
235
|
+
return scrape(url, rest, {
|
|
236
|
+
method: "GET",
|
|
237
|
+
html,
|
|
238
|
+
markdown,
|
|
239
|
+
screenshot: screenshot ? true : undefined,
|
|
240
|
+
});
|
|
284
241
|
}
|
|
285
|
-
/**
|
|
286
|
-
|
|
242
|
+
/**
|
|
243
|
+
* Search the web for real-time results: website URLs, titles, and descriptions.
|
|
244
|
+
*
|
|
245
|
+
* Sends `{ action: "websearch", query, country, numResults }` as a JSON POST
|
|
246
|
+
* to the MrScraper API. `country` is omitted when unset.
|
|
247
|
+
*/
|
|
248
|
+
export async function web_search(query, options = {}) {
|
|
287
249
|
const token = requireToken(options.token);
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
throw new TypeError("format must be 'json' or 'html'");
|
|
250
|
+
if (typeof query !== "string" || !query.trim()) {
|
|
251
|
+
throw new TypeError("A search query is required");
|
|
291
252
|
}
|
|
292
|
-
|
|
293
|
-
|
|
253
|
+
const country = options.country;
|
|
254
|
+
if (country != null && (typeof country !== "string" || !country.trim())) {
|
|
255
|
+
throw new TypeError("country must be a non-empty string");
|
|
256
|
+
}
|
|
257
|
+
const numResults = options.num_results ?? MIN_SEARCH_RESULTS;
|
|
258
|
+
if (!Number.isInteger(numResults) || numResults < MIN_SEARCH_RESULTS || numResults > MAX_SEARCH_RESULTS) {
|
|
259
|
+
throw new RangeError(`num_results must be an integer from ${MIN_SEARCH_RESULTS} to ${MAX_SEARCH_RESULTS}`);
|
|
294
260
|
}
|
|
295
261
|
const timeout = options.timeout ?? 600;
|
|
296
262
|
if (!Number.isFinite(timeout) || timeout <= 0) {
|
|
297
263
|
throw new RangeError("timeout must be greater than 0 seconds");
|
|
298
264
|
}
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
};
|
|
305
|
-
const region = options.region || normalized.region;
|
|
306
|
-
const language = options.language || normalized.language;
|
|
307
|
-
const page = options.page || normalized.page;
|
|
308
|
-
if (region != null)
|
|
309
|
-
body.region = region;
|
|
310
|
-
if (language != null)
|
|
311
|
-
body.language = language;
|
|
312
|
-
if (page != null)
|
|
313
|
-
body.page = page;
|
|
314
|
-
return request("POST", "https://sync.scraper.mrscraper.com/api/google/serp/v2/sync", body, authHeaders(token), timeout, token);
|
|
265
|
+
const body = { action: "websearch", query: query.trim() };
|
|
266
|
+
if (country != null)
|
|
267
|
+
body.country = country.trim();
|
|
268
|
+
body.numResults = numResults;
|
|
269
|
+
return request("POST", API_URL, body, authHeaders(token), timeout, token);
|
|
315
270
|
}
|
|
316
271
|
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,OAAO,cAAe,SAAQ,KAAK;IAC9B,MAAM,CAAqB;IAEpC,YAAY,OAAe,EAAE,MAAe;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAqHD,SAAS,YAAY,CAAC,aAAsB;IAC1C,MAAM,KAAK,GAAG,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE,CAAC;IACrE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAClB,MAAM,IAAI,cAAc,CACtB,0HAA0H,CAC3H,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO;QACL,cAAc,EAAE,kBAAkB;QAClC,MAAM,EAAE,kBAAkB;QAC1B,aAAa,EAAE,UAAU,KAAK,EAAE;QAChC,aAAa,EAAE,KAAK;KACrB,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,MAAuB,EAAE,GAAW,EAAE,KAAc;IACxE,IAAI,KAAK,KAAK,IAAI,IA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
export { MrScraperError, account,
|
|
2
|
-
export type { AccountOptions, AccountSummary,
|
|
1
|
+
export { MrScraperError, account, scraper_api, web_search } from "./api.js";
|
|
2
|
+
export type { AccountOptions, AccountSummary, ScraperApiOptions, ScraperApiData, WebSearchOptions, WebSearchResult, WebSearchResponse, MrScraperResponse, } from "./api.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC5E,YAAY,EACV,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EACjE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,GACxE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MrScraperError, account,
|
|
1
|
+
export { MrScraperError, account, scraper_api, web_search } from "./api.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { MrScraperResponse, ScrapeOptions } from "./api.js";
|
|
2
|
+
/** Shared page, browser, proxy, and retry controls. Output is selected by the function. */
|
|
3
|
+
export type ScraperOptions = ScrapeOptions;
|
|
4
|
+
export interface ScreenshotOptions extends Omit<ScraperOptions, "browser_rendering"> {
|
|
5
|
+
/** Defaults to true (screenshot=full); false captures the viewport. */
|
|
6
|
+
full_page?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ScraperJsonOptions extends ScraperOptions {
|
|
9
|
+
/** Defaults to "Extract all data as complete as possible." */
|
|
10
|
+
prompt?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ScraperMultiplePageOptions extends ScraperOptions {
|
|
13
|
+
/** Defaults to "Extract all entry data as complete as possible." */
|
|
14
|
+
prompt?: string;
|
|
15
|
+
/** Positive integer, defaults to 3. */
|
|
16
|
+
max_pages?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ScraperSitemapOptions extends ScraperOptions {
|
|
19
|
+
/** Nonnegative integer, defaults to 2. */
|
|
20
|
+
max_depth?: number;
|
|
21
|
+
/** Positive integer, defaults to 3. */
|
|
22
|
+
max_pages?: number;
|
|
23
|
+
/** Positive integer, defaults to 1000. */
|
|
24
|
+
limit?: number;
|
|
25
|
+
/** Pattern strings are forwarded unchanged; unset patterns are omitted. */
|
|
26
|
+
include_patterns?: string | null;
|
|
27
|
+
exclude_patterns?: string | null;
|
|
28
|
+
}
|
|
29
|
+
export type BrandBundle = "clean" | "full" | "none";
|
|
30
|
+
export type BrandOutput = "html" | "bundle" | "screenshot" | "screenshot_full";
|
|
31
|
+
export interface ScrapeBrandOptions extends ScraperOptions {
|
|
32
|
+
/** Defaults to clean. */
|
|
33
|
+
bundle?: BrandBundle;
|
|
34
|
+
}
|
|
35
|
+
export interface GetBrandOptions {
|
|
36
|
+
token?: string;
|
|
37
|
+
output?: BrandOutput | null;
|
|
38
|
+
/** HTTP timeout in seconds, defaults to 600. */
|
|
39
|
+
timeout?: number;
|
|
40
|
+
}
|
|
41
|
+
/** Fetch HTML. Only html=true is sent; other output flags are omitted. */
|
|
42
|
+
export declare function scraper_html<T = unknown>(url: string, options?: ScraperOptions): Promise<MrScraperResponse<T>>;
|
|
43
|
+
/** Fetch Markdown. Only markdown=true is sent; other output flags are omitted. */
|
|
44
|
+
export declare function scraper_markdown<T = unknown>(url: string, options?: ScraperOptions): Promise<MrScraperResponse<T>>;
|
|
45
|
+
/** Capture a screenshot using GET. Images are returned as Buffer in data. */
|
|
46
|
+
export declare function get_screenshot<T = unknown>(url: string, options?: ScreenshotOptions): Promise<MrScraperResponse<T>>;
|
|
47
|
+
/** Extract structured JSON with the general agent and html=true. */
|
|
48
|
+
export declare function scraper_json<T = unknown>(url: string, options?: ScraperJsonOptions): Promise<MrScraperResponse<T>>;
|
|
49
|
+
/** Extract entries across multiple pages using the listing agent. */
|
|
50
|
+
export declare function scraper_multiple_page<T = unknown>(url: string, options?: ScraperMultiplePageOptions): Promise<MrScraperResponse<T>>;
|
|
51
|
+
/** Discover URLs with the map agent; pattern strings are preserved unchanged. */
|
|
52
|
+
export declare function scraper_sitemap<T = unknown>(url: string, options?: ScraperSitemapOptions): Promise<MrScraperResponse<T>>;
|
|
53
|
+
/** Start a brand-scraping job; use the returned job ID with get_brand. */
|
|
54
|
+
export declare function scrape_brand<T = unknown>(url: string, options?: ScrapeBrandOptions): Promise<MrScraperResponse<T>>;
|
|
55
|
+
/** Read a brand job or download HTML, a ZIP bundle, or a screenshot. */
|
|
56
|
+
export declare function get_brand<T = unknown>(job_id: string, options?: GetBrandOptions): Promise<MrScraperResponse<T>>;
|
|
57
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjE,2FAA2F;AAC3F,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC;AAE3C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,EAAE,mBAAmB,CAAC;IA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
2
|
+
// the package entry point, and the package `exports` map blocks deep imports.
|
|
3
|
+
// Public callers use `scraper_api`, `web_search`, and `account` instead.
|
|
4
|
+
import { authHeaders, request, requireToken, scrape, setIfPresent } from "./api.js";
|
|
5
|
+
/** Fetch HTML. Only html=true is sent; other output flags are omitted. */
|
|
6
|
+
export async function scraper_html(url, options = {}) {
|
|
7
|
+
return scrape(url, options, { html: true });
|
|
8
|
+
}
|
|
9
|
+
/** Fetch Markdown. Only markdown=true is sent; other output flags are omitted. */
|
|
10
|
+
export async function scraper_markdown(url, options = {}) {
|
|
11
|
+
return scrape(url, options, { markdown: true });
|
|
12
|
+
}
|
|
13
|
+
/** Capture a screenshot using GET. Images are returned as Buffer in data. */
|
|
14
|
+
export async function get_screenshot(url, options = {}) {
|
|
15
|
+
const fullPage = options.full_page === undefined ? true : options.full_page;
|
|
16
|
+
if (typeof fullPage !== "boolean")
|
|
17
|
+
throw new TypeError("full_page must be a boolean");
|
|
18
|
+
return scrape(url, {
|
|
19
|
+
...options,
|
|
20
|
+
timeout: options.timeout ?? 300,
|
|
21
|
+
wait_until: options.wait_until === undefined ? "domcontentloaded" : options.wait_until,
|
|
22
|
+
}, { method: "GET", screenshot: fullPage ? "full" : true });
|
|
23
|
+
}
|
|
24
|
+
/** Extract structured JSON with the general agent and html=true. */
|
|
25
|
+
export async function scraper_json(url, options = {}) {
|
|
26
|
+
return scrape(url, options, {
|
|
27
|
+
html: true, agent: "general", prompt: options.prompt ?? "Extract all data as complete as possible.",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** Extract entries across multiple pages using the listing agent. */
|
|
31
|
+
export async function scraper_multiple_page(url, options = {}) {
|
|
32
|
+
return scrape(url, options, {
|
|
33
|
+
agent: "listing", prompt: options.prompt ?? "Extract all entry data as complete as possible.",
|
|
34
|
+
max_pages: options.max_pages ?? 3,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** Discover URLs with the map agent; pattern strings are preserved unchanged. */
|
|
38
|
+
export async function scraper_sitemap(url, options = {}) {
|
|
39
|
+
return scrape(url, options, {
|
|
40
|
+
agent: "map", max_depth: options.max_depth ?? 2, max_pages: options.max_pages ?? 3,
|
|
41
|
+
limit: options.limit ?? 1000, include_patterns: options.include_patterns,
|
|
42
|
+
exclude_patterns: options.exclude_patterns,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** Start a brand-scraping job; use the returned job ID with get_brand. */
|
|
46
|
+
export async function scrape_brand(url, options = {}) {
|
|
47
|
+
return scrape(url, options, { action: "brand-scraping", bundle: options.bundle ?? "clean" });
|
|
48
|
+
}
|
|
49
|
+
/** Read a brand job or download HTML, a ZIP bundle, or a screenshot. */
|
|
50
|
+
export async function get_brand(job_id, options = {}) {
|
|
51
|
+
const token = requireToken(options.token);
|
|
52
|
+
if (typeof job_id !== "string" || !job_id.trim())
|
|
53
|
+
throw new TypeError("job_id must be a non-empty string");
|
|
54
|
+
if (options.output != null && !["html", "bundle", "screenshot", "screenshot_full"].includes(options.output)) {
|
|
55
|
+
throw new TypeError("output must be 'html', 'bundle', 'screenshot', or 'screenshot_full'");
|
|
56
|
+
}
|
|
57
|
+
const timeout = options.timeout ?? 600;
|
|
58
|
+
if (!Number.isFinite(timeout) || timeout <= 0)
|
|
59
|
+
throw new RangeError("timeout must be greater than 0 seconds");
|
|
60
|
+
const params = new URLSearchParams({ id: job_id });
|
|
61
|
+
setIfPresent(params, "output", options.output);
|
|
62
|
+
return request("GET", `https://api.mrscraper.com/neo/brand?${params}`, undefined, authHeaders(token), timeout, token);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,yEAAyE;AACzE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MA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M,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC3G,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5G,MAAM,IAAI,SAAS,CAAC,qEAAqE,CAAC,CAAC;IAC7F,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;IAC9G,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,OAAO,OAAO,CAAI,KAAK,EAAE,uCAAuC,MAAM,EAAE,EACtE,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrscraper/sdk",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Official Node.js SDK for MrScraper HTML, Markdown, screenshots,
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "Official Node.js SDK for the MrScraper scraper API (HTML, Markdown, screenshots), web search, and account status.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|