feat: add scrapegraph integration #10307
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
ScrapeGraph AI is an AI-powered web scraping service that provides multiple extraction methods including smart scraping, search scraping, markdown conversion, and multi-page crawling. This integration adds comprehensive documentation and examples for the
ai-sdk-scrapegraphai-toolspackage, enabling developers to build intelligent agents that can gather, analyze, and act on web data automatically using the AI SDK.This addresses the need for:
Following the PR #10189 discussion, the ScrapeGraph team published the tools as an independent npm package (
ai-sdk-scrapegraphai-tools), and this PR adds the necessary documentation and examples to the AI SDK repository.Summary
This PR adds comprehensive documentation and examples for ScrapeGraph AI tools integration:
Documentation Added
Provider Documentation (
content/providers/03-community-providers/80-scrapegraph.mdx)Cookbook Recipe (
content/cookbook/05-node/57-web-scraping-scrapegraph-agent.mdx)Examples Added
Created 7 working examples in
examples/ai-core/src/generate-text/:scrapegraph-smart-scraper.ts- AI-powered data extractionscrapegraph-search-scraper.ts- Multi-source web searchscrapegraph-markdownify.ts- HTML to Markdown conversionscrapegraph-multiple-tools.ts- Using multiple tools togetherscrapegraph-product-research.ts- Product comparison agentscrapegraph-crawl-docs.ts- Multi-page documentation crawlerscrapegraph-credits-check.ts- API health and credits monitoringAdditional Files
examples/scrapegraph-examples/README.md- Comprehensive guide for running examplesexamples/ai-core/package.jsonto includeai-sdk-scrapegraphai-toolsdependencyManual Verification
Documentation Verification
Example Verification
examples/ai-core/src/generate-text/run()helper consistent with other examplespackage.jsonTesting Instructions
To manually test the examples (requires API keys):
Checklist
pnpm changesetin the project root)Note: Changeset may not be needed as this is documentation/examples only, not a package change. Please advise if needed.
Future Work
Related Issues
This PR provides documentation for the
ai-sdk-scrapegraphai-toolspackage following the discussion in PR #10189, where the maintainers suggested publishing the tools as an independent package and adding documentation/examples to the main repository.The tools package is now published at: https://www.npmjs.com/package/ai-sdk-scrapegraphai-tools
Additional Context: