Skip to main content
POST
/
serverless
/
logs
/
history
Logs history (paginated)
curl --request POST \
  --url https://api.fal.ai/v1/serverless/logs/history \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "key": "fal_job_id",
    "value": "job_123"
  }
]
'
{
  "items": [
    {
      "timestamp": "2024-11-09T10:30:45.123Z",
      "level": "info",
      "message": "Application started",
      "app": "my-app",
      "revision": "rev_abc123",
      "labels": {
        "fal_job_id": "job_123"
      }
    }
  ],
  "next_cursor": "2024-11-09T10:30:44.000Z",
  "has_more": true
}

Authorizations

Authorization
string
header
required

API key must be prefixed with "Key ", e.g. Authorization: Key YOUR_API_KEY

Query Parameters

limit
integer

Number of results per page

Required range: 1 <= x <= 1000
Example:

100

cursor
string

Pagination cursor from previous response (timestamp-based). Use as 'until' parameter for next page.

Example:

"2024-11-09T00:00:00.000Z"

start

Start date in ISO8601 format (e.g., '2025-01-01T00:00:00Z' or '2025-01-01'). Defaults to 24 hours ago.

Example:

"2025-01-01T00:00:00Z"

end

End date in ISO8601 format (e.g., '2025-01-31T23:59:59Z' or '2025-01-31'). Defaults to current time.

Example:

"2025-01-31T23:59:59Z"

app_id
string[]

Filter by app IDs

Example:
["my-app"]
revision
string

Filter by revision

Example:

"rev_abc123"

run_source
enum<string>

Filter by run source

Available options:
grpc-run,
grpc-register,
gateway,
cron
Example:

"grpc-run"

traceback
boolean | null
default:false

Include tracebacks

Example:

false

Free-text search

Example:

"error"

level
string

Minimum log level

Example:

"error"

job_id
string

Filter by job id

Example:

"job_123"

request_id
string

Filter by request id

Example:

"req_abc123"

Body

application/json
key
string
required

Label key to filter

value
required

Filter value

condition_type
enum<string>

Condition type for label filtering

Available options:
equals,
in,
not_equals,
not_in

Response

Logs history retrieved successfully

Paginated logs response

next_cursor
string | null
required

Cursor for the next page of results, null if no more pages

has_more
boolean
required

Boolean indicating if more results are available (convenience field derived from next_cursor)

items
object[]
required

Array of log entries matching the query