API Quickstart

This quickstart covers the essentials: authentication, generating your first report, and reading the response. The full technical documentation with every endpoint is available inside your account.

Introduction

The InspectWP API allows you to programmatically analyze WordPress websites and retrieve detailed reports about plugins, themes, security, SEO, performance, and more.

Response Format

All API responses follow a consistent JSON envelope format:

Success Response

{
  "success": true,
  "data": { ... },
  "meta": { ... }
}

Error Response

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Description",
    "status": 400
  }
}

Authentication

All API requests require a Bearer token in the Authorization header. Tokens are prefixed with iwp_ and are valid for 365 days.

Create your API token in the API Dashboard.

Example Header

Authorization: Bearer iwp_your_api_token_here

Authentication Errors

If the token is missing or invalid, the API returns a 401 Unauthorized response:

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API token. Provide a valid Bearer token in the Authorization header.",
    "status": 401
  }
}

Quick Start

1

Create an API token

Go to the API Dashboard and create a new API token.

2

Make your first request

Use your token to generate a WordPress analysis report:

curl -X POST https://inspectwp.com/api/generate-report \
  -H "Authorization: Bearer iwp_your_token" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'
const response = await fetch('https://inspectwp.com/api/generate-report', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer iwp_your_token',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ url: 'https://example.com' })
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    'https://inspectwp.com/api/generate-report',
    headers={
        'Authorization': 'Bearer iwp_your_token',
        'Content-Type': 'application/json'
    },
    json={'url': 'https://example.com'}
)

data = response.json()
print(data)
$ch = curl_init('https://inspectwp.com/api/generate-report');

curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer iwp_your_token',
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => json_encode(['url' => 'https://example.com'])
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);

print_r($data);
3

Get the results

The response contains the full analysis report with all sections.

Report generation can take 20-90 seconds as the website is being analyzed in real-time.

Looking for the complete API reference with all endpoints, error codes, and response schemas? The full documentation is available once you are signed in. Open the full API documentation.