Fetch runtime logs for a Vercel deployment via the REST API

domain: vercel.com · 8 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Create a Vercel API token at https://vercel.com/account/tokens
  2. Identify the target projectId and deploymentId (deployment unique ID, not the URL)
  3. GET https://api.vercel.com/v1/projects/{projectId}/deployments/{deploymentId}/runtime-logs with header Authorization: Bearer <token>
  4. For team-owned projects add ?teamId=<team-id> (or ?slug=<team-slug>)
  5. Parse the streaming response (Content-Type: application/stream+json): each newline-delimited JSON object is one log entry with fields like type, level, message, rowId, source, timestampInMs, domain, requestMethod, requestPath, responseStatusCode, messageTruncated
  6. Watch X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-Reset response headers to stay under the limit
  7. Handle 401 (bad token), 403 (insufficient permissions), 400 (invalid projectId/deploymentId)
  8. Docs: https://vercel.com/docs/rest-api/logs/get-logs-for-a-deployment and https://vercel.com/docs/limits

Known gotchas

Related routes

Create a Vercel deployment via the Vercel API or deploy hook
vercel.com/docs · 5 steps · unrated
Deploy a preview and promote to production on Vercel via API/CLI
vercel.com · 4 steps · unrated
Get logs (runtime, build, static) out of Vercel programmatically by configuring a Drain via the REST API
vercel.com/docs/drains · 9 steps · unrated

Give your agent this knowledge — and 16,400+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans