
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
crawl4ai-cloud
Advanced tools
Lightweight Node.js/TypeScript SDK for Crawl4AI Cloud. Mirrors the OSS API exactly.
Note: This SDK is for Crawl4AI Cloud (api.crawl4ai.com), the managed cloud service. For the self-hosted open-source version, see github.com/unclecode/crawl4ai.
npm install crawl4ai-cloud
import { AsyncWebCrawler } from 'crawl4ai-cloud';
const crawler = new AsyncWebCrawler({ apiKey: 'sk_live_...' });
const result = await crawler.run('https://example.com');
console.log(result.markdown?.rawMarkdown);
await crawler.close();
const result = await crawler.run('https://example.com');
console.log(result.success);
console.log(result.markdown?.rawMarkdown);
console.log(result.html);
const urls = ['https://example.com', 'https://httpbin.org/html'];
// Wait for results
const results = await crawler.runMany(urls, { wait: true });
for (const r of results as CrawlResult[]) {
console.log(`${r.url}: ${r.success}`);
}
// Fire and forget (returns job)
const job = await crawler.runMany(urls, { wait: false });
console.log(`Job ID: ${(job as CrawlJob).id}`);
import { AsyncWebCrawler, CrawlerRunConfig, BrowserConfig } from 'crawl4ai-cloud';
const config: CrawlerRunConfig = {
wordCountThreshold: 10,
excludeExternalLinks: true,
screenshot: true,
};
const browserConfig: BrowserConfig = {
viewportWidth: 1920,
viewportHeight: 1080,
};
const result = await crawler.run('https://example.com', {
config,
browserConfig,
});
// Shorthand
const result = await crawler.run(url, { proxy: 'datacenter' });
const result = await crawler.run(url, { proxy: 'residential' });
// Full config
const result = await crawler.run(url, {
proxy: { mode: 'residential', country: 'US' }
});
const result = await crawler.deepCrawl('https://docs.example.com', {
strategy: 'bfs',
maxDepth: 2,
maxUrls: 50,
wait: true,
});
// List jobs
const jobs = await crawler.listJobs({ status: 'completed', limit: 10 });
// Get job status
const job = await crawler.getJob(jobId);
// Wait for job
const completedJob = await crawler.waitJob(jobId, {
pollInterval: 2.0,
timeout: 300,
});
// Cancel job
await crawler.cancelJob(jobId);
The SDK provides arun() and arunMany() aliases for seamless migration:
// These are equivalent
const result = await crawler.run(url);
const result = await crawler.arun(url);
const results = await crawler.runMany(urls);
const results = await crawler.arunMany(urls);
export CRAWL4AI_API_KEY=sk_live_...
// API key auto-loaded from environment
const crawler = new AsyncWebCrawler({});
import {
CloudError,
AuthenticationError,
RateLimitError,
QuotaExceededError,
NotFoundError,
} from 'crawl4ai-cloud';
try {
const result = await crawler.run(url);
} catch (error) {
if (error instanceof AuthenticationError) {
console.log('Invalid API key');
} else if (error instanceof RateLimitError) {
console.log(`Rate limited. Retry after ${error.retryAfter}s`);
} else if (error instanceof QuotaExceededError) {
console.log('Quota exceeded');
}
}
Full TypeScript support with exported types:
import type {
CrawlResult,
CrawlJob,
MarkdownResult,
CrawlerRunConfig,
BrowserConfig,
ProxyConfig,
} from 'crawl4ai-cloud';
Apache 2.0
FAQs
Lightweight cloud SDK for Crawl4AI - mirrors the OSS API
We found that crawl4ai-cloud 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.