Crawl
Last updated
Last updated
Starts a crawl job for a given URL.
Method: client.crawl.start(params: StartCrawlJobParams): StartCrawlJobResponse
Endpoint: POST /api/crawl
Parameters:
StartCrawlJobParams
:
url: string
- URL to scrape
max_pages?: number
- Max number of pages to crawl
follow_links?: boolean
- Follow links on the page
ignore_sitemap?: boolean
- Ignore sitemap when finding links to crawl
exclude_patterns?: string[]
- Patterns for paths to exclude from crawl
include_patterns?: string[]
- Patterns for paths to include in the crawl
session_options?:
scrape_options?:
Response:
Example:
Retrieves details of a specific crawl job.
Method: client.crawl.get(id: str): CrawlJobResponse
Endpoint: GET /api/crawl/{id}
Parameters:
id: string
- Crawl job ID
Example:
Start a crawl job and wait for it to complete
Method: client.crawl.start_and_wait(params: StartCrawlJobParams): CrawlJobResponse
Parameters:
StartCrawlJobParams
:
url: string
- URL to scrape
max_pages?: number
- Max number of pages to crawl
follow_links?: boolean
- Follow links on the page
ignore_sitemap?: boolean
- Ignore sitemap when finding links to crawl
exclude_patterns?: string[]
- Patterns for paths to exclude from crawl
include_patterns?: string[]
- Patterns for paths to include in the crawl
Example:
Response:
session_options?:
scrape_options?:
Response: