Get Node.js runtime logs
Changed onReturns the Node.js application's runtime console log entries, oldest first, each with timestamp, level and message. On the first call send period (1h, 1d, 1w or 1m) and optionally levels and limit (1-5000, default 1000); when more entries match than limit, the newest are kept.
To poll for new entries send total_lines + 1 from the previous response as from_line and omit period; period and from_line cannot be combined. Lines that are not JSON with a timestamp, level and message are skipped, so logs may hold fewer than limit entries while total_lines counts every raw line. Entries with a timestamp before last_deployed_at belong to the previous deployment. Returns an empty logs list when the application has not written a log file yet.
Request
- Base URL: https://developers.hostinger.com
- URL: https://developers.hostinger.com/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs
- Auth: HTTP bearer
Path parameters
Domain name
Query parameters
Time window for the first fetch. Required when from_line is not sent.
1-based line of the log file to start from. For polling send total_lines + 1 from the previous response. Cannot be combined with period.
Maximum number of log entries to return. When more entries match, the newest are kept.
Return only entries with these log levels, sent as a comma-separated list, e.g. ERROR,WARN. Matching runs on the raw log line, so entries written with numeric levels (for example by pino) are excluded while this filter is set.
[ "ERROR", "WARN" ]
Response
Success response
Example response
{
"logs": [
{
"timestamp": "2026-03-03T09:11:02.001Z",
"level": "INFO",
"message": "Server started on port 3000"
}
],
"started_at": "2026-03-03T09:11:02Z",
"total_lines": 5042,
"last_deployed_at": "2026-03-03T08:58:41Z"
}Changes
- info
endpoint added
- info