Free survey quality analysis — no auth required. Submit survey questions and receive actionable feedback on clarity, bias, and structure.
/api/health-check/analyzeAnalyze a set of survey questions for common quality issues. This is a public endpoint — no API key or authentication is required.
5/hour per IPSend a JSON body with a mode and a single content string. The analyzer parses questions out of the content according to the selected mode. Content is limited to 100KB and at most 50 questions are analyzed.
| Name | Type | Description |
|---|---|---|
mode | string | One of "text", "google_forms_csv", or "csv" (required) |
content | string | Survey content to analyze (required, max 100KB / 100,000 characters) |
| Name | Type | Description |
|---|---|---|
text | string | Plain text with one question per line. Numbering like '1.', 'Q1:' is stripped automatically. |
google_forms_csv | string | A Google Forms responses CSV export. Column headers become questions and importSignals are returned. |
csv | string | A generic CSV export. Column headers become questions (timestamp/email columns are skipped). |
curl -X POST "https://surventrics.ai/api/health-check/analyze" \
-H "Content-Type: application/json" \
-d '{
"mode": "text",
"content": "1. Do you agree that our product is the best?\n2. How often do you use our product and are you satisfied?\n3. What is your age and income level?"
}'curl -X POST "https://surventrics.ai/api/health-check/analyze" \
-H "Content-Type: application/json" \
-d '{
"mode": "google_forms_csv",
"content": "Timestamp,How satisfied are you with our product and service?,What is your age and income level?\n2024-01-01 09:00:00,Very satisfied,32"
}'{
"overallScore": 42,
"questionCount": 3,
"questions": [
{
"index": 0,
"text": "Do you agree that our product is the best on the market?",
"issues": [
{
"questionIndex": 0,
"questionText": "Do you agree that our product is the best on the market?",
"type": "leading_question",
"severity": "high",
"message": "This question uses leading language ('the best') that pushes respondents toward agreement.",
"suggestion": "How would you compare our product to alternatives you have used?"
}
]
},
{
"index": 1,
"text": "How often do you use our product and are you satisfied?",
"issues": [
{
"questionIndex": 1,
"questionText": "How often do you use our product and are you satisfied?",
"type": "double_barreled",
"severity": "high",
"message": "This question asks about two things at once (usage frequency and satisfaction). Respondents cannot answer accurately.",
"suggestion": "Split into two questions: 'How often do you use our product?' and 'How satisfied are you with our product?'"
}
]
},
{
"index": 2,
"text": "What is your age and income level?",
"issues": []
}
],
"issues": [
{
"questionIndex": 0,
"questionText": "Do you agree that our product is the best on the market?",
"type": "leading_question",
"severity": "high",
"message": "This question uses leading language ('the best') that pushes respondents toward agreement.",
"suggestion": "How would you compare our product to alternatives you have used?"
},
{
"questionIndex": 1,
"questionText": "How often do you use our product and are you satisfied?",
"type": "double_barreled",
"severity": "high",
"message": "This question asks about two things at once (usage frequency and satisfaction). Respondents cannot answer accurately.",
"suggestion": "Split into two questions: 'How often do you use our product?' and 'How satisfied are you with our product?'"
}
],
"strengths": [
"33% of questions have no detected issues.",
"Short and focused survey, which can improve completion rates."
],
"importSignals": {
"typeConfidence": 0.95,
"piiDetected": false,
"ambiguities": []
}
}| Name | Type | Description |
|---|---|---|
overallScore | integer | Quality score from 0-100. Higher is better. |
questionCount | integer | Number of questions analyzed (capped at 50) |
questions | object[] | Per-question analysis. Each item has index, text, an optional type, and an issues array. |
issues | object[] | Flat list of every detected issue across all questions (see fields below) |
strengths | string[] | Positive observations about the survey |
importSignals | object | CSV modes only: { typeConfidence, piiDetected, ambiguities } |
Array of detected quality issues, ordered by severity:
| Name | Type | Description |
|---|---|---|
questionIndex | integer | Zero-based index of the affected question |
questionText | string | The text of the affected question |
type | string | Issue type identifier (see values below) |
severity | string | Issue severity: high, medium, or low |
message | string | Human-readable explanation of the issue |
suggestion | string | Recommended fix for the issue |
| Type | Description |
|---|---|
leading_question | Question wording pushes respondents toward a particular answer |
double_barreled | Question asks about two or more things at once |
unbalanced_scale | Response options are not symmetrically balanced |
sensitive_topic | Question touches on sensitive personal information |
ambiguous_wording | Question text is vague or open to multiple interpretations |
missing_option | Response options are missing a common or expected choice |
too_long | Question is excessively long and may reduce response quality |
jargon | Question uses technical language that may confuse respondents |
On error, the endpoint returns a JSON body with an error field. Validation and rate-limit failures return a string message; the availability kill-switch returns a structured { code, message } object.
| Name | Type | Description |
|---|---|---|
400 | Bad Request | Invalid body (bad mode, missing/oversized content) or no questions found in the content. |
429 | Too Many Requests | Rate limit exceeded (5 requests per hour per IP). Check the X-RateLimit-* response headers. |
500 | Internal Server Error | Analysis failed unexpectedly. Retry later. |
503 | Service Unavailable | Health check is disabled via the "health_check_public" feature flag (kill-switch). |
When the health_check_public feature flag is turned off, the endpoint short-circuits before doing any work and responds with a 503:
{
"error": {
"code": "unavailable",
"message": "Health check is temporarily unavailable."
}
}Run a health check before launching any survey to catch common pitfalls:
// JavaScript example
async function checkSurveyHealth(text) {
const response = await fetch(
'https://surventrics.ai/api/health-check/analyze',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ mode: 'text', content: text })
}
);
const data = await response.json();
if (data.overallScore < 70) {
console.log('Survey needs improvement.');
data.issues
.filter(i => i.severity === 'high')
.forEach(i => console.log(` [${i.type}] ${i.message}`));
} else {
console.log('Survey looks good! Score:', data.overallScore);
data.strengths.forEach(s => console.log(' +', s));
}
}Add a health check step to your deployment pipeline to enforce minimum quality standards:
# Shell script example
SCORE=$(curl -s -X POST "https://surventrics.ai/api/health-check/analyze" \
-H "Content-Type: application/json" \
-d @survey.json | jq '.overallScore')
if [ "$SCORE" -lt 60 ]; then
echo "Survey quality score too low: $SCORE/100"
exit 1
fi