Quickstart

Get from zero to first API call in under 2 minutes

1

Install the SDK

npm
npm install iato-sdk
2

Get your API key

Create a key on the API Keys page, or use one you already have.

Your key prefix
iato_••••••••
3

Start your first crawl

JavaScript
import { IATO } from 'iato-sdk';

const client = new IATO({
  apiKey: 'iato_YOUR_KEY_HERE'
});

// Start a crawl
const job = await client.crawl.start({
  url: 'https://example.com',
  maxPages: 100
});

console.log('Job started:', job.id);
4

Check results

JavaScript
// Poll for completion
const status = await client.crawl.status(job.id);

// Get results when complete
if (status.state === 'completed') {
  const pages = await client.crawl.pages(job.id);
  console.log(`Found ${pages.length} pages`);
}
~

Or use cURL directly

bash
# Start a crawl
curl -X POST https://iato.ai/api/crawl/start \
  -H "Authorization: Bearer iato_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "max_pages": 100}'

# Check usage
curl https://iato.ai/api/billing/usage \
  -H "Authorization: Bearer iato_YOUR_KEY"
4

What does this cost?

Your first 1,000 crawl pages and 5,000 API calls are free every month. After that, pay-as-you-go pricing starts at $0.003/page and $0.001/call with volume discounts.

JS-rendered pages count as 3 crawl pages (3× multiplier). Set a spending cap to prevent surprises.

Estimate your monthly cost →

5

Handle billing responses

When your spending cap is hit or you're rate limited, the API returns clear error codes with resolution guidance.

JavaScript
try {
  const crawl = await client.crawl.start({
    url: 'https://example.com'
  });
} catch (err) {
  if (err.status === 402) {
    // Spending cap reached
    // err.response.error.resolution has endpoints
    // to raise cap or buy credits
    console.log('Cap reached', err.response.error.resolution);
  } else if (err.status === 429) {
    // Rate limited — wait and retry
    const wait = err.headers['retry-after'];
    await new Promise(r => setTimeout(r, wait * 1000));
  }
}