List Survey Statistics
Returns question-level statistics for all questions in a specified survey, including response counts, averages, and breakdowns for choice-based questions.
Endpoint
GET
/v5/survey/{survey_id}/surveystatistic
Authentication is required for all requests. See Authentication.
Path Parameters
survey_id
integer
required
The ID of the survey for which to retrieve statistics.
Query Parameters
surveypage
integer
Filter results to a specific page by page ID.
surveyquestion
integer
Filter results to a specific question by question ID.
Response
result_ok
boolean
Returns
true if the request was successful.total_count
integer
Total number of survey responses collected.
page
integer
Current page number.
total_pages
integer
Total number of pages.
results_per_page
integer
Number of results per page.
data
array
Array of question statistic objects, one per question in the survey. Each object includes the question ID and type. Statistics fields are present for answerable question types; non-answerable types (INSTRUCTIONS, ESSAY, GROUP, SCRIPT, HIDDEN) return only
id and type.child attributes
id
integer
The question ID.
type
string
The question type. Possible values include:
RADIO, CHECKBOX, MENU, TEXTBOX, FILE, ESSAY, INSTRUCTIONS, GROUP, SCRIPT, HIDDEN.breakdown
array
Present for choice-based question types (RADIO, CHECKBOX, MENU). Each item represents one answer option.
child attributes
label
string
The answer option label.
percentage
string
Percentage of respondents who selected this option.
count
string
Number of respondents who selected this option.
total responses
string
Total number of responses recorded for this question. Present for RADIO, CHECKBOX, MENU, TEXTBOX, and FILE question types.
sum
string
Sum of all numeric responses for this question.
average
string
Average value of responses for this question.
stdDev
string or null
Standard deviation of numeric responses. Returns
null when not applicable.min
string or null
Minimum response value. Returns
null when not applicable.max
string or null
Maximum response value. Returns
null when not applicable.Examples
Request
curl "https://api.alchemer.com/v5/survey/123456/surveystatistic?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET"
Response
{
"result_ok": true,
"total_count": 3,
"page": 1,
"total_pages": 1,
"results_per_page": 3,
"data": [
{
"id": 5,
"type": "INSTRUCTIONS"
},
{
"id": 26,
"type": "RADIO",
"breakdown": [
{
"label": "Male",
"percentage": "66.7",
"count": "2"
},
{
"label": "Female",
"percentage": "33.3",
"count": "1"
}
],
"total responses": "3",
"sum": "0",
"average": "",
"stdDev": null,
"min": null,
"max": null
},
{
"id": 9,
"type": "TEXTBOX",
"total responses": "1",
"sum": "0",
"average": "",
"stdDev": null,
"min": null,
"max": null
}
]
}