DEV Community

Bobo
Bobo

Posted on

Turn Your CSV Files Into a REST API in 2 Minutes

CSV as a Service

Sometimes you don't want a CLI. You want an API. You want to upload a CSV, do something to it, and get the result back programmatically.

csv-processing-api-server gives you exactly that:

npx csv-processing-api-server
# Server running on http://localhost:3030
Enter fullscreen mode Exit fullscreen mode

Then make API calls:

curl -X POST http://localhost:3030/api/clean \
  -F "file=@messy.csv" \
  -F "options={\"dedup\": true}"
Enter fullscreen mode Exit fullscreen mode

API Endpoints

Endpoint What It Does
POST /api/clean Upload + clean (dedup, strip whitespace, fill nulls)
POST /api/convert CSV → JSON, CSV → Excel
POST /api/analyze Column stats, distribution, summaries
GET /api/health Server status

npm install -g csv-processing-api-server
Enter fullscreen mode Exit fullscreen mode

More Resources

  • 🛠️ My tools & open-source projects: GitHub
  • 📝 Blog & updates: TucaoWall
  • ☁️ Deploy your own cloud server and get $25 credit: DigitalOcean
  • 🐙 CLI Toolkit Pro (bundle of all my CLI tools): npm
  • 💼 Hire me on Freelancer: a0982

Top comments (0)