Get Vercel runtime logs via REST API

Is it possible to get Vercel runtime logs via Vercel REST API?
I’ve tried with Get deployment events endpoint, but it returns only build logs, not runtime logs:
https://api.vercel.com/v3/deployments/{idOrUrl}/events

I want to create a logs monitor for runtime logs similar to provided in Vercel docs:

Would appreciate any info on this. Thank you!

Hello,

Based on the information available, you’re correct that the /v3/deployments/{idOrUrl}/events endpoint primarily returns build logs, not runtime logs .

For runtime logs, Vercel provides access through the dashboard UI where you can search, inspect, and share your team’s runtime logs at a project level . However, there isn’t a direct REST API endpoint specifically for runtime logs mentioned in the documentation.

If you want to programmatically access runtime logs, the recommended approach is to use Log Drains . Log Drains allow you to export your log data to external services, making it easier to debug and analyze. This feature is available on Pro and Enterprise plans.

To implement a monitoring system similar to the example you referenced, you would:

  1. Set up a Log Drain to export your runtime logs to a service you can query programmatically
  2. Create a script that pulls data from that service rather than directly from Vercel’s API
  3. Implement your alerting logic based on the aggregated logs
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.