REST

Site detail

Returns health score, KPIs, trend chart, and top pages for a single site. Use response_format=detailed to include full arrays.

GET/api/v1/sites/:siteId

Site overview

Returns a comprehensive overview for a single site including health score, KPIs, trend chart, and top pages. Use response_format=detailed to include full arrays; concise mode (the default) truncates arrays to 5 items.

Supports response_format=concise|detailed

Request

bash
curl -X GET \
  'https://letoseo.com/api/v1/sites/:siteId' \
  -H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Path parameters

NameTypeRequiredDescriptionDefault
siteIduuidrequiredThe site UUID.

Query parameters

NameTypeRequiredDescriptionDefault
period"7d" | "28d" | "90d"optionalTime period for KPIs and trend chart.28d
response_format"concise" | "detailed"optionalControls how much data is returned. concise truncates top-level arrays to 5 items; detailed returns everything.concise

Responses

200Site overview data.
json
{
  "data": {
    "site": {
      "id": "00000000-0000-0000-0000-000000000001",
      "name": "Acme Demo Co",
      "url": "https://acme-demo.example",
      "maturity": "established",
      "health_score": 72,
      "favicon_url": null,
      "organic_sessions_30d": 3850
    },
    "kpis": {
      "organic_sessions": {
        "label": "Organic Sessions",
        "value": 3850,
        "previousValue": 3420,
        "change": "+12.6%",
        "direction": "up",
        "insufficientData": false
      },
      "impressions": {
        "label": "Impressions",
        "value": 18400,
        "previousValue": 17100,
        "change": "+7.6%",
        "direction": "up",
        "insufficientData": false
      }
    },
    "trendChart": [
      {
        "date": "2025-01-08",
        "value": 128
      },
      {
        "date": "2025-01-09",
        "value": 137
      }
    ],
    "topPages": [
      {
        "url": "https://acme-demo.example/blog/example-post",
        "impressions_30d": 4200,
        "clicks_30d": 210,
        "ctr": 0.05,
        "avg_position": 8.3,
        "organic_sessions_30d": 185,
        "engagement_rate": 0.62
      }
    ],
    "period": "28d"
  },
  "_meta": {
    "generated_at": "2025-01-15T10:30:00.000Z",
    "site_id": "00000000-0000-0000-0000-000000000001",
    "site_url": "https://acme-demo.example",
    "response_format": "concise"
  }
}
404Site not found or not owned by the authenticated user.
json
{
  "error": "Site not found"
}