Crawl
Start Crawl Job
Starts a crawl job for a given URL.
Method: client.crawl.start(params: StartCrawlJobParams): Promise<StartCrawlJobResponse>
Endpoint: POST /api/crawl
Parameters:
StartCrawlJobParams
:url: string
- URL to scrapemaxPages?: number
- Max number of pages to crawlfollowLinks?: boolean
- Follow links on the pageignoreSitemap?: boolean
- Ignore sitemap when finding links to crawlexcludePatterns?: string[]
- Patterns for paths to exclude from crawlincludePatterns?: string[]
- Patterns for paths to include in the crawlsessionOptions?:
CreateSessionParams
scrapeOptions?:
ScrapeOptions
Response: StartCrawlJobResponse
Example:
Get Crawl Job
Retrieves details of a specific crawl job.
Method: client.crawl.get(id: string): Promise<CrawlJobResponse>
Endpoint: GET /api/crawl/{id}
Parameters:
id: string
- Crawl job ID
Response: CrawlJobResponse
Example:
Start Crawl Job and Wait
Start a crawl job and wait for it to complete
Method: client.crawl.startAndWait(params: StartCrawlJobParams, returnAllPages: boolean = true): Promise<CrawlJobResponse>
Parameters:
StartCrawlJobParams
:url: string
- URL to scrapemaxPages?: number
- Max number of pages to crawlfollowLinks?: boolean
- Follow links on the pageignoreSitemap?: boolean
- Ignore sitemap when finding links to crawlexcludePatterns?: string[]
- Patterns for paths to exclude from crawlincludePatterns?: string[]
- Patterns for paths to include in the crawlsessionOptions?:
CreateSessionParams
scrapeOptions?:
ScrapeOptions
returnAllPages: boolean
- Return all pages in the crawl job response
Response: CrawlJobResponse
Example:
Types
CrawlPageStatus
CrawlJobStatus
StartCrawlJobResponse
CrawledPage
CrawlJobResponse
Last updated