Humblytics API: Full Analytics, Funnels & A/B Testing for AI Agents

The Humblytics API gives AI agents programmatic access to traffic analytics, click and form data, funnel analysis, and A/B testing. Connect Claude, Cursor, or any agent to read your data and run experiments automatically.

Humblytics API: Full Analytics, Funnels & A/B Testing for AI Agents

Want to see this in action?

Run A/B tests, track funnels, and get agent-powered insights — free for 14 days.

Try Humblytics Free

Humblytics API: Full Analytics, Funnels & A/B Testing for AI Agents

The Humblytics API gives your AI agents full programmatic access to your analytics data — traffic trends, page performance, click tracking, form submissions, funnel analysis, and A/B split testing. Connect Claude, Cursor, or any LLM-powered workflow and let it read your data, identify opportunities, and run experiments automatically.

This is the first analytics API designed specifically for agent workflows. Your agent reads your analytics data, identifies what to test, and runs the experiment — all through simple REST calls.

Why This Matters

Most A/B testing still requires a human to log in, read a dashboard, form a hypothesis, configure an experiment, and wait. That workflow breaks down when you want to:

  • Run tests at scale across dozens of pages without manual setup
  • React to data in real time — if bounce rate spikes on a page, your agent can immediately test a fix
  • Integrate testing into CI/CD pipelines — deploy a new landing page and auto-create a split test
  • Let non-technical teams describe what they want and have an agent handle the rest

The new API endpoints handle all of this.

How It Works: Two Endpoints, Full Automation

Step 1 — Get Recommendations

Your agent calls the recommendations endpoint with a page path. Humblytics analyzes your traffic data, heatmaps, and click patterns, then returns specific, actionable test ideas with element selectors already attached.

GET /api/external/v1/properties/{property_id}/split-test-recommendations?page=/home
Authorization: Bearer hmbly_your_api_key

The response includes:

  • Overall analysis — a plain-language summary of the page's performance issues
  • Key insights — specific data points your agent can reason about (e.g., "CTA button receives only 3% of clicks despite above-the-fold placement")
  • Recommendations — each with an element selector, the current value, a suggested variant, a confidence score, and expected impact
{
  "meta": {
    "property_id": "prop_abc123",
    "page": "/home",
    "page_url": "https://yoursite.com/home"
  },
  "overall_analysis": "Your hero section has high traffic but a 78% bounce rate...",
  "key_insights": [
    "CTA button receives only 3% of clicks despite above-the-fold placement"
  ],
  "recommendations": [
    {
      "id": "rec_1",
      "title": "Hero CTA Text",
      "element_selector": "button.hero-cta",
      "element_type": "button",
      "change_type": "text",
      "control_value": "Learn More",
      "variant_value": "Start Free Trial",
      "confidence_score": 84,
      "expected_impact": "High: 8%+"
    },
    {
      "id": "rec_2",
      "title": "Hero CTA Color",
      "element_selector": "button.hero-cta",
      "element_type": "button",
      "change_type": "css",
      "control_value": "{ \"backgroundColor\": \"#6b7280\" }",
      "variant_value": "{ \"backgroundColor\": \"#ff6b35\" }",
      "confidence_score": 71,
      "expected_impact": "Medium: 3-8%"
    }
  ]
}

Each recommendation includes element_selector and change_type values that map directly to the split test creation endpoint — your agent can pipe recommendations straight into a new experiment.

Step 2 — Create the Split Test

Your agent takes the selectors and values from Step 1 and creates a no-code split test. No snippet changes, no visual editor — just a POST request.

POST /api/external/v1/properties/{property_id}/split-tests
Authorization: Bearer hmbly_your_api_key
Content-Type: application/json
{
  "name": "Hero CTA Optimization",
  "page": "/home",
  "type": "nocode",
  "goal": "click_through",
  "auto_stop_days": 14,
  "variants": [
    {
      "label": "Variant B — new copy + color",
      "changes": [
        {
          "selector": "button.hero-cta",
          "op": "text",
          "value": "Start Free Trial"
        },
        {
          "selector": "button.hero-cta",
          "op": "css",
          "value": { "backgroundColor": "#ff6b35" }
        }
      ]
    }
  ]
}

The response confirms the experiment is live:

{
  "experiment_id": "exp_xyz789",
  "name": "Hero CTA Optimization",
  "status": "active",
  "created_at": "2026-03-27T10:00:00.000Z",
  "variants": [
    { "label": "Control", "is_control": true, "changes": [] },
    {
      "label": "Variant B — new copy + color",
      "is_control": false,
      "changes": [
        { "selector": "button.hero-cta", "op": "text", "value": "Start Free Trial" },
        { "selector": "button.hero-cta", "op": "css", "value": { "backgroundColor": "#ff6b35" } }
      ]
    }
  ]
}

