curl -X GET "https://spideriq.ai/api/v1/search/aggregations" \ -H "Authorization: Bearer cli_xxx:key:secret"
{ "success": true, "total_documents": 32798, "by_job_type": [ {"name": "spiderMaps", "count": 28500}, {"name": "spiderSite", "count": 4298} ], "by_category": [ {"name": "Restaurant", "count": 8234}, {"name": "Coffee Shop", "count": 3421}, {"name": "Hotel", "count": 2156}, {"name": "Retail", "count": 1987} ], "by_country": [ {"name": "Luxembourg", "count": 15234}, {"name": "Germany", "count": 8456}, {"name": "France", "count": 5678} ], "avg_rating": 4.2, "total_reviews": 456789, "verified_emails_count": 12456, "indexed_over_time": [ {"date": "2026-01-15", "count": 1234}, {"date": "2026-01-16", "count": 1567}, {"date": "2026-01-17", "count": 1890}, {"date": "2026-01-18", "count": 2134}, {"date": "2026-01-19", "count": 1756}, {"date": "2026-01-20", "count": 2345}, {"date": "2026-01-21", "count": 1876} ] }
Get analytics aggregations for dashboard statistics
Bearer client_id:api_key:api_secret
spiderMaps
spiderSite
Show Facet bucket
Show Time series bucket
async function loadDashboardStats(authToken) { const response = await fetch( 'https://spideriq.ai/api/v1/search/aggregations', { headers: { 'Authorization': `Bearer ${authToken}` } } ); const data = await response.json(); return { totalRecords: data.total_documents, avgRating: data.avg_rating?.toFixed(1), verifiedEmails: data.verified_emails_count, jobTypeBreakdown: data.by_job_type, topCategories: data.by_category.slice(0, 5), indexingTrend: data.indexed_over_time }; }