Exports
Export scraped data as CSV or JSON files.
GET
/api/v1/workspaces/{workspace_id}/exports/postsExport Posts
Download posts as a CSV or JSON file. Supports the same filters as the List Posts endpoint. Limited to 10,000 posts per export.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workspace_id | uuid | Required | Workspace ID |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| format | string | Default: csv | Export format: csv or json |
| q | string | Optional | Search query filter |
| subreddit | string | Optional | Filter by subreddit |
| author | string | Optional | Filter by author |
| min_score | integer | Optional | Minimum score |
| max_score | integer | Optional | Maximum score |
| post_type | string | Optional | Filter by type |
| sentiment | string | Optional | Filter by sentiment |
| sort_by | string | Default: created_utc | Sort field |
| sort_order | string | Default: desc | asc or desc |
Code Examples
bash
curl -o posts.csv "https://api.sentrasa.com/api/v1/workspaces/{workspace_id}/exports/posts?format=csv&subreddit=technology" \
-H "X-API-Key: rp_your_api_key"Response
200File download (streaming response)json
{
"note": "Returns a streaming file download with Content-Disposition header. Content-Type is text/csv or application/json depending on the format parameter."
}