Humblytics automatically creates the control variant from the live page. Your agent only needs to define what changes.

Use Cases

1. Autonomous CRO Agent

Give your agent a list of high-traffic pages and let it loop:

  1. Call the recommendations endpoint for each page
  2. Filter recommendations by confidence score (e.g., only run tests with 70%+ confidence)
  3. Create split tests for the top recommendations
  4. Check back after the test duration to read results

Your agent handles the entire optimization cycle without anyone opening a dashboard.

2. Post-Deploy Testing

Wire the API into your deployment pipeline. Every time a new landing page ships, your agent:

  1. Waits for initial traffic data to accumulate (24-48 hours)
  2. Pulls recommendations based on real user behavior
  3. Launches a split test on the highest-impact element
  4. Reports results back to your team in Slack or a PR comment

3. Conversion Recovery

Monitor your analytics for pages where conversion rate drops. When your agent detects a regression:

  1. Pull recommendations for the affected page
  2. Create a split test targeting the elements most likely to recover performance
  3. Auto-stop the test when significance is reached

4. Bulk Page Optimization

Agencies managing multiple client sites can automate testing across all properties:

  1. Iterate through each property and its top pages
  2. Pull recommendations in batch
  3. Create experiments programmatically
  4. Generate a weekly report of running tests and results

How to Use This with Claude or Cursor

You can instruct Claude Code, Cursor, or any LLM-powered coding agent to use these endpoints directly. Here is how to set it up.

Give Your Agent These Instructions

Add the following to your project's CLAUDE.md, .cursorrules, or system prompt:

## Humblytics Analytics & A/B Testing API

When analyzing site performance or optimizing pages, use the Humblytics API:

- **API Base**: https://app.humblytics.com/api/external/v1
- **Auth**: Bearer token in Authorization header (stored in HUMBLYTICS_API_KEY env var)
- **Property ID**: stored in HUMBLYTICS_PROPERTY_ID env var

### Read Analytics Data
GET /properties/{property_id}/traffic/summary?start=...&end=...&timezone=...
GET /properties/{property_id}/traffic/trends?start=...&end=...&timezone=...&granularity=day
GET /properties/{property_id}/pages/breakdown?start=...&end=...&timezone=...
GET /properties/{property_id}/clicks/details?page=/path&start=...&end=...&timezone=...

### Run Funnels
GET /properties/{property_id}/funnels?steps=[...]&start=...&end=...&timezone=...
GET /properties/{property_id}/funnels/suggestions?page=/path

### Get Split Test Recommendations
GET /properties/{property_id}/split-test-recommendations?page={page_path}

Returns AI-powered test recommendations with element selectors, confidence scores, and expected impact. Use this before creating any split test.

### Create Split Test
POST /properties/{property_id}/split-tests

Body: { name, page, type: "nocode", goal, auto_stop_days, variants: [{ label, changes: [{ selector, op, value }] }] }

### Workflow
1. Read traffic and click data to identify underperforming pages
2. Get recommendations for those pages — do not guess selectors or changes
3. Only create tests for recommendations with confidence_score >= 70
4. Set auto_stop_days to 14 unless specified otherwise
5. Use goal "click_through" for CTA tests, "conversion" for form/checkout tests

Example Prompts for Your Agent

"Pull a traffic summary for the last 30 days. Identify the top 5 pages by pageviews with a bounce rate above 60%. For each, get split test recommendations and create experiments for any suggestion with 75%+ confidence."

"Run a funnel analysis for /pricing → /signup → /onboarding over the last 14 days. Where is the biggest drop-off?"

"Check realtime traffic. If any page has more than 50 active visitors, pull click data for that page and flag any CTA with below-average click rate."

Your agent will chain these API calls, reason about the data, and take action — no manual dashboard work needed.

Full API Reference

The split test endpoints above are just one part of the API. Here is the complete endpoint reference — every data source your agent can read and every action it can take.

All endpoints below are relative to:

https://app.humblytics.com/api/external/v1

Traffic

| Method | Endpoint | Description | |--------|----------|-------------| | GET | properties/{propertyId}/traffic/trends | Timeseries pageviews and unique visitors | | GET | properties/{propertyId}/traffic/summary | Aggregate metrics: pageviews, sessions, bounce rate, avg session duration | | GET | properties/{propertyId}/traffic/realtime | Live visitor count and feed (no date params required) | | GET | properties/{propertyId}/traffic/breakdown | Device, location, referrer, and UTM breakdowns | | GET | properties/{propertyId}/traffic/entry-exit-pages | Top entry and exit pages |

