Data API Reference

Last Updated: 2026-03-14

The Stellar Data API lets you programmatically access your experiment data. Use it to integrate A/B test results into your own dashboards, reporting tools, or internal platforms.

Pro Feature: The Data API is available on Pro plans only. Generate your API key from Domains → View Settings → API Access.

Authentication

All API requests require a valid API key sent via the Authorization header using the Bearer scheme:

curl -H "Authorization: Bearer stl_YOUR_API_KEY" \
  https://api.gostellar.app/v1/experiments

To generate an API key, go to your Domains page, click View Settings on the domain you want, and look for the API Access section. Only the project owner can create or revoke keys.

Keep your API key secret. Do not expose it in client-side code, public repositories, or browser requests. Treat it like a password.

Rate Limits

The API is rate-limited to 60 requests per minute per IP address. If you exceed this limit, you will receive a 429 Too Many Requests response. The response includes standard RateLimit-* headers so you can track your remaining quota.

List Experiments

GET /v1/experiments

Returns all experiments for the project associated with your API key.

Query Parameters

ParameterTypeDescription
statusstringFilter by status: running, paused, completed, or pending

Example Request

curl -H "Authorization: Bearer stl_YOUR_API_KEY" \
  "https://api.gostellar.app/v1/experiments?status=running"

Example Response

{
  "experiments": [
    {
      "id": 142,
      "name": "Homepage Hero CTA Test",
      "status": "running",
      "type": "split_url",
      "url": "https://example.com",
      "traffic": 100,
      "started_at": "2026-02-01T00:00:00.000Z",
      "paused_at": null,
      "ended_at": null,
      "created_at": "2026-01-28T14:30:00.000Z"
    },
    {
      "id": 138,
      "name": "Pricing Page Layout",
      "status": "running",
      "type": null,
      "url": "https://example.com/pricing",
      "traffic": 100,
      "started_at": "2026-01-15T00:00:00.000Z",
      "paused_at": null,
      "ended_at": null,
      "created_at": "2026-01-14T10:00:00.000Z"
    }
  ]
}

Get Experiment

GET /v1/experiments/:id

Returns full details for a single experiment, including variants with performance stats, associated conversions, and statistical significance.

Query Parameters

ParameterTypeDescription
goalIdintegerConversion (goal) ID to compute stats against. Defaults to the experiment's main conversion.
fromdateStart of date range filter (inclusive), e.g. 2026-01-01
todateEnd of date range filter (inclusive), e.g. 2026-01-31

Example Request

curl -H "Authorization: Bearer stl_YOUR_API_KEY" \
  "https://api.gostellar.app/v1/experiments/142?from=2026-02-01&to=2026-02-28"

Example Response

{
  "id": 142,
  "name": "Homepage Hero CTA Test",
  "status": "running",
  "type": "split_url",
  "url": "https://example.com",
  "traffic": 100,
  "started_at": "2026-02-01T00:00:00.000Z",
  "paused_at": null,
  "ended_at": null,
  "created_at": "2026-01-28T14:30:00.000Z",
  "goals": [
    {
      "id": 55,
      "name": "CTA Click",
      "type": "CLICK",
      "value": null,
      "is_main": true
    },
    {
      "id": 60,
      "name": "Signup",
      "type": "PAGE_VISIT",
      "value": null,
      "is_main": false
    }
  ],
  "variants": [
    {
      "id": 301,
      "name": "Control",
      "is_control": true,
      "traffic": 50,
      "url": "https://example.com",
      "unique_visitors": 1243,
      "conversions": 48,
      "conversion_rate": 3.86,
      "squashed_conversions": 45,
      "squashed_conversion_rate": 3.62
    },
    {
      "id": 302,
      "name": "Variant A - New Hero",
      "is_control": false,
      "traffic": 50,
      "url": "https://example.com/new-hero",
      "unique_visitors": 1198,
      "conversions": 62,
      "conversion_rate": 5.18,
      "squashed_conversions": 58,
      "squashed_conversion_rate": 4.84
    }
  ],
  "statistical_significance": 92.3
}

Response Fields

Experiment
FieldTypeDescription
idintegerUnique experiment identifier
namestringHuman-readable experiment name
statusstringOne of: running, paused, completed, pending
typestring | nullExperiment type (e.g. split_url) or null for visual editor tests
urlstringTarget URL of the experiment
trafficintegerPercentage of total traffic allocated to this experiment (0-100)
statistical_significancenumber | nullBayesian probability (0-100) that the winning variant is better. Only computed for two-variant experiments. null if not applicable.
Variant
FieldTypeDescription
idintegerUnique variant identifier
namestringVariant name (e.g. "Control", "Variant A")
is_controlbooleanWhether this variant is the baseline control
trafficintegerTraffic allocation percentage
urlstring | nullVariant URL (for split-URL experiments)
unique_visitorsintegerNumber of unique visitors who saw this variant
conversionsintegerTotal conversion events (a single visitor may convert multiple times)
conversion_ratenumberConversion rate as a percentage (conversions / unique_visitors * 100)
squashed_conversionsintegerUnique visitors who converted (each visitor counted at most once)
squashed_conversion_ratenumberSquashed conversion rate as a percentage
Goal (Conversion)
FieldTypeDescription
idintegerGoal ID. Pass this as the goalId query parameter to compute stats against a specific conversion.
namestringHuman-readable name (e.g. "CTA Click")
typestringOne of: CLICK, PAGE_VISIT, SESSION_TIME, CUSTOM, SHOPIFY_PURCHASE
valuenumber | nullMonetary value per conversion (if set)
is_mainbooleanWhether this is the primary conversion for the experiment

Error Handling

The API returns standard HTTP status codes. All error responses include a JSON body with an error field:

{
  "error": "Description of what went wrong"
}
StatusMeaning
400Bad request — invalid parameters (e.g. malformed experiment ID or unknown status filter)
401Unauthorized — missing, invalid, or expired API key
403Forbidden — the project does not have a Pro plan
404Not found — experiment does not exist or does not belong to your project
429Rate limited — too many requests, wait and retry
500Internal server error — something went wrong on our end

Need help? If you run into issues integrating with the Data API, reach out to us at hello@gostellar.app.