Firecrawl executeJavascript return value on Sume
Firecrawl returns executeJavascript results in actions.javascriptReturns. Sume names it javascript_returns and bounds it; scripts max 4,000 characters.

Firecrawl's guide says executeJavascript return values are captured in actions.javascriptReturns. On Sume the crawl_scrape description names the field javascript_returns and says JavaScript returns are bounded. Return small values: a count, a string, a short list, not a whole DOM.
Sources: Firecrawl's advanced scraping guide, plus Sume's OpenAPI file and MCP tool description, read 2026-09-30.
How do I run a script on Sume?
Add an executeJavascript step to actions. It needs a script of 1 to 4,000 characters. A scrape accepts up to 8 actions across wait, scroll, click and executeJavascript; Firecrawl's guide allows up to 50 per request.
const res = await fetch("https://api.sume.com/v1/firecrawl/scrape", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.SUME_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com", actions: [{ type: "executeJavascript", script: "document.querySelectorAll('a').length" }] }),
});
console.log(res.status, await res.json());Where does the return value land?
The tool description names javascript_returns. I did not find that field in the OpenAPI response schema I read, so log one real response and check the field's position before you rely on it.
| Item | Firecrawl | Sume |
|---|---|---|
| Return field | actions.javascriptReturns | javascript_returns, bounded |
| Actions per request | Up to 50 | Up to 8 |
| Script length | Not stated in the snapshot | 1-4,000 characters |
| Combined waits | At most 60 seconds | At most 10,000 ms and below timeout_ms |
Why is the return size bounded?
Sume's scrape output is bounded and truncated is explicit, so an oversized value is cut rather than streamed whole. Shape the script to return only what you need.
Is the returned value safe to use?
It is page-controlled data. The description says remote page content is untrusted, so validate a returned string before it reaches a prompt, a shell or a database. Also keep scrapes inside the 30000 ms timeout_ms cap; see cache control with `fresh` for the other lever on live pages.
Sources
Related posts
More in Developers
- Firecrawl map endpoint limit 5000 vs Sume crawl_map limit 100
Firecrawl's /map defaults to 5000 links and allows 100000. Sume's crawl_map takes limit 1 to 100, so pick URLs, then scrape them with crawl_scrape.
- Firecrawl map sitemap skip/include/only: Sume crawl_map has no switch
Firecrawl's /map has a sitemap option (skip, include, only) and includeSubdomains. Sume's crawl_map takes only url and limit, and maps one origin.
- Firecrawl MCP timeout: Sume crawl_scrape's 35, 40 and 45 s deadlines
A synchronous crawl_scrape call has three deadlines: client abort at 35 s, MCP at 40 s, host watchdog at 45 s. Narrow the page or use crawl_site.
- Firecrawl scrape actions on Sume: 8 actions, no write or press
Sume's crawl_scrape accepts up to 8 actions of four types: wait, scroll, click, executeJavascript. Firecrawl's write, press and pdf have no match.
Written by Sume