API Reference
Everything you need to integrate IronAPI into your application.
Base URL: https://api.ironapi.uk
All endpoints use HTTPS. HTTP requests will be redirected.
Authentication
All API requests require an API key passed in the Authorization header.
# Include your API key in every request curl https://api.ironapi.uk/v1/screenshot \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}'
Get your API key from the dashboard after signing up.
Rate Limits
| Plan | Requests/min | Monthly Quota |
|---|---|---|
| Free | 10 | 100 |
| Starter ($9) | 60 | 2,000 |
| Pro ($29) | 200 | 10,000 |
| Business ($99) | 500 | 50,000 |
Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Error Handling
All errors return a consistent JSON format:
{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 60 seconds.",
"status": 429
}
}
| Status | Code | Description |
|---|---|---|
| 400 | bad_request | Invalid request parameters |
| 401 | unauthorized | Missing or invalid API key |
| 429 | rate_limit_exceeded | Too many requests |
| 500 | internal_error | Something went wrong on our end |
Screenshot API
Capture any webpage as a high-quality image or PDF.
POST /v1/screenshot
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | URL to capture |
| format | string | No | png (default), jpeg, webp, pdf |
| width | number | No | Viewport width. Default: 1280 |
| height | number | No | Viewport height. Default: 720 |
| fullPage | boolean | No | Capture full page scroll. Default: false |
| darkMode | boolean | No | Force dark color scheme. Default: false |
| delay | number | No | Wait ms before capture. Default: 0 |
| quality | number | No | Image quality 1-100 (JPEG/WebP). Default: 80 |
Example
curl -X POST https://api.ironapi.uk/v1/screenshot \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://github.com", "format": "png", "width": 1280, "height": 720, "fullPage": false, "darkMode": true }' \ --output screenshot.png
Returns the image binary directly. Content-Type header indicates the format.
Scrape API
Get clean, readable content from any URL. Renders JavaScript, removes navigation, ads, and clutter.
POST /v1/scrape
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | URL to scrape |
| format | string | No | markdown (default), text, html |
| waitFor | string | No | CSS selector to wait for before extracting |
| includeMetadata | boolean | No | Include page title, description, OG tags. Default: true |
Response
{
"content": "# Page Title\n\nMain content in markdown...",
"metadata": {
"title": "Page Title",
"description": "Meta description",
"ogImage": "https://example.com/og.png",
"language": "en"
},
"url": "https://example.com",
"statusCode": 200
}
AI Extract API
Extract structured data from any webpage using AI. Define a JSON schema and get clean, typed data back.
POST /v1/extract
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | URL to extract data from |
| schema | object | Yes | JSON schema defining expected output fields and types |
| prompt | string | No | Additional instructions for the AI extractor |
Example
curl -X POST https://api.ironapi.uk/v1/extract \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/product/123", "schema": { "name": "string", "price": "number", "currency": "string", "rating": "number", "reviewCount": "number", "inStock": "boolean", "features": "string[]" }, "prompt": "Extract product details from this page" }'
Response
{
"data": {
"name": "Wireless Headphones Pro",
"price": 79.99,
"currency": "USD",
"rating": 4.7,
"reviewCount": 2341,
"inStock": true,
"features": ["Noise canceling", "40h battery", "Bluetooth 5.3"]
},
"url": "https://example.com/product/123",
"tokensUsed": 850
}
PDF Generation API
Convert any URL or HTML to a PDF document.
POST /v1/pdf
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | * | URL to convert (provide url OR html) |
| html | string | * | Raw HTML to convert (provide url OR html) |
| format | string | No | A4 (default), Letter, Legal |
| landscape | boolean | No | Landscape orientation. Default: false |
| margin | object | No | { top, right, bottom, left } in px/cm/in |
| printBackground | boolean | No | Include background. Default: true |
Returns PDF binary. Content-Type: application/pdf
OG Image API
Generate dynamic Open Graph images from templates and data.
POST /v1/og
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| template | string | Yes | blog, product, social, minimal, or custom HTML |
| data | object | Yes | Template variables (title, subtitle, image, etc.) |
| width | number | No | Image width. Default: 1200 |
| height | number | No | Image height. Default: 630 |
AI Vision API
Extract structured data from images using AI. Perfect for receipts, documents, screenshots, and more.
POST /v1/vision
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| image | string | Yes | Image URL or base64-encoded data |
| schema | object | No | Expected output schema (like AI Extract) |
| prompt | string | No | Instructions for the AI (e.g. "extract all line items from this receipt") |
SDKs
Node.js / TypeScript
import { IronAPI } from 'ironapi'; const client = new IronAPI('YOUR_API_KEY'); // Screenshot const screenshot = await client.screenshot({ url: 'https://github.com', darkMode: true }); // Scrape const page = await client.scrape({ url: 'https://example.com/blog/post', format: 'markdown' }); // AI Extract const product = await client.extract({ url: 'https://example.com/product/123', schema: { name: 'string', price: 'number' } });
Python
from ironapi import IronAPI client = IronAPI("YOUR_API_KEY") # Screenshot screenshot = client.screenshot(url="https://github.com", dark_mode=True) # Scrape page = client.scrape(url="https://example.com/blog", format="markdown") # AI Extract product = client.extract( url="https://example.com/product/123", schema={"name": "string", "price": "number"} )
cURL
# All endpoints follow the same pattern curl -X POST https://api.ironapi.uk/v1/{endpoint} \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ ... }'