Skip to content

SDK Integration Guide

Start contributing real-time API health signals with a single line of code.

Getting Started

Get up and running with APIdown in three steps:

1
Create a free account

Sign up at apidown.net/login and generate an API key from your dashboard.

2
Install the SDK

Run npm install apidown-monitor (JavaScript) or pip install apidown (Python).

3
Initialize and deploy

Call apidown.init({ key: 'YOUR_KEY' }) in your app entry point. All outbound HTTP calls are automatically monitored.

JavaScript / Node.js

Install

npm install apidown-monitor

Initialize

import apidown from 'apidown-monitor';

apidown.init({ key: 'YOUR_SDK_KEY' });

// That's it — all fetch() and axios calls are automatically monitored.

Express / Node.js

const apidown = require('apidown-monitor');
apidown.init({ key: process.env.APIDOWN_KEY });

const express = require('express');
const app = express();

// All outbound API calls are now monitored

Next.js

// lib/apidown.js
import apidown from 'apidown-monitor';

if (typeof window === 'undefined') {
  if (!global._apidownInit) {
    apidown.init({ key: process.env.APIDOWN_KEY });
    global._apidownInit = true;
  }
}

SvelteKit

// src/hooks.server.js
import apidown from 'apidown-monitor';
apidown.init({ key: import.meta.env.APIDOWN_KEY });

Python

Install

pip install apidown

Initialize

import apidown

apidown.init(key='YOUR_SDK_KEY')

# All requests and httpx calls are automatically monitored.

Django

# manage.py or wsgi.py
import apidown, os
apidown.init(key=os.environ['APIDOWN_KEY'])

# All requests library calls automatically reported

FastAPI

import apidown, os
apidown.init(key=os.environ['APIDOWN_KEY'])

from fastapi import FastAPI
import httpx

app = FastAPI()

# httpx.Client is auto-patched

Configuration Options

OptionDefaultDescription
keyRequired. Your SDK key from apidown.net/dashboard
endpointingest.apidown.netOverride the ingest endpoint
flushInterval30000Milliseconds between batched transmissions
maxBatchSize100Maximum signals per batch
allowlist[]Only monitor these domains
denylist[]Never monitor these domains
debugfalseEnable console logging

Privacy

APIdown never captures request payloads, headers, authentication tokens, or any user data. Only domain, HTTP status code, response duration (ms), and timestamp are transmitted. All data is anonymized at the SDK level before transmission.

REST API Reference

APIdown provides public REST endpoints for programmatic access to status data.

Get API Status

GET /api-status/{slug}

Returns JSON status for a specific API. No authentication required.

Submit Signals

POST /v1/signals

Submit a batch of monitoring signals. Requires X-APIdown-Key header with your SDK key.

Generate API Key

POST /v1/keys

Generate a new SDK key. Requires authentication via bearer token.

Subscribe to Alerts

POST /v1/subscribe

Create an alert subscription for an API. Supports email, Slack, Discord, PagerDuty, Teams, and webhook channels.

Report an Issue

POST /v1/reports

Submit a manual issue report for an API to help the community.

SLA Report (Pro)

GET /v1/reports/sla?api_slug={slug}

Download an SLA compliance report in JSON format. Requires Pro tier.

Public /v1 API

Read-only status data, no API key and no account required. Every response uses the same envelope — { data, meta } on success and { error: { code, message } } on failure — and CORS is open for GET, so you can call it straight from a browser.

List tracked APIs

GET /v1/apis

Optional query parameters: category, status (operational, degraded, down), limit (max 200), offset. Includes signal-weighted p50/p95 for the last hour and an open-incident count per API.

curl https://apidown.net/v1/apis?status=down

Get one API

GET /v1/apis/{slug}

Current status plus a 24-hour window (latency, error rate, uptime), 30-day uptime and incident count, and any open incidents.

curl https://apidown.net/v1/apis/stripe

Monthly history

GET /v1/apis/{slug}/history?months=12

Month-by-month uptime, incident count, total downtime, and longest outage. Up to 24 months.

curl "https://apidown.net/v1/apis/aws-s3/history?months=6"

List incidents

GET /v1/incidents

Filter with api, severity, status, or open=true. Paginate with limit (max 200) and offset.

curl "https://apidown.net/v1/incidents?open=true&severity=critical"

OpenAPI specification

GET /v1/openapi.json

