API Documentation
Programmatic access to ExportComments for exporting and analyzing social media comments.
Authentication
All API requests require a Bearer token. Generate an API key from your API Keys dashboard.
curl -H "Authorization: Bearer se_live_your_api_key" \
https://exportcomments.xyz/api/v1/exportRate Limits
Pro Plan
100 requests/minute
Agency Plan
500 requests/minute
Rate-limited responses return 429 Too Many Requests.
Response Format
All responses are JSON. Successful responses wrap data in a data field. Errors include an error field.
Success
{
"data": {
"id": "clx...",
"status": "PROCESSING"
}
}Error
{
"error": "Export not found"
}Endpoints
/api/v1/exportRequest Body
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "CSV" // CSV | EXCEL | JSON | GOOGLE_SHEETS
}Response (201)
{
"data": {
"id": "clx123...",
"status": "PROCESSING",
"platform": "YOUTUBE",
"sourceUrl": "https://...",
"format": "CSV"
}
}cURL
curl -X POST https://exportcomments.xyz/api/v1/export \
-H "Authorization: Bearer se_live_xxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://youtube.com/watch?v=xxx", "format": "CSV"}'Python
import requests
resp = requests.post(
"https://exportcomments.xyz/api/v1/export",
headers={"Authorization": "Bearer se_live_xxx"},
json={"url": "https://youtube.com/watch?v=xxx", "format": "CSV"},
)
export_id = resp.json()["data"]["id"]JavaScript
const res = await fetch("https://exportcomments.xyz/api/v1/export", {
method: "POST",
headers: {
Authorization: "Bearer se_live_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://youtube.com/watch?v=xxx", format: "CSV" }),
});
const { data } = await res.json();/api/v1/export/:idResponse (200)
{
"data": {
"id": "clx123...",
"platform": "YOUTUBE",
"sourceUrl": "https://...",
"postTitle": "Video Title",
"postAuthor": "Channel Name",
"status": "COMPLETED",
"format": "CSV",
"totalComments": 347,
"fileUrl": "https://...",
"createdAt": "2026-03-13T..."
}
}cURL
curl https://exportcomments.xyz/api/v1/export/clx123 \
-H "Authorization: Bearer se_live_xxx"/api/v1/export/:id/commentsQuery Parameters
page — Page number (default: 1)
limit — Results per page, max 100 (default: 50)
sentiment — Filter: POSITIVE, NEGATIVE, NEUTRAL
search — Search in comment text
sort — Sort by: likesCount, timestamp, username (default: likesCount)
order — asc or desc (default: desc)
Response (200)
{
"data": {
"comments": [
{
"id": "clx...",
"username": "user123",
"commentText": "Great video!",
"likesCount": 42,
"sentiment": "POSITIVE",
"isSpam": false
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 347,
"totalPages": 7
}
}
}cURL
curl "https://exportcomments.xyz/api/v1/export/clx123/comments?page=1&limit=50&sentiment=POSITIVE" \
-H "Authorization: Bearer se_live_xxx"/api/v1/analyze/:exportIdResponse (202)
{
"data": {
"status": "PROCESSING",
"exportId": "clx123..."
}
}cURL
curl -X POST https://exportcomments.xyz/api/v1/analyze/clx123 \
-H "Authorization: Bearer se_live_xxx"/api/v1/analyze/:exportIdResponse (200)
{
"data": {
"id": "clx...",
"exportId": "clx123...",
"sentimentBreakdown": {
"positive": 156,
"negative": 42,
"neutral": 149
},
"topTopics": [
{ "topic": "pricing", "count": 23, "sentiment": "NEGATIVE" }
],
"spamCount": 5,
"summary": "The comment section shows...",
"topComments": [...]
}
}Error Codes
| Code | Meaning |
|---|---|
| 400 | Invalid request body or parameters |
| 401 | Missing or invalid API key |
| 403 | Plan limit reached or insufficient permissions |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |