Vercel isn't just a hosting platform — its REST API gives you programmatic control over deployments, domains, and edge config.
The Deployments API
# List deployments
curl "https://api.vercel.com/v6/deployments" \
-H "Authorization: Bearer $VERCEL_TOKEN"
# Create a deployment from files
curl -X POST "https://api.vercel.com/v13/deployments" \
-H "Authorization: Bearer $VERCEL_TOKEN" \
-d '{
"name": "my-app",
"files": [
{ "file": "index.html", "data": "<h1>Hello World</h1>" },
{ "file": "api/hello.js", "data": "export default (req, res) => res.json({ hello: true })" }
]
}'
Edge Config — Global Key-Value
import { get } from '@vercel/edge-config'
// Read in <1ms at the edge
const featureFlags = await get('feature-flags')
const maintenanceMode = await get('maintenance')
if (maintenanceMode) {
return new Response('Down for maintenance', { status: 503 })
}
Vercel KV (Redis)
import { kv } from '@vercel/kv'
// Rate limiting
const ip = request.headers.get('x-forwarded-for')
const requests = await kv.incr(`rate:${ip}`)
await kv.expire(`rate:${ip}`, 60)
if (requests > 100) {
return new Response('Too Many Requests', { status: 429 })
}
// Session store
await kv.set(`session:${token}`, { userId: '123' }, { ex: 3600 })
const session = await kv.get(`session:${token}`)
Vercel Blob — File Storage
import { put, list, del } from '@vercel/blob'
// Upload
const blob = await put('avatars/user-123.jpg', file, {
access: 'public',
contentType: 'image/jpeg'
})
console.log(blob.url) // https://xxx.public.blob.vercel-storage.com/avatars/user-123.jpg
// List
const { blobs } = await list({ prefix: 'avatars/' })
// Delete
await del(blob.url)
Cron Jobs
// vercel.json
{
"crons": [
{ "path": "/api/daily-report", "schedule": "0 9 * * *" },
{ "path": "/api/cleanup", "schedule": "0 */6 * * *" }
]
}
Real-World Use Case
A SaaS company was managing feature flags in a JSON file, redeploying every time they changed. They switched to Vercel Edge Config: update a value via API, it propagates globally in <100ms. No redeploy. Their feature flag latency went from "minutes to deploy" to "milliseconds to propagate."
Vercel turned deployment infrastructure into a developer API.
Build Smarter Data Pipelines
Need to scrape websites, extract APIs, or automate data collection? Check out my ready-to-use scrapers on Apify — no coding required.
Custom scraping solution? Email me at spinov001@gmail.com — fast turnaround, fair prices.
Top comments (0)