Analytics API

Track business performance and AI visibility metrics using the AIDP Analytics API.

Base URL

https://api.aidp.dev/v1

Authentication

All API requests require authentication via API key:

Authorization: Bearer YOUR_API_KEY

Endpoints

Get Upstream Metrics

Track how often your business appears in AI assistant responses.

GET /analytics/upstream-metrics

Query Parameters:

Parameter
Type
Required
Description

businessId

string

Yes

Business ID

startDate

string

Yes

Start date (ISO 8601)

endDate

string

Yes

End date (ISO 8601)

platform

string

No

Filter by AI platform

granularity

string

No

day, week, or month (default: day)

Example:

Response:

Metrics Explained:

  • Impressions: Times your business appeared in AI responses

  • Citations: Times your business was specifically mentioned

  • Comparisons: Times shown alongside competitors

  • Zero-Click: Visibility without user clicking through


Get Intent Journeys

Track how customers discover your business through AI conversations.

Query Parameters:

Parameter
Type
Required
Description

businessId

string

Yes

Business ID

startDate

string

Yes

Start date (ISO 8601)

endDate

string

Yes

End date (ISO 8601)

stage

string

No

Filter by journey stage

Journey Stages:

  • awareness - Initial discovery

  • consideration - Comparing options

  • intent - Showing purchase intent

  • conversion - Taking action

Example:

Response:


Get Attribution Data

Understand which touchpoints drive conversions.

Query Parameters:

Parameter
Type
Required
Description

businessId

string

Yes

Business ID

startDate

string

Yes

Start date (ISO 8601)

endDate

string

Yes

End date (ISO 8601)

model

string

No

Attribution model (default: multiTouch)

Attribution Models:

  • firstTouch - Credit to first interaction

  • lastTouch - Credit to last interaction

  • linear - Equal credit to all touchpoints

  • multiTouch - Weighted credit (default)

Example:

Response:


Get Competitive Benchmarks

Compare your performance against similar businesses.

Query Parameters:

Parameter
Type
Required
Description

businessId

string

Yes

Business ID

startDate

string

Yes

Start date (ISO 8601)

endDate

string

Yes

End date (ISO 8601)

category

string

No

Compare within category

location

string

No

Compare within location

Example:

Response:


Response Codes

Code
Description

200

Success

400

Bad Request - Invalid parameters

401

Unauthorized - Invalid API key

403

Forbidden - No access to this business

404

Business Not Found

429

Rate Limit Exceeded

500

Internal Server Error


Rate Limiting

  • Free Tier: 100 requests/day

  • Pro Tier: 1,000 requests/day

  • Enterprise: Custom limits


Examples

Node.js

Python

cURL


See Also


API Version: v1 Last Updated: December 2025

Last updated