Generate a product performance report PDF
curl --request GET \
--url https://app.promptingco.com/api/v1/weekly-reports/generate \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.promptingco.com/api/v1/weekly-reports/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/weekly-reports/generate"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"ok": true,
"data": {
"report": {
"product": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"period": {
"from": "<string>",
"to": "<string>",
"days": 123,
"kind": "week",
"previousFrom": "<string>",
"previousTo": "<string>"
},
"generatedAt": "<string>",
"sov": 123,
"previousSov": 123,
"changePercentagePoints": 123,
"inferenceVisits": 123,
"models": [
{
"engine": "<string>",
"name": "<string>",
"sov": 123
}
],
"rankings": [
{
"productId": "<string>",
"name": "<string>",
"sov": 123,
"rank": 123
}
],
"topics": [
{
"id": "<string>",
"title": "<string>",
"sov": 123,
"status": "winning"
}
],
"unavailable": [
"<string>"
],
"v2": {
"recommendationRate": 123,
"previousRecommendationRate": 123,
"recommendationChangePercentagePoints": 123,
"perceptions": {
"positive": [
{
"label": "<string>",
"count": 123,
"quote": "<string>"
}
],
"negative": [
{
"label": "<string>",
"count": 123,
"quote": "<string>"
}
]
},
"pagesCited": 123,
"citedPages": [
{
"hostname": "<string>",
"path": "<string>",
"citations": 123,
"title": "<string>"
}
],
"visitedPages": [
{
"hostname": "<string>",
"path": "<string>",
"visits": 123,
"title": "<string>"
}
],
"includePerception": true,
"showRecommendationRate": true,
"pinnedCompetitors": [
{
"productId": "<string>",
"name": "<string>"
}
],
"totalPages": 123,
"citationRate": 123
}
},
"file": {
"filename": "<string>",
"contentType": "application/pdf",
"base64": "<string>"
}
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Visibility & Mentions
Generate a product performance report PDF
Returns date-range analytics and a base64-encoded PDF. Version 1 is a legacy summary. Set version=2 for the one-page report with four models, selected industry ranks and pinned competitors, citation coverage, winning and losing topics, and optional perception. Perception defaults on (includePerception=false hides it); recommendation rate defaults off (showRecommendationRate=true shows it). Toggles apply to version 2 only. Choose week (any date in a Monday–Sunday week), or from/to (inclusive UTC dates, maximum 366 days). Defaults to the last complete week. Requires access to the product’s organization, not an admin role.
GET
/
api
/
v1
/
weekly-reports
/
generate
Generate a product performance report PDF
curl --request GET \
--url https://app.promptingco.com/api/v1/weekly-reports/generate \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.promptingco.com/api/v1/weekly-reports/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/weekly-reports/generate"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"ok": true,
"data": {
"report": {
"product": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"period": {
"from": "<string>",
"to": "<string>",
"days": 123,
"kind": "week",
"previousFrom": "<string>",
"previousTo": "<string>"
},
"generatedAt": "<string>",
"sov": 123,
"previousSov": 123,
"changePercentagePoints": 123,
"inferenceVisits": 123,
"models": [
{
"engine": "<string>",
"name": "<string>",
"sov": 123
}
],
"rankings": [
{
"productId": "<string>",
"name": "<string>",
"sov": 123,
"rank": 123
}
],
"topics": [
{
"id": "<string>",
"title": "<string>",
"sov": 123,
"status": "winning"
}
],
"unavailable": [
"<string>"
],
"v2": {
"recommendationRate": 123,
"previousRecommendationRate": 123,
"recommendationChangePercentagePoints": 123,
"perceptions": {
"positive": [
{
"label": "<string>",
"count": 123,
"quote": "<string>"
}
],
"negative": [
{
"label": "<string>",
"count": 123,
"quote": "<string>"
}
]
},
"pagesCited": 123,
"citedPages": [
{
"hostname": "<string>",
"path": "<string>",
"citations": 123,
"title": "<string>"
}
],
"visitedPages": [
{
"hostname": "<string>",
"path": "<string>",
"visits": 123,
"title": "<string>"
}
],
"includePerception": true,
"showRecommendationRate": true,
"pinnedCompetitors": [
{
"productId": "<string>",
"name": "<string>"
}
],
"totalPages": 123,
"citationRate": 123
}
},
"file": {
"filename": "<string>",
"contentType": "application/pdf",
"base64": "<string>"
}
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Authorizations
apiKeyAuthbearerAuthcookieAuth
Organization-scoped API key. Available scopes:
- content:read: Read site pages, markdown content, and llms.txt files
- content:write: Create, update, and delete site pages and content
- prompts:read: Read prompts, topics, Radar topics, prompt suggestions, and prompt analysis results
- prompts:write: Create, update, archive prompts and generate, edit, or review prompt suggestions
- simulations:read: Read agent-simulation tasks, runs, environments, and analytics
- simulations:write: Create and trigger simulation runs
- logs:read: Read AI-traffic logs and request-level audit events
- analytics:read: Read analytics aggregates (rankings, mentions, sources, SOV)
- analytics:write: Write events to analytics
- products:read: Read product metadata and competitor data
- products:write: Update product settings and competitor lists