v3

OpenAPI 3.1.2Apache 2.02026-07-31231237972.0 KB
Last Actor run's default dataset

Get last run's dataset items

Returns data stored in the default dataset of the last Actor run in the desired format.

This endpoint is a shortcut that resolves the last run's defaultDatasetId and proxies to the Get dataset items endpoint.

get/v2/actors/{actorId}/runs/last/dataset/items

Path parameters

actorIdstring required
Example:janedoe~my-actor

Actor ID or a tilde-separated owner's username and Actor name.

Query parameters

statusstring
Example:SUCCEEDED

Filter for the run status.

origin'DEVELOPMENT' | 'WEB' | 'API' | 'SCHEDULER' | 'TEST' | 'WEBHOOK' | 'ACTOR' | 'CLI' | 'CI' | 'STANDBY' | 'MCP'

Filter for the run origin, i.e. the means by which the run was started.

formatstring
Example:json

Format of the results, possible values are: json, jsonl, csv, html, xlsx, xml and rss. The default value is json.

cleanboolean

If true or 1 then the API endpoint returns only non-empty items and skips hidden fields (i.e. fields starting with the # character). The clean parameter is just a shortcut for skipHidden=true and skipEmpty=true parameters. Note that since some objects might be skipped from the output, that the result might contain less items than the limit value.

offsetnumber double

Number of items that should be skipped at the start. The default value is 0.

limitnumber double

Maximum number of items to return. By default there is no limit.

fieldsstring
Example:myValue,myOtherValue

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 the fields query parameter. You can use this feature to effectively fix the output format.

outputFieldsstring
Example:title,link

A comma-separated list of output field names that positionally rename the fields specified in the fields parameter. For example, ?fields=headline,url&outputFields=title,link renames headline to title and url to link in the output. The number of names in outputFields must match the number of names in fields. Requires the fields parameter to be specified as well.

omitstring
Example:myValue,myOtherValue

A comma-separated list of fields which should be omitted from the items.

unwindstring
Example:myValue,myOtherValue

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 the desc parameter.

flattenstring
Example:myValue

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.

descboolean
Example:true

By default, results are returned in the same order as they were stored. To reverse the order, set this parameter to true or 1.

attachmentboolean
Example:true

If true or 1 then the response will define the Content-Disposition: attachment header, forcing a web browser to download the file rather than to display it. By default this header is not present.

delimiterstring
Example:;

A delimiter character for CSV files, only used if format=csv. You might need to URL-encode the character (e.g. use %09 for tab or %3B for semicolon). The default delimiter is a simple comma (,).

bomboolean

All text responses are encoded in UTF-8 encoding. By default, the format=csv files are prefixed with the UTF-8 Byte Order Mark (BOM), while json, jsonl, xml, html and rss files are not.

If you want to override this default behavior, specify bom=1 query parameter to include the BOM or bom=0 to skip it.

xmlRootstring
Example:items

Overrides default root element name of xml output. By default the root element is items.

xmlRowstring
Example:item

Overrides default element name that wraps each page or page function result object in xml output. By default the element name is item.

skipHeaderRowboolean
Example:true

If true or 1 then header row in the csv format is skipped.

skipHiddenboolean

If true or 1 then hidden fields are skipped from the output, i.e. fields starting with the # character.

skipEmptyboolean

If true or 1 then empty items are skipped from the output.

Note that if used, the results might contain less items than the limit value.

simplifiedboolean

If true or 1 then, the endpoint applies the fields=url,pageFunctionResult,errorInfo and unwind=pageFunctionResult query 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.

viewstring
Example:overview

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.

skipFailedPagesboolean

If true or 1 then, 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.

feedTitlestring
Example:Latest posts from r/pasta

Overrides the auto-generated RSS channel <title> element. Only used when format=rss. If not provided, the title defaults to Dataset <label>.

feedDescriptionstring
Example:Scraped forum posts

Overrides the auto-generated RSS channel <description> element. Only used when format=rss. If not provided, the description defaults to Items in dataset with id "<datasetId>".

signaturestring
Example:2wTI46Bg8qWQrV7tavlPI

Signature used for the access.

Response

object[] required

Example response

[
  {
    "foo": "bar"
  },
  {
    "foo2": "bar2"
  }
]