Pages

| Method | Endpoint | Description | |--------|----------|-------------| | GET | properties/{propertyId}/pages/breakdown | All page performance: views, visitors, scroll depth, bounce rate | | GET | properties/{propertyId}/pages/details | Single page deep dive with UTM, device, and country breakdowns. Requires ?page=/path |

Clicks

| Method | Endpoint | Description | |--------|----------|-------------| | GET | properties/{propertyId}/clicks/breakdown | Click data across all pages with top targets | | GET | properties/{propertyId}/clicks/details | Clicks for a specific page with UTM attribution. Requires ?page=/path |

Forms

| Method | Endpoint | Description | |--------|----------|-------------| | GET | properties/{propertyId}/forms/breakdown | Form submissions across all pages | | GET | properties/{propertyId}/forms/details | Form details for a specific page with conversion rates. Requires ?page=/path |

Funnels

| Method | Endpoint | Description | |--------|----------|-------------| | GET | properties/{propertyId}/funnels | Run a funnel query. Params: steps (JSON), start, end, timezone, mode (unbounded or sequential), breakdownBy | | GET | properties/{propertyId}/funnels/sankey | Sankey path diagram for a funnel. Same params as /funnels plus maxPaths, minSessions | | GET | properties/{propertyId}/funnels/suggestions | AI-generated funnel suggestions for a page. Requires ?page=/path | | GET | properties/{propertyId}/saved-funnels | List all saved funnel configurations | | POST | properties/{propertyId}/saved-funnels | Create a saved funnel. Body: { name, steps }. Include id to update existing | | DELETE | properties/{propertyId}/saved-funnels/{funnelId} | Delete a saved funnel |

Split Tests

| Method | Endpoint | Description | |--------|----------|-------------| | GET | properties/{propertyId}/split-tests | List experiments. Optional ?status=active or ?status=complete | | GET | properties/{propertyId}/split-tests/{experimentId} | Experiment details with per-variant metrics | | POST | properties/{propertyId}/split-tests | Create a split test. Body: { name, page, type: "nocode", variants: [{ label, changes }], goal?, auto_stop_days? } | | PATCH | properties/{propertyId}/split-tests/{experimentId} | Update an active experiment. Body: { name?, auto_stop_days? } | | POST | properties/{propertyId}/split-tests/{experimentId}/stop | Stop a running experiment. Body: { reason? } | | GET | properties/{propertyId}/split-test-recommendations | AI split test suggestions for a page. Requires ?page=/path |

Multi-Property Aggregate

For agencies and teams managing multiple properties, these POST endpoints accept { propertyIds: [...] } in the request body to aggregate data across properties.

| Method | Endpoint | Description | |--------|----------|-------------| | POST | properties/aggregate/traffic/trends | Aggregate traffic trends | | POST | properties/aggregate/traffic/summary | Aggregate traffic summary | | POST | properties/aggregate/traffic/breakdown | Aggregate breakdowns | | POST | properties/aggregate/traffic/realtime | Aggregate realtime | | POST | properties/aggregate/traffic/entry-exit-pages | Aggregate entry/exit pages | | POST | properties/aggregate/clicks/breakdown | Aggregate clicks | | POST | properties/aggregate/forms/breakdown | Aggregate forms |

Query Parameters

Most endpoints accept these common query parameters:

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | start | ISO 8601 | Yes | Start datetime | | end | ISO 8601 | Yes | End datetime | | timezone | string | Yes | IANA timezone (e.g., America/New_York) | | granularity | string | For trends | hour, day, week, or month | | limit | number | No | Max results (default: 50) | | page | string | For details | URL path to filter (e.g., /pricing) | | source | string | No | Filter forms by source |

Authentication

All API requests require a Bearer token:

Authorization: Bearer hmbly_your_api_key

Generate your API key from Settings → API Access in the Humblytics dashboard. API access is available on Scale and Enterprise plans.

Get Started

  1. Grab your API key from app.humblytics.com
  2. Find your property ID in your dashboard URL or property settings
  3. Make your first recommendations call
  4. Let your agent take it from there

The API is live now. If you are already using Humblytics, you can start making requests today.

Replace 3 tools with 1

See which page changes drive revenue.

Launch your first A/B test in 60 seconds. Connect ad spend to real Stripe revenue. Let your agent tell you what to test next — all without a single developer ticket.