Skip to content

Run response lists dataset fields twice: structured fields array and verbatim in nextStep #1305

Description

@jirispilka

Every run response with a dataset emits the full field list twice in the same payload: once as storages.datasets.default.fields, and again spelled out inside the nextStep text ("Available fields (dot notation): … — pass via fields="..." to project"). Field-heavy Actors pay for the list twice on every run.

Example (apify/web-fetch run, 26 fields, many of them per-site metadata.headers.* names):

{
  "storages": {
    "datasets": {
      "default": {
        "id": "RGiegsVC7mRVGJhMX",
        "itemCount": 1,
        "fields": ["url", "markdown", "fetch.loadedUrl", "", "metadata.headers.x-apify-unblocker-route"]
      }
    }
  },
  "summary": "SUCCEEDED in 6.859s. 1 item; 26 fields available.",
  "nextStep": "Use get-dataset-items with datasetId=RGiegsVC7mRVGJhMX and limit (for example 20) to fetch items (1 total). Available fields (dot notation): url, markdown, fetch.loadedUrl, fetch.loadedTime, fetch.httpStatusCode, fetch.contentLengthBytes, fetch.contentType, metadata.canonicalUrl, metadata.title, metadata.description, metadata.author, metadata.keywords, metadata.languageCode, metadata.jsonLd, metadata.headers.age, metadata.headers.allow, metadata.headers.cf-cache-status, metadata.headers.cf-ray, metadata.headers.connection, metadata.headers.content-type, metadata.headers.date, metadata.headers.keep-alive, metadata.headers.last-modified, metadata.headers.server, metadata.headers.transfer-encoding, metadata.headers.x-apify-unblocker-route — pass via fields=\"...\" to project."
}

Affected: all responses that carry dataset fields — direct Actor tools, call-actor, get-actor-run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-aiIssues owned by the AI team.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions