Skip to content

tryAGI/Firecrawl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firecrawl

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official Firecrawl OpenAPI specification using OpenApiGenerator
  • Same day update to support new features
  • Updated and supported automatically if there are no breaking changes
  • All modern .NET features - nullability, trimming, NativeAOT, etc.
  • Support .Net Framework/.Net Standard 2.0

Usage

using Firecrawl;

using var api = new FirecrawlApp(apiKey);

// Scrape
var response = await api.Scraping.ScrapeAsync("https://docs.firecrawl.dev/features/scrape");

string markdown = response.Data.Markdown;

// Crawl
var response = await api.Crawling.CrawlUrlsAsync(
    url: "https://docs.firecrawl.dev/",
    crawlerOptions: new CrawlUrlsRequestCrawlerOptions
    {
        Limit = 3,
    },
    pageOptions: new CrawlUrlsRequestPageOptions
    {
        OnlyMainContent = true,
    });

var jobResponse = await api.Crawl.WaitJobAsync(
    jobId: response.JobId);

foreach (var data in jobResponse.Data)
{
    Console.WriteLine($"URL: {data.Metadata.SourceURL}");
    Console.WriteLine($"Output file: {data.Markdown}");
}

CLI

dotnet tool install -g Firecrawl.Cli
firecrawl auth <API_KEY>
firecrawl scrape https://docs.firecrawl.dev/features/scrape // saves it to output.md
firecrawl crawl https://docs.firecrawl.dev/ --limit 5 // saves all .md files to docs.firecrawl.dev folder

Support

Priority place for bugs: https://github.com/tryAGI/Firecrawl/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Firecrawl/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.

CodeRabbit logo

This project is supported by CodeRabbit through the Open Source Support Program.