You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(js): align SDK docs with scrapegraph-js 2.1.0 type rename (#53)
Upstream PR ScrapeGraphAI/scrapegraph-js#17 drops the `Api` prefix
from all exported TypeScript types and Zod schemas (only `ApiResult<T>`
keeps it) and renames monitor `*Input`/`*Params` to `*Request`. Runtime
surface is unchanged.
- sdks/javascript.mdx: note the 2.1.0 type/schema rename, bump version
requirement, rename `FormatEntry[]` -> `FormatConfig[]` in the
scrape and crawl parameter tables.
- services/{scrape,extract,search,crawl,monitor}.mdx +
transition-from-v1-to-v2.mdx: bump `scrapegraph-js` version pin
from >= 2.0.1 to >= 2.1.0.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: sdks/javascript.mdx
+24-20Lines changed: 24 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,18 @@ icon: "js"
20
20
</CardGroup>
21
21
22
22
<Note>
23
-
These docs cover **`scrapegraph-js` ≥ 2.0.1**. The v2 SDK is **ESM-only** and requires **Node ≥ 22**. Earlier `0.x`/`1.x` releases expose a different, deprecated API.
23
+
These docs cover **`scrapegraph-js` ≥ 2.1.0**. The v2 SDK is **ESM-only** and requires **Node ≥ 22**. Earlier `0.x`/`1.x` releases expose a different, deprecated API.
24
24
</Note>
25
25
26
+
<Warning>
27
+
**Breaking in 2.1.0 (types only):** all exported TypeScript types and Zod schemas dropped the `Api` prefix and now match `scrapegraph-py` 1:1 (`ApiScrapeRequest` → `ScrapeRequest`, `ApiFetchConfig` → `FetchConfig`, `apiScrapeRequestSchema` → `scrapeRequestSchema`, etc.). Monitor input types are also renamed: `ApiMonitorCreateInput` → `MonitorCreateRequest`, `ApiMonitorUpdateInput` → `MonitorUpdateRequest`, `ApiMonitorActivityParams` → `MonitorActivityRequest`. `ApiResult<T>` is the only type that keeps the prefix. Runtime JS code is unchanged — only TypeScript consumers need to rename imports.
28
+
</Warning>
29
+
26
30
## Installation
27
31
28
32
```bash
29
33
# npm
30
-
npm i scrapegraph-js@latest # pins a version >= 2.0.1
34
+
npm i scrapegraph-js@latest # pins a version >= 2.1.0
31
35
32
36
# pnpm
33
37
pnpm add scrapegraph-js@latest
@@ -117,12 +121,12 @@ const res = await sgai.scrape({
0 commit comments