Export Jobs
Authentication
Required. User can only export their own jobs.Query Parameters
Export format.Values:
json— Structured JSON with metadatacsv— Comma-separated values
Response
Response is a downloadable file (not JSON API response). Headers:Content-Type:application/jsonortext/csv; charset=utf-8Content-Disposition:attachment; filename="pipeline-jobs-YYYY-MM-DD.{json|csv}"
JSON Export Format
CSV Export Format
Columns:idcompany_namejob_titlestatussourcelocationis_remotejob_urlsalary_range_minsalary_range_maxai_match_scorenotestags(semicolon-separated)applied_atinterview_atoffer_atrejected_atcreated_atupdated_at
Excluded Fields
For security and privacy, the following internal fields are excluded from exports:user_id— Internal referencejob_description— Potentially large text (CSV only)ai_parsed_data— Internal AI metadatalast_synced_at— Internal sync timestampdeleted_at— Soft delete metadata
CSV Special Characters
CSV export properly escapes:- Commas — Fields wrapped in quotes if they contain commas
- Quotes — Escaped as
"" - Newlines — Preserved within quoted fields
- Tags — Array values joined with
;(semicolon + space)
Export Limits
Performance
- Typical Response Time: 500ms - 2s (depends on job count)
- Memory Usage: ~1 MB per 100 jobs (approximate)
- Timeout: 30 seconds (for very large exports)
Use Cases
JSON Export:- Backup/restore
- Data migration
- Integration with other tools
- Analytics in external BI tools
- Import into spreadsheet apps (Excel, Google Sheets)
- Data analysis
- Reporting
- Sharing with career counselors
Errors
Common Errors
- 400 Validation Error — Invalid format parameter
- 401 Unauthorized — Missing or invalid auth token
- 500 Internal Error — Database error or export generation failed
Example Error Response
Implementation Details
File Naming Convention
Exports use ISO 8601 date format in filename:pipeline-jobs-2026-03-04.json
Metadata Included (JSON Only)
JSON exports include:exported_at— ISO 8601 timestamp of exporttotal— Count of exported jobsjobs— Array of job objects
SQL Query
Export fetches:Future Enhancements (Planned)
Phase 3 (Post-MVP):
- Filtered Exports — Export by date range, status, or source
- XLSX Format — Excel format with formatting
- PDF Reports — Formatted reports with charts
- Email Delivery — Send exports to user’s email
- Scheduled Exports — Weekly automated backups
- Streaming — Support for >10k jobs via streaming API
Status: ✅ Live
This endpoint is fully implemented. Seeapp/api/export/route.ts:11.
Tested Scenarios
- ✅ JSON export with 100+ jobs
- ✅ CSV export with special characters
- ✅ Empty export (0 jobs)
- ✅ Large export (1000+ jobs)
- ✅ Invalid format parameter
- ✅ Unauthorized access
Known Limitations
- 10k job cap — Streaming solution needed for larger exports
- No filtering — Always exports all jobs (planned for future)
- Synchronous — Long exports may timeout (streaming will fix)
- No compression — Large exports not gzipped (planned for future)
Usage Examples
Download with curl
JavaScript Fetch
Python
Related Endpoints
- Jobs API — CRUD operations for jobs
- Analytics API — Dashboard metrics
Support
For issues or feature requests related to export functionality:- Check BACKEND_STATUS.md
- Open an issue on GitHub
- Contact [email protected]