This guide shows how to feed values into a script, read a page well, get past blocks, and log in. Read Scraping basics first.
Contents: Dynamic parameters · CSS selectors · Proxy tiers · API integration · Account credentials
Dynamic parameters
Parameters put values into your script at run time, so you don't edit the code to change them. Set them in Settings → Parameters.
Each parameter becomes TRAWL.<name> in the script. You can store several sets of values, called scenarios: each run (the schedule and the Run button) picks one stored set at random. Two helpers make values change by themselves:
DATE(±N, unit, format): a date from now, e.g.DATE(-1, days, YYYY-MM-DD)is yesterday.RANDOM(a, b, c): one value picked at random from the list.
Example: search a different keyword on each run.
In the script, use the value directly:
To run with values of your own from your code, see Run with your own values.
[
{ "TRAWL.query": "javascript frameworks" },
{ "TRAWL.query": "rust webassembly" },
{ "TRAWL.query": "AI tools 2026" }
]var page = await browser.newPage();
await page.goto(`https://news.ycombinator.com/search?q=${TRAWL.query}`, { waitUntil: 'domcontentloaded' });
const result = await page.$$eval('.titleline > a', els =>
els.map(el => ({ title: el.textContent.trim(), href: el.href }))
);
returnData(result);// A list
const items = await page.$$eval('ul.results li', els =>
els.map(el => ({
title: el.querySelector('h2')?.textContent.trim(),
price: el.querySelector('.price')?.textContent.trim(),
url: el.querySelector('a')?.href,
}))
);
// A single element
const heading = await page.$eval('h1.main-title', el => el.textContent.trim());
returnData(items);await page.waitForSelector('.results-list', { timeout: 8000 });Proxy tiers
When a site blocks a run, Trawl moves the scrap up to a stronger proxy tier and keeps it there. The tier column in the Run tab shows the tier of each run.
| Tier | Use case |
|---|---|
tier0 |
No proxy (default) |
tier1 |
Home IPs, for basic bot checks |
tier2 |
Mobile network IPs, for stricter sites |
tier3 |
Premium rotating proxies, for well-protected sites |
tier4 |
A premium scraping browser on home IPs, for the hardest sites |
A higher tier costs more per run.
API integration
Every scrap can be run from your code. The call and its answer, in curl, JavaScript and Python: Quickstart. With values of your own: Parameters. Keys, scopes, and the routes that list scraps and runs: API keys. The API card on the scrap page also shows a ready curl call.
Account credentials
A scrap that needs a login reads its stored account in the script as TRAWL.account.username, TRAWL.account.password and TRAWL.account.session. Trawl puts a saved session back on the browser before your script starts, so the script only logs in when the page is not logged in yet. How to store an account or a session, and the script to use: Account & sessions.
See also: Scraping · Parameters · Account & sessions
Next step → Parameters