Auto-generated C# SDK for ScrapeGraphAI -- AI-powered web scraping with natural language prompts and structured data extraction.
OpenAPI spec from the public https://api.scrapegraphai.com/openapi.json.
dotnet build ScrapeGraphAI.slnx
dotnet test src/tests/IntegrationTests/API key auth via SGAI-APIKEY header (native via --security-scheme):
var client = new ScrapeGraphAIClient(apiKey); // SGAI_API_KEY env varsrc/libs/ScrapeGraphAI/openapi.yaml-- OpenAPI spec (downloaded from api.scrapegraphai.com)src/libs/ScrapeGraphAI/generate.sh-- Downloads spec, runs autosdk with--security-schemeand--base-urlsrc/libs/ScrapeGraphAI/Generated/-- Never edit -- auto-generated codesrc/libs/ScrapeGraphAI/Extensions/ScrapeGraphAIClientExtensions.Tools.cs-- MEAI AIFunction toolssrc/tests/IntegrationTests/Tests.cs-- Test helper with bearer authsrc/tests/IntegrationTests/Examples/-- Example tests (also generate docs)
ScrapeGraphAI uses sub-client accessors:
client.SmartScraper.StartSmartscraperV1SmartscraperPostAsync(...)-- AI data extraction from URLclient.SearchScraper.StartSearchscraperV1SearchscraperPostAsync(...)-- AI-powered web searchclient.Markdownify.StartMarkdownifyV1MarkdownifyPostAsync(...)-- Convert URL to markdownclient.Sitemap.GenerateSitemapV1SitemapPostAsync(...)-- Extract sitemap URLsclient.Crawler.StartCrawlV1CrawlPostAsync(...)-- Multi-page crawlingclient.User.GetCreditsV1CreditsGetAsync()-- Credit balanceclient.User.SubmitFeedbackV1FeedbackPostAsync(...)-- Submit feedbackclient.SchemaGenerator.*-- Auto-generate output schemasclient.ScheduledJobs.*-- Scheduled scraping jobsclient.SiteMonitors.*-- Site monitoring
AIFunction tools for use with any IChatClient:
AsSmartScraperTool()-- Extract structured data from URL with NL promptAsSearchScraperTool()-- AI-powered web search with structured resultsAsMarkdownifyTool()-- Convert URL to markdownAsGetCreditsTool()-- Check credit balanceAsGetSitemapTool()-- Extract sitemap URLs