a year ago
Hi Railway team 
I’m currently building an internal dashboard to monitor the performance and costs of several bots, each hosted as a separate Railway project.
I’ve successfully used the public API to list all projects and environments — that part works great. However, I’d love to know if there’s any way to fetch usage and cost data per project, similar to what is shown in the https://railway.app/workspace/usage panel.
Is there an existing (even private or beta) endpoint to access this data programmatically?
Or are there any plans to make billing/usage metrics available through the API?
I’m open to alternative solutions as well (webhooks, extended access, billing exports, etc.) if there's a recommended path.
Thanks in advance for your help 
3 Replies
Status changed to Awaiting User Response Railway • 11 months ago
a year ago
Hi Jake
Thanks for pointing me to the GraphQL API — I’ve been exploring it thoroughly via the playground.
I’ve managed to pull resource usage data using the usage query with projectId, measurements, and date ranges. However, I’ve run into a discrepancy I’m hoping you can clarify:
For example, when querying from "2025-04-01T00:00:00Z" to "2025-04-08T23:59:59Z", I get:
CPU_USAGE: ~11.60
MEMORY_USAGE_GB: ~1020
NETWORK_TX_GB: ~0.095
But on the usage panel, I see:
Memory Usage: $0.57
CPU Usage: $0.01
Network (Egress): $0.03
Total: $0.61
The values from the API don’t match the billing costs unless I manually apply some kind of conversion. So I’m wondering:
Are there official cost-per-unit rates for each metric (e.g., $ per vCPU-minute, $ per GB-minute of memory, $ per GB egress)?
Is the estimatedUsage query based on these same units, or does it apply a different billing model?
Are there any plans to expose costs per project per date range (e.g., via usage or another query)?
Alternatively, is it possible to access the same data used in the Usage Dashboard panel programmatically?
This would help us display consistent cost info inside our internal dashboard. I’m currently fetching usage per project via usage, and I can use estimatedUsage as well — but the gap in conversion logic is what’s missing right now.
Thanks again for your help
Best,
seocontenidos21
Status changed to Awaiting Railway Response Railway • 11 months ago
Status changed to Solved seocontenidos21 • 11 months ago
a year ago
Hola Jake
Gracias por indicarme la API GraphQL. La he estado explorando a fondo a través del área de juegos.
He logrado extraer datos de uso de recursos mediante la consulta de uso con ID de proyecto, mediciones y rangos de fechas. Sin embargo, he encontrado una discrepancia que espero pueda aclarar:
Por ejemplo, al consultar desde "2025-04-01T00:00:00Z" hasta "2025-04-08T23:59:59Z", obtengo:
USO DE CPU: ~11.60
USO DE MEMORIA GB: ~1020
RED_TX_GB: ~0.095
Pero en el panel de uso veo:
Uso de memoria: $0,57
Uso de CPU: $0.01
Red (Salida): $0.03
Total: $0.61
Los valores de la API no coinciden con los costos de facturación a menos que aplique manualmente algún tipo de conversión. Por lo tanto, me pregunto:
¿Existen tarifas oficiales de costo por unidad para cada métrica (por ejemplo, $ por vCPU-minuto, $ por GB-minuto de memoria, $ por GB de salida)?
¿La consulta de uso estimado se basa en estas mismas unidades o aplica un modelo de facturación diferente?
¿Hay algún plan para exponer los costos por proyecto por rango de fechas (por ejemplo, a través del uso u otra consulta)?
Alternativamente, ¿es posible acceder a los mismos datos utilizados en el panel del Tablero de uso mediante programación?
Esto nos ayudarÃa a mostrar información de costos consistente en nuestro panel interno. Actualmente, obtengo el uso por proyecto mediante el uso, y también puedo usar estimateUsage, pero la falla en la lógica de conversión es lo que falta ahora mismo.
Gracias de nuevo por tu ayuda.
Mejor,
seocontenidos21
Status changed to Awaiting Railway Response Railway • 11 months ago
Status changed to Solved seocontenidos21 • 11 months ago