
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@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 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", text: "user@example.com" },
],
});
const result = await client.crawl.crawl({
seeds: ["https://docs.example.com"],
max_pages: 50,
});
const job = await client.jobs.create({
job_type: "fetch",
payload: { 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
The npm package @scrapio/api receives a total of 47 weekly downloads. As such, @scrapio/api popularity was classified as not popular.
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.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

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.