Skip to main content
AI Studio  add-on for Spider.
esm.sh · HTTP 200

Esm Scraper

Spider read esm.sh in 192 ms without a browser and returned 395 lines of clean markdown, including sections like "Fast", "Bundling Strategy" and "Tree Shaking".

Get your free API key
Free balance on signup No card. Failed requests cost $0.
Response esm.sh/index.md markdown · 395 lines
## **Fast**You can also alias dependencies by adding `?alias=PACKAGE:ALIAS` to the import URL. This is useful when you want to use a different package for a dependency.`import useSWR from "https://esm.sh/swr?alias=react:preact/compat";`import useSWR from "https://esm.sh/swr?alias=react:preact/compat&deps=preact@10.5.14";### Bundling StrategyBy default, esm.sh bundles sub-modules of a package that are not shared by entry modules defined in the `exports` field of `package.json`.Bundling sub-modules can reduce the number of network requests, improving performance. However, it may result in repeated bundling of shared modules. In extreme cases, this can break package side effects or alter the `import.meta.url` semantics. To prevent this, you can disable the default bundling behavior by adding `?bundle=false`:`import "https://esm.sh/svelte?bundle=false";For package authors, it is recommended to define the `exports` field in `package.json`. This specifies the entry modules of the package, allowing esm.sh to accurately analyze the dependency tree and bundle the modules without duplication.Or you can override the bundling strategy by adding the `esm.sh` field to your `package.json`:"bundle": false // disables the default bundling behaviorYou can also add the `?standalone` flag to bundle the module along with all its external dependencies (excluding those in `peerDependencies`) into a single JavaScript file.`import { Button } from "https://esm.sh/antd?standalone";You can disable the default transforming/bundling behavior by adding `?raw` query to the import URL.`import { render } from "https://esm.sh/preact?raw";`> query is useful when you want to import the raw JavaScript source code of a package, as-is, without transformation into ES modules.### Tree ShakingBy default, esm.sh exports a module with all its exported members. However, if you want to import only a specific set of
Code · Fields · Cost · Run it keyless, no account

The same call, in code.

The capture above came back as markdown. These examples add a key, so you get browser rendering, proxies, and concurrency on esm.sh.

esm-sh-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://esm.sh");

// No selectors, no schema. Spider reads the page and names the fields.
const data = await page.scrape();

console.log(data);
await spider.close();
ready to run · spider-browser, no selectors

Ready for volume? Get an API key →

Fields you can pull.

TitleContentDateSourceCategory

Spider names these from the page. The capture above came back as markdown; the same call with return_format: "json" returns them as keys.

What esm.sh costs to scrape.

The capture above cost $0.000113 to fetch. Pricing is $1 per GB of pre-transformation bandwidth plus $0.001 per CPU minute, so a page like this one lands at a fraction of a cent. Failed requests are billed at $0.

  • Free balance on signup
  • No card required to test
  • Balance never expires
See the full pricing →

Run it keyless, no account

curl -X POST https://api.spider.cloud/scrape -H "Content-Type: application/json" -d '{"url": "https://esm.sh/", "return_format": "markdown"}'

More International scrapers.

Start scraping esm.sh.

You already have the call. A key raises the rate limit and turns on browser rendering, proxies, and concurrency. Balance never expires, and top-ups go through secure checkout.