> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Apify Get Dataset Items: Inputs, Cost & CLI Example

> Reading records from an Apify dataset output. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=apify_get_dataset_items:{"datasetId":"{{datasetId}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                    | Type                                                               | Required | Default | Description |
| ----------------------- | ------------------------------------------------------------------ | -------- | ------- | ----------- |
| `payload.datasetId`     | `string`                                                           | Yes      |         |             |
| `payload.params`        | `object`                                                           | No       |         |             |
| `payload.offset`        | `integer`                                                          | No       |         |             |
| `payload.limit`         | `integer`                                                          | No       |         |             |
| `payload.desc`          | `boolean`                                                          | No       |         |             |
| `payload.clean`         | `boolean`                                                          | No       |         |             |
| `payload.fields`        | `string`                                                           | No       |         |             |
| `payload.omit`          | `string`                                                           | No       |         |             |
| `payload.unwind`        | `string`                                                           | No       |         |             |
| `payload.flatten`       | `string`                                                           | No       |         |             |
| `payload.view`          | `string`                                                           | No       |         |             |
| `payload.skipHidden`    | `boolean`                                                          | No       |         |             |
| `payload.skipEmpty`     | `boolean`                                                          | No       |         |             |
| `payload.skipHeaderRow` | `boolean`                                                          | No       |         |             |
| `payload.delimiter`     | `string`                                                           | No       |         |             |
| `payload.bom`           | `boolean`                                                          | No       |         |             |
| `payload.format`        | `"json" \| "jsonl" \| "csv" \| "xlsx" \| "xml" \| "html" \| "rss"` | No       |         |             |
| `payload.attachment`    | `boolean`                                                          | No       |         |             |
| `payload.forceCloud`    | `boolean`                                                          | No       |         |             |

### Allowed values

| Field            | Allowed values                                       |
| ---------------- | ---------------------------------------------------- |
| `payload.format` | `json`, `jsonl`, `csv`, `xlsx`, `xml`, `html`, `rss` |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Apify get dataset items input.",
    "properties": {
      "datasetId": {
        "type": "string"
      },
      "params": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "desc": {
            "type": "boolean"
          },
          "clean": {
            "type": "boolean"
          },
          "fields": {
            "type": "string"
          },
          "omit": {
            "type": "string"
          },
          "unwind": {
            "type": "string"
          },
          "flatten": {
            "type": "string"
          },
          "view": {
            "type": "string"
          },
          "skipHidden": {
            "type": "boolean"
          },
          "skipEmpty": {
            "type": "boolean"
          },
          "skipHeaderRow": {
            "type": "boolean"
          },
          "delimiter": {
            "type": "string"
          },
          "bom": {
            "type": "boolean"
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "jsonl",
              "csv",
              "xlsx",
              "xml",
              "html",
              "rss"
            ]
          },
          "attachment": {
            "type": "boolean"
          },
          "forceCloud": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "offset": {
        "type": "integer"
      },
      "limit": {
        "type": "integer"
      },
      "desc": {
        "type": "boolean"
      },
      "clean": {
        "type": "boolean"
      },
      "fields": {
        "type": "string"
      },
      "omit": {
        "type": "string"
      },
      "unwind": {
        "type": "string"
      },
      "flatten": {
        "type": "string"
      },
      "view": {
        "type": "string"
      },
      "skipHidden": {
        "type": "boolean"
      },
      "skipEmpty": {
        "type": "boolean"
      },
      "skipHeaderRow": {
        "type": "boolean"
      },
      "delimiter": {
        "type": "string"
      },
      "bom": {
        "type": "boolean"
      },
      "format": {
        "type": "string",
        "enum": [
          "json",
          "jsonl",
          "csv",
          "xlsx",
          "xml",
          "html",
          "rss"
        ]
      },
      "attachment": {
        "type": "boolean"
      },
      "forceCloud": {
        "type": "boolean"
      }
    },
    "required": [
      "datasetId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name            | Type     | Required | Default | Description |
| --------------- | -------- | -------- | ------- | ----------- |
| `result.status` | `string` | Yes      |         |             |
| `result.result` | `object` | Yes      |         |             |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "visits": {
                  "type": "integer"
                },
                "bounceRate": {
                  "type": "number"
                }
              },
              "required": [
                "url",
                "visits",
                "bounceRate"
              ],
              "additionalProperties": true
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute apify_get_dataset_items --payload '{
  "datasetId": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
