ForeverTools.ScraperAPI 1.0.1

dotnet add package ForeverTools.ScraperAPI --version 1.0.1
                    
NuGet\Install-Package ForeverTools.ScraperAPI -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ForeverTools.ScraperAPI" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ForeverTools.ScraperAPI" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ForeverTools.ScraperAPI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ForeverTools.ScraperAPI --version 1.0.1
                    
#r "nuget: ForeverTools.ScraperAPI, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ForeverTools.ScraperAPI@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ForeverTools.ScraperAPI&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ForeverTools.ScraperAPI&version=1.0.1
                    
Install as a Cake Tool

ForeverTools.ScraperAPI

Lightweight ScraperAPI client for .NET. Scrape any website without getting blocked - automatic proxy rotation, CAPTCHA solving, and JavaScript rendering.

NuGet

Features

  • Simple Scraping - One line to scrape any URL
  • JavaScript Rendering - Scrape SPAs and dynamic content
  • Screenshots - Capture full page screenshots
  • Geo-Targeting - Scrape from specific countries
  • Premium Proxies - Residential and mobile IPs
  • Async Jobs - Background scraping for large batches
  • Auto-Parse - Get structured JSON from popular sites
  • ASP.NET Core Ready - Built-in dependency injection
  • Multi-Target - .NET 8, .NET 6, .NET Standard 2.0

Quick Start

Install

dotnet add package ForeverTools.ScraperAPI

Get Your API Key

Sign up at ScraperAPI to get your API key with 5,000 free credits.

Basic Usage

using ForeverTools.ScraperAPI;

var client = new ScraperApiClient("your-api-key");

// Simple scrape
var html = await client.ScrapeAsync("https://example.com");

// With JavaScript rendering (for SPAs)
var rendered = await client.ScrapeWithJavaScriptAsync("https://spa-example.com");

// From a specific country
var usContent = await client.ScrapeFromCountryAsync("https://example.com", "us");

Advanced Usage

Full Request Configuration

var request = new ScrapeRequest
{
    Url = "https://example.com",
    RenderJavaScript = true,
    CountryCode = "us",
    Premium = true,
    DeviceType = DeviceTypes.Mobile,
    AutoParse = true
};

var response = await client.ScrapeWithResponseAsync(request);

if (response.Success)
{
    Console.WriteLine($"Status: {response.StatusCode}");
    Console.WriteLine(response.Content);
}

Screenshots

// Get screenshot as base64
var base64 = await client.TakeScreenshotAsync("https://example.com");

// Get screenshot as bytes (for saving to file)
var bytes = await client.TakeScreenshotBytesAsync("https://example.com");
File.WriteAllBytes("screenshot.png", bytes);

Async Jobs (Background Scraping)

// Submit job and wait for completion
var response = await client.ScrapeAsyncAndWaitAsync(new ScrapeRequest
{
    Url = "https://example.com",
    RenderJavaScript = true
});

// Or manage jobs manually
var job = await client.SubmitAsyncJobAsync(request);
Console.WriteLine($"Job ID: {job.Id}");

// Check status later
var status = await client.GetAsyncJobStatusAsync(job.Id);
if (status.IsFinished)
{
    Console.WriteLine(status.Response.Body);
}

Check Account Credits

var account = await client.GetAccountInfoAsync();
Console.WriteLine($"Credits remaining: {account.RemainingCredits}");
Console.WriteLine($"Concurrent limit: {account.ConcurrencyLimit}");

ASP.NET Core Integration

// Program.cs
builder.Services.AddForeverToolsScraperApi("your-api-key");

// Or with full configuration
builder.Services.AddForeverToolsScraperApi(options =>
{
    options.ApiKey = "your-api-key";
    options.DefaultRenderJavaScript = true;
    options.DefaultCountryCode = "us";
    options.TimeoutSeconds = 90;
});

// Or from appsettings.json
builder.Services.AddForeverToolsScraperApi(builder.Configuration);
// appsettings.json
{
  "ScraperAPI": {
    "ApiKey": "your-api-key",
    "DefaultRenderJavaScript": true,
    "DefaultCountryCode": "us"
  }
}
// Inject and use
public class PriceScraperService
{
    private readonly ScraperApiClient _scraper;

    public PriceScraperService(ScraperApiClient scraper)
    {
        _scraper = scraper;
    }

    public async Task<string> GetProductPageAsync(string url)
    {
        return await _scraper.ScrapeWithJavaScriptAsync(url);
    }
}

Environment Variables

// Uses SCRAPERAPI_KEY by default
var client = ScraperApiClient.FromEnvironment();

// Or specify custom variable name
var client = ScraperApiClient.FromEnvironment("MY_SCRAPER_KEY");

Request Options

Option Description Credits
Basic scrape Default HTML scraping 1
RenderJavaScript Execute JavaScript +10
Screenshot Capture page screenshot +10
Premium Residential/mobile proxies +10
UltraPremium Advanced bypass +30
CountryCode Geo-targeting +0
SessionNumber Sticky sessions +0
AutoParse Structured JSON output +0

Country Codes

Common codes: us, uk, de, fr, es, it, br, ca, au, jp, in

Full list of supported countries

Why ScraperAPI?

ScraperAPI handles the hard parts of web scraping:

  • 40M+ proxies - Automatic rotation, never get blocked
  • CAPTCHA solving - Built-in, no extra setup
  • JavaScript rendering - Scrape SPAs and dynamic sites
  • 99.9% uptime - Reliable infrastructure
  • Simple pricing - Pay per successful request

Need Just Proxies?

If you need standalone proxy access without the scraping features, check out BrightData - the industry leader in proxy services:

Proxy Type Best For Link
Residential Proxies General scraping, geo-targeting Get Started
ISP Proxies High-speed, stable connections Get Started
Social Media Proxies Instagram, Facebook, TikTok automation Get Started
SERP API Search engine scraping Get Started

Other ForeverTools Packages

Package Description NuGet
ForeverTools.AIML Access 400+ AI models (GPT-4, Claude, Llama, Gemini, DALL-E) NuGet
ForeverTools.APILayer IP geolocation, currency exchange, phone & email validation NuGet
ForeverTools.Captcha Multi-provider captcha solving (2Captcha, CapSolver, Anti-Captcha) NuGet
ForeverTools.ImageGen AI image generation with social media presets (DALL-E, Flux, SD) NuGet
ForeverTools.OCR AI-powered OCR using GPT-4 Vision, Claude 3, and Gemini NuGet
ForeverTools.Postmark Transactional email sending with templates and tracking NuGet
ForeverTools.Proxy Premium proxy rotation with BrightData (Residential, ISP, Mobile) NuGet
ForeverTools.STT Speech-to-Text using Whisper (transcription, subtitles, language detection) NuGet
ForeverTools.Translate AI-powered translation with 100+ languages (GPT-4, Claude) NuGet

Requirements

  • .NET 8.0, .NET 6.0, or .NET Standard 2.0 compatible framework
  • ScraperAPI account with API key

License

MIT License - see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 205 12/14/2025
1.0.0 434 12/9/2025