LogoLogo
Help CenterStatusContact
  • Chartbeat Documentation
  • Implement Tracking
    • Standard Websites
      • Adding chartbeat.js to Your Site
      • Customize Tracking Settings
      • Tracking Virtual Page Change
      • User Subscriber Status
      • Alternative Site Integrations
      • Integration QA Steps: Website
      • Additional Page Metadata
    • Google AMP
      • Chartbeat Code for AMP
      • AMP Configuration Variables
      • Alternative AMP Integration
      • Integration QA Steps: AMP
    • Mobile App SDKs
      • Intro to Mobile App Tracking
      • Android SDK
      • iOS SDK
      • Integration QA Steps: Mobile Apps
  • Feature Integrations
    • Headline and Image Testing
      • Adding chartbeat_mab.js to Your Site
      • Image Compatibility
      • Flicker & Flicker Control
      • mab.js Specifications
      • Integration QA Steps: Headline and Image Testing
    • Video Engagement
      • Adding chartbeat_video.js to Your Site
      • Supported OVP Integrations
      • Custom Player Integration SDK
      • Configure Video Tracking Settings
      • Integration QA: Video Tracking
    • Conversion
      • Adding subscriptions.js to Your Site
      • Conversion Events
      • Integration QA Steps: Conversion
      • Supported Conversion Flows
  • API Docs
    • Real-Time API
      • Getting Started with our Real-Time API
      • Traffic Data
      • Video Engagement Data
    • Historical API
      • Getting Started with our Historical API
      • One-time Queries
      • Recurring Queries
      • Metrics, Dimensions, and Filters
    • Headline Testing API
      • Getting Started with our Headline Testing API
      • Raw Data
      • Summary Report
      • Variant Report
    • Conversion API
      • Getting Started with our Conversion API
      • Top Articles
    • Data Lab API
      • Getting Started with Data Lab API
  • Help Center
  • Contact Support
  • Datastream Docs
  • Back to Chartbeat.com
Powered by GitBook
On this page
  • Required API parameters
  • Example CURL request
  • Optional parameters
  • Next steps

Was this helpful?

  1. API Docs
  2. Headline Testing API

Getting Started with our Headline Testing API

Get familiar with our Headline Testing API for fetching headline testing data with specified start and end times.

PreviousHeadline Testing APINextRaw Data

Last updated 7 months ago

Was this helpful?

Our Headline Testing API endpoints can be used to retrieve active and archive headline test data for your site in JSON format programmatically.

The API can be accessed by users with "View Only" or "Run Headline Tests" for a site, using an "all" API key.

Required API parameters

API Key: To be passed in the HTTP Header with "X-CB-AK". You can create and access your under your account settings. Make sure to select an API key that has access to all calls for your domain.

Example CURL request

curl --header "X-CB-AK: <YOUR API KEY>" "https://api.chartbeat.com/mab/htapi/v1/experiments/raw_data/?host=YOUR_HOST.com&start=2024-01-01&end=2024-01-01&tz=America/New_York&status=active"

The following parameters are necessary to include in all queries:

Parameter Name

Syntax

Description

API Key (see note)

apikey=

Host

host=

The Site you are querying (site ID is usually your website's root domain).

Start Date

start=

A valid date string in YYYY-MM-DD format.

End Date

end=

A valid date string in YYYY-MM-DD format.

Timezone

tz=

The timezone you'd like to run the query in a valid Olson timezone format, e.g. America/New_York.

Optional parameters

Raw data returns comprehensive details about each headline test.

Parameter Name

Syntax

Description

Status

status=

Status of the headline test. Choose from 'active', 'archived', 'all'. Defaults to 'all'. Note that this parameter is only available for raw data endpoint.

Limit

limit=

The number of rows you'd like to pull in your query. Large calls are susceptible to 504 gateway timeouts, so we recommend setting no more than 10,000 rows.

Test Type

test_type=

Chose from "headline","image","headline_and_image". Defaults to "all" which includes all 3.

Next steps

Check out the next three pages of this guide to find all the information you need to get started using our Headline Testing API.

NOTE: Your API key should no longer be set as a query param; instead,

permissions
API key here
Raw Data
Summary Report
Variant Report
pass it in the HTTP header