> Searlo API Docs — Search Analytics
> Source: https://searlo.tech/docs#search-analytics
> Full docs: https://searlo.tech/docs/full.md

# Search Analytics

Retrieve analytics about your own search usage. **Free (0 credits).**

### Endpoint

```
GET /search/analytics
```

### Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `startDate` | string | No | ISO date — filter from this date |
| `endDate` | string | No | ISO date — filter up to this date (must be after `startDate`) |
| `searchType` | string | No | Filter by type (e.g. `web`, `image`, `news`, `batch`) |

### Response

```json
{
  "success": true,
  "data": {
    "totalSearches": 1284,
    "searchesByType": { "web": 900, "image": 200, "news": 184 },
    "recentSearches": [ { "query": "...", "searchType": "web", "createdAt": "..." } ],
    "popularQueries": [ { "query": "react", "count": 42 } ],
    "creditsUsed": 1284,
    "averageResponseTime": 412
  },
  "message": "Analytics retrieved successfully"
}
```

## Code Examples

### cURL

```bash
curl "https://api.searlo.tech/api/v1/search/analytics?startDate=2026-01-01&searchType=web" \
  -H "x-api-key: sk_your_api_key"
```

### Python

```python
import os
import requests

res = requests.get(
    "https://api.searlo.tech/api/v1/search/analytics",
    params={"startDate": "2026-01-01", "searchType": "web"},
    headers={"x-api-key": os.environ["SEARLO_API_KEY"]}
)
print(res.json()["data"])
```


---
*From https://searlo.tech/docs — see full docs at https://searlo.tech/docs/full.md*