Skip to content

docs(js): align SDK docs with scrapegraph-js 2.1.0 type rename#53

Merged
VinciGit00 merged 1 commit intomainfrom
docs/js-sdk-2.1.0-type-rename
Apr 22, 2026
Merged

docs(js): align SDK docs with scrapegraph-js 2.1.0 type rename#53
VinciGit00 merged 1 commit intomainfrom
docs/js-sdk-2.1.0-type-rename

Conversation

@VinciGit00
Copy link
Copy Markdown
Member

@VinciGit00 VinciGit00 commented Apr 22, 2026

Summary

  • Mirrors the breaking TypeScript rename in scrapegraph-js#17 (v2.1.0). All exported types and Zod schemas drop the Api prefix; ApiResult<T> is the only type that keeps it. Monitor input types become MonitorCreateRequest / MonitorUpdateRequest / MonitorActivityRequest.
  • Updates sdks/javascript.mdx: adds a 2.1.0 breaking-change callout, renames FormatEntry[] β†’ FormatConfig[] in the scrape and crawl parameter tables, and bumps the version pin.
  • Bumps scrapegraph-js version pins >= 2.0.1 β†’ >= 2.1.0 across services/{scrape,extract,search,crawl,monitor}.mdx and transition-from-v1-to-v2.mdx.
  • Runtime JS remains unchanged, so all code snippets keep working as-is.

Validation

Endpoint extract tested against 5 live websites with scrapegraph-js@^2.1.0 β€” 5/5 returned status=success. Per-URL results will be posted as a PR comment. API key supplied by the user at PR creation time; not stored, logged, or echoed.

Test plan

  • Mintlify renders the 2.1.0 callout and updated tables correctly
  • FormatConfig is the type name users see when they Ctrl+click into the SDK
  • All five services/*.mdx pages show the new version pin
  • transition-from-v1-to-v2 guide mentions 2.1.0 as the upgrade target

πŸ€– Generated with Claude Code

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>
@VinciGit00
Copy link
Copy Markdown
Member Author

Endpoint validation β€” extract (5/5 passed)

Run with scrapegraph-js@^2.1.0 (installed fresh from npm, confirmed the new prefix-free exports land at runtime). API key supplied by the user at PR time; not stored, logged, or echoed. Key names only β€” response payloads omitted.

[extract 1/5] https://example.com          -> status=success elapsedMs=497  keys=["page_title","main_heading"]
[extract 2/5] https://scrapegraphai.com    -> status=success elapsedMs=1423 keys=["answer","description"]
[extract 3/5] https://www.iana.org/        -> status=success elapsedMs=1321 keys=["main_purpose"]
[extract 4/5] https://example.org          -> status=success elapsedMs=331  keys=["title","description"]
[extract 5/5] https://httpbin.org/html     -> status=success elapsedMs=1191 keys=["summary"]

Confirms the renamed v2.1.0 surface (ScrapeGraphAI() + sgai.extract({ url, prompt })) works end-to-end against the live v2 API.

@VinciGit00 VinciGit00 merged commit ed78c26 into main Apr 22, 2026
2 checks passed
@VinciGit00 VinciGit00 deleted the docs/js-sdk-2.1.0-type-rename branch April 22, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant