Web Analyzer App
/ Docs

Developer

API Reference

Pull your analytics data into any tool, dashboard, or automation — with a simple REST API.

1. Authentication

All API endpoints require a valid API key passed as a Bearer token in the Authorization header. Generate keys in your profile settings. API access requires a Pro plan.

Request header

Authorization: Bearer waa_YOUR_API_KEY
Base URL: https://webanalyzerapp.com/api/v1
Property Value
Rate limit60 requests / minute per key
Response formatJSON (UTF-8)
Date parametersYYYY-MM-DD (UTC)
Default date rangeLast 30 days when from / to are omitted

2. Errors

All error responses return JSON with an error code and a human-readable message.

HTTP status Error code Meaning
401 unauthenticated No Authorization header provided.
401 invalid_api_key The key does not exist or has been revoked.
403 pro_required Your account is not on a Pro plan.
404 Website not found or does not belong to your account.
422 Validation error — check the errors field.
429 Rate limit exceeded (60 req/min per key).

3. Websites

List all websites

GET /api/v1/websites

Returns all websites in your account.

Response

{
  "data": [
    {
      "id": 1,
      "name": "My Store",
      "domain": "https://mystore.com",
      "tracking_key": "a1b2c3d4e5f6",
      "is_verified": true,
      "created_at": "2025-01-15T10:00:00Z"
    }
  ]
}

Get a website

GET /api/v1/websites/{id}

Returns details for a single website.

Response

{
  "data": {
    "id": 1,
    "name": "My Store",
    "domain": "https://mystore.com",
    "tracking_key": "a1b2c3d4e5f6",
    "timezone": "Europe/Istanbul",
    "is_verified": true,
    "created_at": "2025-01-15T10:00:00Z"
  }
}

4. Summary (KPIs)

GET /api/v1/websites/{id}/summary

Returns key performance indicators for the given date range.

ParameterDescription
fromStart date YYYY-MM-DD (default: 30 days ago)
toEnd date YYYY-MM-DD (default: today)

Response

{
  "data": {
    "from": "2025-01-01",
    "to": "2025-01-31",
    "visitors": 1240,
    "sessions": 1880,
    "page_views": 5430,
    "events": 320,
    "bounce_rate": 42.5,
    "avg_duration": 187
  }
}

5. Top pages

GET /api/v1/websites/{id}/pages

Returns the most-visited pages ranked by view count.

ParameterDescription
fromStart date (default: 30 days ago)
toEnd date (default: today)
limitMax rows 1–100 (default: 20)

Response

{
  "data": [
    {
      "path": "/pricing",
      "views": 820,
      "visitors": 540,
      "sessions": 610,
      "bounce_rate": 35.2,
      "avg_time": 145
    }
  ],
  "meta": { "from": "2025-01-01", "to": "2025-01-31" }
}

6. Traffic sources

GET /api/v1/websites/{id}/sources

Returns session counts broken down by acquisition channel (organic, direct, referral, paid, email, social).

ParameterDescription
fromStart date (default: 30 days ago)
toEnd date (default: today)

Response

{
  "data": [
    { "channel": "organic",  "sessions": 640, "pct": 34.0 },
    { "channel": "direct",   "sessions": 510, "pct": 27.1 },
    { "channel": "referral", "sessions": 290, "pct": 15.4 }
  ],
  "meta": { "from": "2025-01-01", "to": "2025-01-31" }
}

7. Events

GET /api/v1/websites/{id}/events

Returns custom event counts. Pass name to filter to a specific event type.

ParameterDescription
fromStart date (default: 30 days ago)
toEnd date (default: today)
nameFilter to a specific event name (optional)

Response

{
  "data": [
    {
      "name": "signup",
      "count": 142,
      "last_triggered": "2025-01-31T18:45:00.000000Z"
    },
    {
      "name": "checkout",
      "count": 87,
      "last_triggered": "2025-01-31T17:22:00.000000Z"
    }
  ],
  "meta": { "from": "2025-01-01", "to": "2025-01-31" }
}

8. Quick start

Fetch your 30-day KPIs with a single curl command:

curl

curl https://webanalyzerapp.com/api/v1/websites/1/summary \
  -H "Authorization: Bearer waa_YOUR_API_KEY" \
  -H "Accept: application/json"

Or with JavaScript (fetch):

JavaScript

const res = await fetch(
  'https://webanalyzerapp.com/api/v1/websites/1/summary?from=2025-01-01&to=2025-01-31',
  { headers: { 'Authorization': 'Bearer waa_YOUR_API_KEY' } }
);
const { data } = await res.json();
console.log(`${data.visitors} visitors · ${data.sessions} sessions`);
Generating your key: Go to Profile → API Keys, enter a name for the key (e.g. "Zapier integration"), and click Generate key. Copy the token immediately — it is shown only once.