Provides API endpoints related to api/tasks/runs/last/dataset/items
Summary
Functions
Store items in the default dataset of an Actor task's last run
Get the default dataset items from an Actor task's last run
Functions
@spec create(actor_task_id :: String.t(), body :: map() | [map()], opts :: keyword()) :: {:ok, map() | nil} | {:error, ApifyClient.Error.t()}
Store items in the default dataset of an Actor task's last run
Appends an item or an array of items to the end of the last Actor task run's default dataset.
This endpoint is a shortcut that resolves the last task run's defaultDatasetId and proxies to the
Store items in dataset endpoint.
To save bandwidth and speed up your upload, you can send the request payload compressed and set the Content-Encoding header accordingly.
Below is a list of supported Content-Encoding types.
- Brotli:
Content-Encoding: br - Gzip:
Content-Encoding: gzip - Zstandard:
Content-Encoding: zstd - Deflate:
Content-Encoding: deflate
Options
status: Filter for the run status.origin: Filter for the run origin, i.e. the means by which the run was started.
Request Body
Content Types: application/json
@spec list(actor_task_id :: String.t(), opts :: keyword()) :: {:ok, String.t() | [map()]} | {:error, ApifyClient.Error.t()}
Get the default dataset items from an Actor task's last run
Returns data stored in the default dataset of the last Actor task run in the desired format.
This endpoint is a shortcut that resolves the last task run's defaultDatasetId and proxies to the
Get dataset items endpoint.
Options
status: Filter for the run status.origin: Filter for the run origin, i.e. the means by which the run was started.format: Format of the results, possible values are:json,jsonl,csv,html,xlsx,xmlandrss. The default value isjson.clean: Iftrueor1then the API endpoint returns only non-empty items and skips hidden fields (i.e. fields starting with the # character). Thecleanparameter is just a shortcut forskipHidden=trueandskipEmpty=trueparameters. Note that since some objects might be skipped from the output, that the result might contain less items than thelimitvalue.offset: Number of items that should be skipped at the start. The default value is0.limit: Maximum number of items to return. By default there is no limit.fields: A comma-separated list of fields which should be picked from the items, only these fields will remain in the resulting record objects. Note that the fields in the outputted items are sorted the same way as they are specified in thefieldsquery parameter. You can use this feature to effectively fix the output format.output_fields: A comma-separated list of output field names that positionally rename the fields specified in thefieldsparameter. For example,?fields=headline,url&outputFields=title,linkrenamesheadlinetotitleandurltolinkin the output. The number of names inoutputFieldsmust match the number of names infields. Requires thefieldsparameter to be specified as well.omit: A comma-separated list of fields which should be omitted from the items.unwind: A comma-separated list of fields which should be unwound, in order which they should be processed. Each field should be either an array or an object. If the field is an array then every element of the array will become a separate record and merged with parent object. If the unwound field is an object then it is merged with the parent object. If the unwound field is missing or its value is neither an array nor an object and therefore cannot be merged with a parent object then the item gets preserved as it is. Note that the unwound items ignore thedescparameter.flatten: A comma-separated list of fields which should transform nested objects into flat structures.For example, with
flatten="foo"the object{"foo":{"bar": "hello"}}is turned into{"foo.bar": "hello"}.The original object with properties is replaced with the flattened object.
desc: By default, results are returned in the same order as they were stored. To reverse the order, set this parameter totrueor1.attachment: Iftrueor1then the response will define theContent-Disposition: attachmentheader, forcing a web browser to download the file rather than to display it. By default this header is not present.delimiter: A delimiter character for CSV files, only used ifformat=csv. You might need to URL-encode the character (e.g. use%09for tab or%3Bfor semicolon). The default delimiter is a simple comma (,).bom: All text responses are encoded in UTF-8 encoding. By default, theformat=csvfiles are prefixed with the UTF-8 Byte Order Mark (BOM), whilejson,jsonl,xml,htmlandrssfiles are not.If you want to override this default behavior, specify
bom=1query parameter to include the BOM orbom=0to skip it.xml_root: Overrides default root element name ofxmloutput. By default the root element isitems.xml_row: Overrides default element name that wraps each page or page function result object inxmloutput. By default the element name isitem.skip_header_row: Iftrueor1then header row in thecsvformat is skipped.skip_hidden: Iftrueor1then hidden fields are skipped from the output, i.e. fields starting with the#character.skip_empty: Iftrueor1then empty items are skipped from the output.Note that if used, the results might contain less items than the limit value.
simplified: Iftrueor1then, the endpoint applies thefields=url,pageFunctionResult,errorInfoandunwind=pageFunctionResultquery parameters. This feature is used to emulate simplified results provided by the legacy Apify Crawler product and it's not recommended to use it in new integrations.view: Defines the view configuration for dataset items based on the schema definition. This parameter determines how the data will be filtered and presented. For complete specification details, see the dataset schema documentation.skip_failed_pages: Iftrueor1then, the all the items with errorInfo property will be skipped from the output.This feature is here to emulate functionality of API version 1 used for the legacy Apify Crawler product and it's not recommended to use it in new integrations.
feed_title: Overrides the auto-generated RSS channel<title>element. Only used whenformat=rss. If not provided, the title defaults toDataset <label>.feed_description: Overrides the auto-generated RSS channel<description>element. Only used whenformat=rss. If not provided, the description defaults toItems in dataset with id "<datasetId>".signature: Signature used for the access.