Dagger
Search

firecrawl-dag

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/kpenfound/dag/firecrawl@v1.0.0

Entrypoint

Return Type
FirecrawlDag !
Arguments
NameTypeDefault ValueDescription
apiKeySecret !-A reference to a secret value, which can be handled more safely than the value itself.
Example
dagger -m github.com/kpenfound/dag/firecrawl@f8c4b2e864026dec6f1a76314c5c090e30c9ced8 call \
 --api-key env:MYSECRET
func (m *myModule) example(apiKey *Secret) *FirecrawlDag  {
	return dag.
			FirecrawlDag(apiKey)
}
@function
def example(api_key: dagger.Secret) -> dag.FirecrawlDag:
	return (
		dag.firecrawl_dag(api_key)
	)
@func()
example(apiKey: Secret): FirecrawlDag {
	return dag
		.firecrawlDag(apiKey)
}

Types

FirecrawlDagCrawlPage 🔗

FirecrawlDag 🔗

crawl() 🔗

Crawl a URL and return the content.

Return Type
[FirecrawlDagCrawlPage ! ] !
Arguments
NameTypeDefault ValueDescription
urlString !-The URL to crawl.
Example
dagger -m github.com/kpenfound/dag/firecrawl@f8c4b2e864026dec6f1a76314c5c090e30c9ced8 call \
 --api-key env:MYSECRET crawl --url string
func (m *myModule) example(apiKey *Secret, url string) []*FirecrawlDagCrawlPage  {
	return dag.
			FirecrawlDag(apiKey).
			Crawl(url)
}
@function
def example(api_key: dagger.Secret, url: str) -> List[dag.FirecrawlDagCrawlPage]:
	return (
		dag.firecrawl_dag(api_key)
		.crawl(url)
	)
@func()
example(apiKey: Secret, url: string): FirecrawlDagCrawlPage[] {
	return dag
		.firecrawlDag(apiKey)
		.crawl(url)
}

extract() 🔗

Extract structured data from a website

Return Type
String !
Arguments
NameTypeDefault ValueDescription
urls[String ! ] !-The URLs to scrape.
promptString !-The description of the information to extract.
Example
dagger -m github.com/kpenfound/dag/firecrawl@f8c4b2e864026dec6f1a76314c5c090e30c9ced8 call \
 --api-key env:MYSECRET extract --urls string1 --urls string2 --prompt string
func (m *myModule) example(ctx context.Context, apiKey *Secret, urls []string, prompt string) string  {
	return dag.
			FirecrawlDag(apiKey).
			Extract(ctx, urls, prompt)
}
@function
async def example(api_key: dagger.Secret, urls: List[str], prompt: str) -> str:
	return await (
		dag.firecrawl_dag(api_key)
		.extract(urls, prompt)
	)
@func()
async example(apiKey: Secret, urls: string[], prompt: string): Promise<string> {
	return dag
		.firecrawlDag(apiKey)
		.extract(urls, prompt)
}

map() 🔗

Map a website and get all the urls on the website

Return Type
[String ! ] !
Arguments
NameTypeDefault ValueDescription
urlString !-The URL to scrape.
Example
dagger -m github.com/kpenfound/dag/firecrawl@f8c4b2e864026dec6f1a76314c5c090e30c9ced8 call \
 --api-key env:MYSECRET map --url string
func (m *myModule) example(ctx context.Context, apiKey *Secret, url string) []string  {
	return dag.
			FirecrawlDag(apiKey).
			Map(ctx, url)
}
@function
async def example(api_key: dagger.Secret, url: str) -> List[str]:
	return await (
		dag.firecrawl_dag(api_key)
		.map(url)
	)
@func()
async example(apiKey: Secret, url: string): Promise<string[]> {
	return dag
		.firecrawlDag(apiKey)
		.map(url)
}

scrape() 🔗

Scrape a URL and return the content.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
urlString !-The URL to scrape.
Example
dagger -m github.com/kpenfound/dag/firecrawl@f8c4b2e864026dec6f1a76314c5c090e30c9ced8 call \
 --api-key env:MYSECRET scrape --url string
func (m *myModule) example(ctx context.Context, apiKey *Secret, url string) string  {
	return dag.
			FirecrawlDag(apiKey).
			Scrape(ctx, url)
}
@function
async def example(api_key: dagger.Secret, url: str) -> str:
	return await (
		dag.firecrawl_dag(api_key)
		.scrape(url)
	)
@func()
async example(apiKey: Secret, url: string): Promise<string> {
	return dag
		.firecrawlDag(apiKey)
		.scrape(url)
}