|
| 1 | +# ScrapeBadger C# SDK |
| 2 | + |
| 3 | +[](https://www.nuget.org/packages/ScrapeBadger) [](https://github.com/scrape-badger/scrapebadger-csharp/actions) [](LICENSE) |
| 4 | + |
| 5 | +Official **C#** SDK for [ScrapeBadger](https://scrapebadger.com) — one API key for |
| 6 | +30+ scraping APIs: Twitter/X, Reddit, Facebook, Instagram, TikTok, YouTube, Amazon, eBay, |
| 7 | +Walmart, Vinted, Google (18 products), Bing, Yahoo, ChatGPT, Perplexity, real estate, and |
| 8 | +any URL via the general Web Scraping API. Generated from the ScrapeBadger OpenAPI spec — |
| 9 | +always in sync with the API. ⚠️ This repository is regenerated automatically; don't send |
| 10 | +PRs here, request changes via the [roadmap](https://github.com/scrape-badger/roadmap). |
| 11 | + |
| 12 | +📚 [API docs](https://docs.scrapebadger.com) · 🧰 [All SDKs](https://scrapebadger.com/sdks) · 🔑 [Get an API key](https://scrapebadger.com/auth/signup) — 1,000 free credits |
| 13 | + |
| 14 | +## 🚀 Install |
| 15 | + |
| 16 | +``` |
| 17 | +dotnet add package ScrapeBadger |
| 18 | +``` |
| 19 | + |
| 20 | +## ⚡ Quick start |
| 21 | + |
| 22 | +```csharp |
| 23 | +using ScrapeBadger.Api; |
| 24 | +using ScrapeBadger.Client; |
| 25 | + |
| 26 | +var config = new Configuration(); |
| 27 | +config.ApiKey.Add("X-API-Key", "YOUR_API_KEY"); |
| 28 | + |
| 29 | +var twitter = new TwitterApi(config); |
| 30 | +var user = await twitter.TwitterGetUserByUsernameAsync("elonmusk"); |
| 31 | +Console.WriteLine(user); |
| 32 | +``` |
| 33 | + |
| 34 | +Every scraper is available as its own API class (`TwitterApi`, `AmazonApi`, `GoogleApi`, …) |
| 35 | +with one method per endpoint — the full list is in the reference below. |
| 36 | + |
| 37 | +## 🛠 Development |
| 38 | + |
| 39 | +```sh |
| 40 | +dotnet build src/ScrapeBadger/ScrapeBadger.csproj # compile |
| 41 | +dotnet test # tests |
| 42 | +``` |
| 43 | + |
| 44 | +--- |
| 45 | + |
1 | 46 | # ScrapeBadger - the C# library for the ScrapeBadger API |
2 | 47 |
|
3 | 48 | Unified credit-based scraping API. https://docs.scrapebadger.com |
|
0 commit comments