Apify icon

Apify

Apify API

Overview

This node interacts with the Apify API to put items into a specified dataset. It is useful for scenarios where you need to update or add multiple items to a dataset programmatically, such as data aggregation, automation workflows, or data processing pipelines. For example, you can use it to upload scraped data or processed results into an Apify dataset for further analysis or storage.

Use Case Examples

  1. Uploading a batch of scraped product details into an Apify dataset.
  2. Updating a dataset with new sensor readings collected from IoT devices.

Properties

Name Meaning
Dataset Id The identifier of the dataset where items will be put. It can be a dataset ID or a combination of username and dataset name (username~dataset-name).
Body The collection of items to be put into the dataset. This is a fixed collection where each item can have custom fields, e.g., 'foo'.
Use Custom Body A boolean flag to indicate whether to use a custom JSON body instead of the predefined items collection.
Custom Body A JSON array representing the custom body to send to the dataset when 'Use Custom Body' is true. This allows sending arbitrary JSON data as dataset items.

Output

JSON

  • response - The response from the Apify API after putting items into the dataset, typically containing details about the updated dataset or confirmation of the operation.

Dependencies

  • Requires an Apify API key credential for authentication to access the Apify API.

Troubleshooting

  • Ensure the Dataset Id is correct and accessible with the provided API key; otherwise, the API call will fail.
  • If using a custom body, ensure the JSON is valid and properly formatted to avoid request errors.
  • Check network connectivity and API rate limits if requests fail or time out.

Links

Discussion