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

PlanRequests/minMonthly Quota
Free10100
Starter ($9)602,000
Pro ($29)20010,000
Business ($99)50050,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
  }
}
StatusCodeDescription
400bad_requestInvalid request parameters
401unauthorizedMissing or invalid API key
429rate_limit_exceededToo many requests
500internal_errorSomething went wrong on our end
📸

Screenshot API

Capture any webpage as a high-quality image or PDF.

POST /v1/screenshot

Request Body

ParameterTypeRequiredDescription
urlstringYesURL to capture
formatstringNopng (default), jpeg, webp, pdf
widthnumberNoViewport width. Default: 1280
heightnumberNoViewport height. Default: 720
fullPagebooleanNoCapture full page scroll. Default: false
darkModebooleanNoForce dark color scheme. Default: false
delaynumberNoWait ms before capture. Default: 0
qualitynumberNoImage 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

ParameterTypeRequiredDescription
urlstringYesURL to scrape
formatstringNomarkdown (default), text, html
waitForstringNoCSS selector to wait for before extracting
includeMetadatabooleanNoInclude 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

ParameterTypeRequiredDescription
urlstringYesURL to extract data from
schemaobjectYesJSON schema defining expected output fields and types
promptstringNoAdditional 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

ParameterTypeRequiredDescription
urlstring*URL to convert (provide url OR html)
htmlstring*Raw HTML to convert (provide url OR html)
formatstringNoA4 (default), Letter, Legal
landscapebooleanNoLandscape orientation. Default: false
marginobjectNo{ top, right, bottom, left } in px/cm/in
printBackgroundbooleanNoInclude 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

ParameterTypeRequiredDescription
templatestringYesblog, product, social, minimal, or custom HTML
dataobjectYesTemplate variables (title, subtitle, image, etc.)
widthnumberNoImage width. Default: 1200
heightnumberNoImage 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

ParameterTypeRequiredDescription
imagestringYesImage URL or base64-encoded data
schemaobjectNoExpected output schema (like AI Extract)
promptstringNoInstructions 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 '{ ... }'