API

Audiencelab Data Specifications

V1 API access to Audiencelab data on AWS S3

Audiencelab Data Specifications

1. Data Location

Storage

Data is stored on AWS S3 under the following bucket:

audiencelab-processed

Path Format

s3://audiencelab-processed/table={table_name}/year={year}/month={month}/day={day}/hour={hour}/api_key={your_api_key}/
  • {table_name}: Name of the table (e.g., PURCHASE, AD, basic_retention, etc.)
  • {year}/{month}/{day}/{hour}: Partitions based on UTC date and hour
  • {your_api_key}: The API key tied to the data

File Format

All files are stored as Parquet.


2. Data Movement

Data is delivered to S3 in hourly batches, usually around 20 minutes past each hour. Folders are partitioned by hour, where hour represents the start of the interval. For instance, data for 14:00–14:59 UTC resides in the folder hour=14.

Time Zone Details

  • Default: UTC-based partitioning
  • For ad network "_updated" tables, data retrieval uses the ad account's local time zone, as the updates roll up "yesterday's" data based on the local date in that time zone

3. Available Tables and Schemas

Below are the primary tables with their purposes, schemas, and partition examples. Note that some events contain utc_offset and local_time columns, enabling analysis by user's local time if desired.

3.1 Purchase Events (PURCHASE)

Description

Records all in-game purchase events.

Schema

FieldTypeDescription
creative_tokenstringCreative identifier
id (purchase_id)stringPurchase ID
name (purchase_name)stringPurchase name
statusstringPurchase status
device_modelstringDevice model
os_systemstringOperating system
currencystringCurrency code
valuefloatPurchase value
retention_dayfloatDay of retention
created_atstringTimestamp (YYYY-MM-DD HH:MM:SS)
datestringDate (YYYY-MM-DD)
utc_offsetstringUTC offset
local_timestringLocal timestamp (YYYY-MM-DD HH:MM:SS)

Partition Example

table=PURCHASE/year=2025/month=01/day=01/hour=00/api_key=your_api_key/

3.2 Ad Events (AD)

Description

Contains in-game ad view events, including any value attributed to each view.

Schema

FieldTypeDescription
creative_tokenstringCreative identifier
sourcestringAd source
media_sourcestringMedia source
channelstringAd channel
id (ad_id)stringAd ID
name (ad_name)stringAd name
rewardstringReward information
device_modelstringDevice model
os_systemstringOperating system
currencystringCurrency code
watch_timefloatWatch time in seconds
retention_dayfloatDay of retention
valuefloatAd value
created_atstringTimestamp (YYYY-MM-DD HH:MM:SS)
datestringDate (YYYY-MM-DD)
utc_offsetstringUTC offset
local_timestringLocal timestamp (YYYY-MM-DD HH:MM:SS)

Partition Example

table=AD/year=2025/month=01/day=01/hour=00/api_key=your_api_key/

3.3 Retention Events (basic_retention & rolling_retention)

Description

Includes basic retention data (basic_retention) and rolling retention data (rolling_retention). Rolling retention "fills in" missing active days between user sessions.

Schema

FieldTypeDescription
creative_tokenstringCreative identifier
device_modelstringDevice model
os_systemstringOperating system
retention_dayintDay of retention
backfill_dayintBackfill day
created_atstringTimestamp (YYYY-MM-DD HH:MM:SS)
start_datestringStart date (YYYY-MM-DD)
utc_offsetstringUTC offset
local_timestringLocal timestamp (YYYY-MM-DD HH:MM:SS)

Partition Examples

table=basic_retention/year=2025/month=01/day=01/hour=00/api_key=your_api_key/
table=rolling_retention/year=2025/month=01/day=01/hour=00/api_key=your_api_key/

3.4 Browser Metrics (browser_metrics_insert)

Description

Includes browser-specific usage metrics. Also contains rolling retention details that fill in missing active days between user sessions.

Schema

FieldTypeDescription
creative_tokenstringCreative identifier
browser_namestringBrowser name
device_vendorstringDevice vendor
os_systemstringOperating system
countintMetric count
created_atstringTimestamp (YYYY-MM-DD HH:MM:SS)
datestringDate (YYYY-MM-DD)

Partition Example

table=browser_metrics_insert/year=2025/month=01/day=01/hour=00/api_key=your_api_key/

3.5 Device Metrics (device_metrics)

Description

Contains device specifications and location details from user sessions.

Schema

FieldTypeDescription
creative_tokenstringCreative identifier
citystringCity
countrystringCountry
created_atstringTimestamp (YYYY-MM-DD HH:MM:SS)
device_modelstringDevice model
device_namestringDevice name
dpiintScreen DPI
gpu_renderedstringGPU renderer
gpu_vendorstringGPU vendor
gpu_versionstringGPU version
heightfloatScreen height
ispstringInternet service provider
latfloatLatitude
legacy_heightfloatLegacy screen height
legacy_widthfloatLegacy screen width
lonfloatLongitude
low_battery_levelboolLow battery indicator
orgstringOrganization
os_systemstringOperating system
region_namestringRegion name
timezonestringTimezone
widthfloatScreen width
zipstringZIP code

Partition Example

table=device_metrics/year=YYYY/month=MM/day=DD/hour=HH/api_key=your_api_key/

3.6 Ad Networks

Description

Contains ad network campaign data, with creative_token parsed from the URL. Two distinct table types exist:

  • {network} (e.g., meta): Data updated hourly with previous hour's metrics
  • {network}_updated (e.g., meta_updated): Data updated daily at 12 PM local ad account time, capturing finalized metrics (because hourly data can be retroactively adjusted) from previous day

Schema

FieldTypeDescription
creative_tokenstringCreative identifier
impressionsintNumber of impressions
clicksintNumber of clicks
spendfloatSpend in USD (converted using daily exchange rate)
spend_originalfloatOriginal spend in account currency
created_atstringTimestamp (YYYY-MM-DD HH:MM:SS)
datestringDate (YYYY-MM-DD)
run_atstringRun timestamp (YYYY-MM-DD HH:MM:SS)

Partition Examples (for Meta)

table=meta/year=2025/month=01/day=01/hour=00/api_key=your_api_key/
table=meta_updated/year=2025/month=01/day=01/api_key=your_api_key/

Supported Networks

  • meta, meta_updated
  • google, google_updated
  • tiktok, tiktok_updated

4. Metadata Table

Description

Provides data types and descriptions for each column in every table. Useful for programmatic referencing or dynamic schema verification.

Full Path

s3://audiencelab-processed/metadata.json

5. AudienceLab Metadata

Description

Offers the hierarchical structure of campaign data with AudienceLab entity IDs (campaigns, ad sets, etc.) tied via creative_token.

Path Example

s3://audiencelab-processed/table=metadata/api_key=your_api_key/creative_metadata.parquet

Important Notes

  • All timestamps are generally stored in UTC unless otherwise specified
  • For "_updated" tables, the local time zone of the ad account determines the "daily" cutoffs
  • The utc_offset and local_time fields (in relevant tables) enable local-time-based analytics