CSV โ JSON Conversion API
Convert CSV data into structured JSON using a secure, high-performance API designed for automation.
๐ Getting Started
- Create an account or log in
- Generate an API key from your dashboard
- Send CSV data to the API
- View usage and limits in your report
- All examples assume:
- Requests are sent over HTTPS
- Endpoint: POST /api/convert/csv-to-json
- Header: X-API-KEY
- Request bodies are UTF-8 encoded
- ?????????????????Payload size is within allowed limits (recommended < 5 MB for best performance)
- Only successful requests (HTTP 2xx) count toward usage
๐งช Code Examples
curl -X POST https://yourdomain.com/api/convert/csv-to-json \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"csv": "name,age\nAlice,30\nBob,25"
}'
const response = await fetch(
"https://yourdomain.com/api/convert/csv-to-json",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": process.env.API_KEY
},
body: JSON.stringify({
csv: "name,age\nAlice,30\nBob,25"
})
}
);
const result = await response.json();
console.log(result.json);
import requests
url = "https://yourdomain.com/api/convert/csv-to-json"
headers = {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"csv": "name,age\nAlice,30\nBob,25"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json()["json"])
using System.Net.Http.Json;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-KEY", "YOUR_API_KEY");
var response = await client.PostAsJsonAsync(
"https://yourdomain.com/api/convert/csv-to-json",
new
{
csv = "name,age\nAlice,30\nBob,25"
});
var result = await response.Content.ReadFromJsonAsync();
Console.WriteLine(result.json);
$headers = @{
"X-API-KEY" = "YOUR_API_KEY"
"Content-Type" = "application/json"
}
$body = @{
csv = "name,age`nAlice,30`nBob,25"
} | ConvertTo-Json
$response = Invoke-RestMethod `
-Uri "https://yourdomain.com/api/convert/csv-to-json" `
-Method Post `
-Headers $headers `
-Body $body
$response.json
๐ Request Body
{
"csv": "name,age\nAlice,30\nBob,25",
"options": {
"hasHeader": true
}
}
๐ค Response Example
{
"json": [
{ "name": "Alice", "age": "30" },
{ "name": "Bob", "age": "25" }
]
}
๐ Security & Privacy
- All requests require an API key
- API keys are hashed and never stored in plaintext
- HTTPS is enforced for all endpoints
- CSV data is processed in memory only
- No converted content is stored
๐ Usage Limits
- Free tier: 100 requests per day
- Paid tiers: usage billed in credits
- 1 credit = 1,000 successful API calls
Tip: Use UTF-8 encoded CSV for best results.