
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@scrapio/api
Advanced tools
Official TypeScript / Node.js SDK for Scrapio — fetch, crawl, search, and extract structured data from any URL.
npm install @scrapio/api
Requires Node.js 18 or later. Ships with ESM and CJS builds and full TypeScript types.
import { ApiClient } from "@scrapio/api";
const client = new ApiClient({ apiKey: process.env.SCRAPIO_API_KEY! });
const result = await client.fetch.fetch({
url: "https://example.com",
output: ["markdown"],
});
console.log(result.outputs.markdown);
const result = await client.fetch.fetch({
url: "https://news.ycombinator.com",
render_js: true,
output: ["markdown"],
});
const results = await client.google.search({
search: "best web scraping API 2025",
country_code: "us",
search_type: "classic",
});
console.log(results.organic_results);
const results = await client.fastSearch.search({
search: "best web scraping API 2025",
country_code: "us",
});
console.log(results.organic_results);
const product = await client.amazon.getProduct({ asin: "B08N5WRWNW" });
console.log(product.title, product.price);
const items = await client.walmart.search({ query: "headphones" });
const video = await client.youtube.getVideo({ video_id: "dQw4w9WgXcQ" });
const result = await client.interact.interact({
url: "https://example.com",
actions: [
{ type: "click", selector: "#login" },
{ type: "type", selector: "#email", value: "user@example.com" },
],
});
const result = await client.crawl.crawl({
seeds: ["https://docs.example.com"],
max_pages: 50,
});
const job = await client.jobs.create({
kind: "fetch",
input: { url: "https://example.com", output: ["markdown"] },
});
const result = await client.jobs.waitForCompletion(job.job_id, {
pollIntervalMs: 2000,
timeoutMs: 120_000,
});
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your API key |
baseUrl | string | https://api.scrapio.dev | Override for local/staging |
timeoutMs | number | 30000 | Per-request timeout |
maxRetries | number | 3 | Max retries on 429/503 |
import {
ApiClient,
AuthError,
RateLimitError,
CreditsExhaustedError,
ApiError,
} from "@scrapio/api";
try {
await client.fetch.fetch({ url: "https://example.com" });
} catch (err) {
if (err instanceof AuthError) {
console.error("Invalid API key");
} else if (err instanceof CreditsExhaustedError) {
console.error("No credits remaining");
} else if (err instanceof RateLimitError) {
console.error("Rate limited — back off and retry");
} else if (err instanceof ApiError) {
console.error(`API error ${err.statusCode}: ${err.message}`);
}
}
MIT
FAQs
Official TypeScript SDK for the Scrapio
We found that @scrapio/api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.