# Get log


```
GET 
https://api.apify.com/v2/logs/:buildOrRunId
```


Retrieves logs for a specific Actor build or run.

## Request

### Path Parameters

* **buildOrRunId** string required

  ID of the Actor build or run.

  **Example:** `HG7ML7M8z78YcAPEB`

### Query Parameters

* **stream** boolean

  If `true` or `1` then the logs will be streamed as long as the run or build is running.

  **Example:** `false`

  **download** boolean

  If `true` or `1` then the web browser will download the log file rather than open it in a tab.

  **Example:** `false`

  **raw** boolean

  If `true` or `1`, the logs will be kept verbatim. By default, the API removes ANSI escape codes from the logs, keeping only printable characters.

  **Example:** `false`

<!-- -->

### Status 200

**Response Headers**




```
2017-07-14T06:00:49.733Z Application started.
2017-07-14T06:00:49.741Z Input: { test: 123 }
2017-07-14T06:00:49.752Z Some useful debug information follows.
```


**Schema**

* **string** string\
  **Example:** `2017-07-14T06:00:49.733Z Application started. 2017-07-14T06:00:49.741Z Input: { test: 123 } 2017-07-14T06:00:49.752Z Some useful debug information follows.`

### Status 400

Bad request - invalid input parameters or request body.


```
{
  "error": {
    "type": "invalid-input",
    "message": "Invalid input: The request body contains invalid data."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 401

Unauthorized - authentication required or invalid token.


```
{
  "error": {
    "type": "token-not-valid",
    "message": "Authentication token is not valid."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 403

Forbidden - insufficient permissions to perform this action.


```
{
  "error": {
    "type": "permission-denied",
    "message": "You do not have permission to perform this action."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 404

Not found - the requested resource does not exist.


```
{
  "error": {
    "type": "record-not-found",
    "message": "The requested resource was not found."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 405

Method not allowed.


```
{
  "error": {
    "type": "method-not-allowed",
    "message": "This API end-point can only be accessed using the following HTTP methods: OPTIONS,GET"
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`

### Status 429

Too many requests - rate limit exceeded.


```
{
  "error": {
    "type": "rate-limit-exceeded",
    "message": "You have exceeded the rate limit. Please try again later."
  }
}
```


**Schema**

* **error** object required

  * **type** string required\
    **Example:** `run-failed`
  * **message** string required\
    **Example:** `Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)`
