Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Firecrawl / Scrape a web page

Firecrawl tool firecrawl-scrape on looot: input fields, $0.005 per call, output shape, and code to run it with curl, JavaScript or Python.

Scrapes one URL and can extract information with an LLM. Send url; formats, actions, waitFor, mobile and location refine it. Returns data with markdown and metadata.

Inputs

Name Type Required Description
actions array no Actions to perform on the page before grabbing the content
blockAds boolean no Enables ad-blocking and cookie popup blocking.
excludeTags array no Tags to exclude from the output.
formats array no Output formats to include in the response. You can specify one or more formats, either as strings (e.g., 'markdown') or as objects with additional options (e.g., \{ type: 'json', schema: \{...\} \}). Some formats require specific options to be set. Example: ['markdown', \{ type: 'json', schema: \{...\} \}].
headers string no Headers to send with the request. Can be used to send cookies, user-agent, etc.
includeTags array no Tags to include in the output.
location string no Location settings for the request. When specified, this will use an appropriate proxy if available and emulate the corresponding language and timezone settings. Defaults to ‘US’ if not specified.
maxAge integer no Returns a cached version of the page if it is younger than this age in milliseconds. If a cached version of the page is older than this value, the page will be scraped. If you do not need extremely fresh data, enabling this can speed up your scrapes by 500%. Defaults to 2 days.
mobile boolean no Set to true if you want to emulate scraping from a mobile device. Useful for testing responsive pages and taking mobile screenshots.
onlyMainContent boolean no Only return the main content of the page excluding headers, navs, footers, etc.
parsers array no Controls how files are processed during scraping. When “pdf” is included (default), the PDF content is extracted and converted to markdown format, with billing based on the number of pages (1 credit per page). When an empty array is passed, the PDF file is returned in base64 encoding with a flat rate of 1 credit total.
proxy string no Specifies the type of proxy to use. - basic: Proxies for scraping sites with none to basic anti-bot solutions. Fast and usually works. - enhanced: Enhanced proxies for scraping sites with advanced anti-bot solutions. Slower, but more reliable on certain sites. Billed at the same credit cost as basic. - auto: Firecrawl will automatically retry scraping with enhanced proxies if the basic proxy fails. Enhanced proxies carry no credit surcharge, so either way only the regular cost is…
removeBase64Images boolean no Removes all base 64 images from the output, which may be overwhelmingly long. The image’s alt text remains in the output, but the URL is replaced with a placeholder.
skipTlsVerification boolean no Skip TLS certificate verification when making requests
storeInCache boolean no If true, the page will be stored in the Firecrawl index and cache. Setting this to false is useful if your scraping activity may have data protection concerns. Using some parameters associated with sensitive scraping (actions, headers) will force this parameter to be false.
timeout integer no Timeout in milliseconds for the request.
url string yes The URL to scrape
waitFor integer no Specify a delay in milliseconds before fetching the content, allowing the page sufficient time to load.
zeroDataRetention boolean no If true, this will enable zero data retention for this scrape. To enable this feature, please contact help@firecrawl.dev

Output

Shape of the run’s result, checked against 2 real answers:

{ data: { markdown, metadata: { url, title, favicon, cachedAt, language, scrapeI... ...

The shape is cut here. Signed in, looot inspect firecrawl-scrape prints all of it.

Run it

Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.

Example input with placeholder values:

curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"firecrawl-scrape","input":{"url":"https://example.com"},"wait":30}'
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "firecrawl-scrape",
    input: {
      url: "https://example.com",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "firecrawl-scrape",
        "input": {
            "url": "https://example.com",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))

To let looot pick among every provider of this job instead, send job:web.scrape.structured as endpointId; see the job page.

Was this page helpful?