The full OpenAPI 3.1 document, for generating a typed client or importing into Postman or Insomnia.

MCP Server — let your AI agent check API status

APIdown exposes a read-only Model Context Protocol endpoint, so an AI coding agent can check whether a third-party API is actually down before it starts debugging your code.

POST /mcp

Add it to Claude Code

claude mcp add --transport http apidown https://apidown.net/mcp

Or add it to any MCP client config

{
  "mcpServers": {
    "apidown": {
      "type": "http",
      "url": "https://apidown.net/mcp"
    }
  }
}

Available tools

  • list_apis — every tracked API and its live status; filter by status or category
  • get_api_status — one API's status, 24-hour latency and error rate, 30-day uptime, open incidents
  • list_incidents — recent incidents, filterable by API, severity, or open-only
  • get_api_history — monthly uptime history for one API

No authentication is needed and there are no write tools — the endpoint can only read public status data.

Terminal CLI

Check an API without leaving your shell. No install and no key — the CLI reads the public /v1 API.

npx apidown stripe

Other commands:

npx apidown list --down            # only APIs currently impaired
npx apidown incidents openai       # recent incidents for one API
npx apidown openai --json | jq .status

The exit code reflects status — 0 operational, 2 degraded, 3 down, 1 usage error — so it can gate a script:

npx apidown stripe || echo "Holding the deploy"

Open Data & Feeds

Bulk downloads and subscribable feeds, all free and without an account.

Datasets

  • /data — schema, licence, and attribution details
  • /data/incidents.csv and /data/incidents.json — full incident history
  • /data/uptime.csv and /data/uptime.json — monthly uptime per API, last 24 months

Free to use commercially; please credit APIdown.net and link back.

Feeds

  • /incidents/rss — every incident across every API
  • /api/{slug}/rss — one API only
  • /category/{category}/rss — a whole category, e.g. /category/ai/rss

Point a feed reader, or a Slack/Discord RSS integration, at whichever scope you care about.

Weekly digest

  • /weekly — the API Weather Report, latest complete week
  • /weekly/{YYYY-Www} — any archived week, e.g. /weekly/2026-W31
  • /v1/weekly/latest — the same digest as JSON

Subscribe by email with the form in the site footer; every edition includes a one-click unsubscribe link.

Browser Notifications

Get a desktop or mobile notification when an API you watch goes down — no account and no email address required. Turn it on from any API page, or from My Stack to cover your whole watchlist at once.

Notifications are tied to the browser you enable them in, not to a person: we store the browser's opaque push endpoint and the API slugs you selected, nothing else. Revoke them any time from the same button, or from your browser's site settings.

Default threshold is major and above, so a minor blip won't interrupt you. Resolution notifications are always delivered if you were told about the outage.

Self-hosting APIdown? Browser notifications need a VAPID key pair (npx web-push generate-vapid-keys) in PUBLIC_VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY. Without them the feature is cleanly disabled and the UI says so rather than failing.

Manual Recording

For custom HTTP clients not auto-patched by the SDK:

// JavaScript
const start = Date.now();
try {
  const res = await myClient.get('https://api.stripe.com/v1/charges');
  apidown.record('api.stripe.com', res.statusCode, Date.now() - start);
} catch (e) {
  apidown.record('api.stripe.com', 0, Date.now() - start);
  throw e;
}
# Python
import apidown, time
start = time.time()
try:
    resp = await session.get('https://api.stripe.com/v1/charges')
    apidown.record('api.stripe.com', resp.status, int((time.time()-start)*1000))
except Exception:
    apidown.record('api.stripe.com', 0, int((time.time()-start)*1000))
    raise

Troubleshooting

Signals not appearing in dashboard

Ensure your SDK key is correct and active. Check that apidown.init() is called before any HTTP requests. Enable debug: true in the config to see console output.

SDK conflicts with existing interceptors

APIdown patches fetch, axios, and requests at the module level. If you have custom interceptors, ensure APIdown is initialized first. Use the allowlist or denylist config to control which domains are monitored.

High signal volume / rate limiting

The SDK batches signals and respects rate limits automatically. Free tier allows 10,000 signals/day; Pro allows 100,000. Increase flushInterval or use allowlist to reduce volume.

SDK not initializing in serverless environments

In Lambda/Vercel/Cloudflare Workers, call init() outside the handler to avoid re-initialization on each invocation. Use the global guard pattern shown in the Next.js example above.