← Back to Olostep
POST/v1/crawls

Start Crawl

Starts a new crawl. You receive a `id` to track the progress. The operation may take 1-10 mins depending upon the site and depth and pages parameters.

Olostep·Dynamic pricing

Dynamic pricing

(body.max_pages) ? body.max_pages * 0.01 : (body.max_depth) ? body.max_depth * 0.10 : 0.01

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "olostep", path: "/v1/crawls", body: { "start_url": "example", "max_pages": 123 } }); console.log(output);

Body parameters

start_urlrequired
string

The starting point of the crawl.

max_pagesrequired
number

Maximum number of pages to crawl. Recommended for most use cases like crawling an entire website.

include_urls
string

URL path patterns to include in the crawl using glob syntax. Defaults to `/**` which includes all URLs. Use patterns like `/blog/**` to crawl specific sections (e.g., only blog pages), `/products/*.html` for product pages, or multiple patterns for different sections. Supports standard glob features like * (any characters) and ** (recursive matching).

exclude_urls
string

URL path names in glob pattern to exclude. For example: `/careers/**`. Excluded URLs will supersede included URLs.

max_depth
number

Maximum depth of the crawl. Useful to extract only up to n-degree of links.

include_external
boolean

Crawl first-degree external links.

include_subdomain
boolean

Include subdomains of the website. `false` by default.

search_query
string

An optional search query to find specific links and also sort the results by relevance.

top_n
number

An optional number to only crawl the top N most relevant links on every page as per search query.

webhook_url
string

An optional POST request endpoint called when this crawl is completed. The body of the request will be same as the response of this [`v1/crawls/{crawl_id}`](./info#response-created) endpoint.

timeout
number

End the crawl after n seconds with the pages completed until then. May take ~10s extra from provided timeout.

Response

id
string
object
string
status
string
created
number
cost_usd
null
max_depth
null
max_pages
number
start_url
string
start_date
string
pages_count
number
exclude_urls
array
include_urls.0
string
current_depth
number
credits_consumed
null
include_external
boolean
    Orthogonal - Giving AI agents the tools they need.