GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: add Apify Actor run example task page by Jakub-Vacek · Pull Request #5021 · triggerdotdev/trigger.dev

Conversation

@Jakub-Vacek

@Jakub-Vacek Jakub-Vacek commented Oct 12, 2026

Copy link
Copy Markdown

Pre-agreed with the Trigger.dev team on Discord: https://discord.com/channels/1066956501299777596/1534928934184157205

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

Both task samples were run against a live Apify account (only APIFY_TOKEN set) on Trigger.dev Cloud, dev environment, SDK 4.7.3, apify-client 2.25.0:

  • Example 1 (apify-actor-run): run completes and returns the dataset items from Website Content Crawler.
  • Example 2 (apify-long-actor-run): the run pauses on wait.forToken() while the Actor works (about 2 s of compute out of about 21 s total), resumes on the Apify webhook and returns the dataset items.
  • Aborted Actor run, both examples: aborting the Actor in Apify fails the task with AbortTaskRunError and does not retry.
  • apify-client bundling: without build.external: ["apify-client"], the first API call fails with TypeError: ProxyAgent is not a constructor. With it, both examples work. The page documents this.

Docs:

  • npx mintlify broken-links in docs/: no broken links found.
  • Ran the docs locally (npm run dev in docs/) and checked the new page, the sidebar entry under "Example tasks", the row in the example tasks table and the in-page links.

Changelog

Added an example task page, docs/guides/examples/apify-actor-run.mdx, showing two ways to run an Apify Actor from a task:

  1. Start the Actor and wait for it to finish, for Actors that finish in seconds.
  2. Start the Actor with an Apify ad-hoc webhook pointing at a wait token URL, so the run pauses until the Actor finishes and the wait doesn't count towards compute.

The page imports the shared web scraping warning, and is linked from the example tasks table in docs/guides/introduction.mdx and the "Example tasks" group in docs/docs.json.


Screenshots

obrazek (1)

💯

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
daveomri added 3 commits October 8, 2026 15:50
@daveomri
docs(apify): add Apify Actor run example guide
d514885
@daveomri
docs(apify): link the Apify actor run examples
e1da756
@daveomri
docs(apify): change wording and add utm token to console link
d1e54bd
@changeset-bot

changeset-bot Bot commented Oct 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dfa5eff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

  • Last reviewed commit: 4bd63c4
  • Latest commit, not reviewed: dfa5eff

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The documentation adds an Apify Actor run guide and links it from the example-task navigation and introduction. The guide covers shared client setup, a short-run task that waits for results, and a long-run task that resumes through a webhook. It also includes dashboard testing instructions and notes about cancellation, retries, and task-output limits.

Merge Risk: Moderate · previous review 4bd63

The examples can create duplicate Apify runs and external spend when post-start failures trigger retries, so this risk should be accepted or mitigated before merging.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: adding an Apify Actor example task page to the documentation.
Description check Passed The description includes the checklist, testing details, changelog, and screenshots sections. It is complete and directly related to the documentation changes, although it does not include a linked is…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the checklist, testing details, changelog, and screenshots sections. It is complete and directly related to the documentation changes, although it does not include a linked issue reference from the template.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 962b5216-200c-491c-a9ed-877e256a5287
Commits

Reviewing files that changed from the base of the PR and between 4c74f7a and 4bd63c4.

Files selected for processing: 2

  • docs/docs.json
  • docs/guides/introduction.mdx
Files skipped from review as they are similar to previous changes: 1

  • docs/guides/introduction.mdx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Recent review details

Additional context used

Code guidelines: 3
.claude/rules/docs-writing.md — auto-discovered
AGENTS.md — auto-discovered
.cursor/rules/writing-tasks.mdc — auto-discovered
Path-based instructions: 3
Source excerpt: Use Mintlify MDX format.

CodeRabbit inference engine (.claude/rules/docs-writing.md)

Files:

  • docs/docs.json
Source excerpt: Zod is pinned to a single version across the entire monorepo.

CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/docs.json
Source excerpt: You MUST import from `@trigger.dev/sdk` (NEVER `@trigger.dev/sdk/v3`) Source excerpt: You MUST NEVER use `client.defineJob` Source excerpt: YOU MUST `export` every task, including subtasks Source excerpt: Key points: Each ta...

CodeRabbit inference engine (.cursor/rules/writing-tasks.mdc)

Files:

  • docs/docs.json
Additional comments: 1

docs/docs.json: 1

648-648: LGTM!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Jakub-Vacek Jakub-Vacek changed the title Docs/735 actor run example task page Docs/Apify actor run example task page Oct 12, 2026
@Jakub-Vacek Jakub-Vacek changed the title Docs/Apify actor run example task page docs/apify actor run example task page Oct 12, 2026
coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daveomri
docs: note that Apify Actor run examples aren't retry-safe
d40f824
@Jakub-Vacek Jakub-Vacek changed the title docs/apify actor run example task page docs: add Apify Actor run example task page Oct 12, 2026
@Jakub-Vacek Jakub-Vacek mentioned this pull request Oct 12, 2026
feat(apify): add Apify lead research example triggerdotdev/examples#153
Draft
@marcel-rbro marcel-rbro mentioned this pull request Oct 21, 2026
docs: create the trigger.dev docs apify/apify-docs#3069
Open
@Jakub-Vacek
Jakub-Vacek marked this pull request as ready for review October 22, 2026 07:36
devin-ai-integration[bot]
devin-ai-integration Bot reviewed Oct 22, 2026
View reviewed changes

@devin-ai-integration devin-ai-integration Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 4 potential issues.

Devin Review

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/guides/examples/apify-actor-run.mdx

logger.info("Actor run finished", { runId: run.id, itemCount: items.length });

return { runId: run.id, datasetId: run.defaultDatasetId, items };

@devin-ai-integration devin-ai-integration Bot Oct 22, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Large crawl results exceed task output limit

When a crawl returns over 10MB, apifyActorRun returns the items as task output. Trigger.dev rejects that output, so a successful Actor run ends in task failure; the webhook task has the same issue.

Learn more

Both example tasks fetch dataset items and return them as one task result. Trigger.dev documents a 10MB task-output limit in task output limits. The webhook variant also returns the complete item array at apifyLongActorRun. An Actor can produce large text or structured records even with a 1,000-item cap, so the item count does not bound the serialized output size.

Example: A crawl returns 1,000 items averaging 12KB each. Apify reports success, but returning roughly 12MB as a task result exceeds the Trigger.dev output limit.

Recommended fix: In both examples, return the dataset ID and run ID rather than the entire dataset, or explicitly limit and measure the returned data and explain how to fetch larger results separately.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daveomri reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@daveomri daveomri Oct 22, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a note about the 10MB output limit and how to read large datasets

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/guides/examples/apify-actor-run.mdx

Add `apify-client` to [`external`](/config/config-file#external) in your `trigger.config.ts` file. When it's bundled, `apify-client` fails on its first API call with `TypeError: ProxyAgent is not a constructor`.

```ts trigger.config.ts

@devin-ai-integration devin-ai-integration Bot Oct 22, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 TypeScript examples violate required fence tags

All four TypeScript examples use ts fences instead of the required typescript tag in documentation rules.

Learn more

The documentation rules require typescript for TypeScript code fences. Four fences in this page use ts, so fixing only the anchored fence leaves three violations.

Example: The config, shared client, synchronous task, and webhook task all open their code fences with ts.

Recommended fix: Change each of the four opening fences to typescript, keeping the file labels unchanged.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daveomri daveomri Oct 22, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keeping ts, because the site uses ts almost everywhere

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/guides/examples/apify-actor-run.mdx
throw new Error(`Actor run ${run.id} finished with status ${run.status}`);
}

const { items } = await apify.dataset(run.defaultDatasetId).listItems();

@devin-ai-integration devin-ai-integration Bot Oct 22, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Check dataset pagination against actor result cap

Both tasks call listItems() once. Confirm its default page size and whether Actors can produce more items than that page; otherwise results are incomplete.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daveomri daveomri Oct 22, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listItems() without limit returns all items, and maxItems: 1000 bounds the dataset, so one call is complete

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/guides/examples/apify-actor-run.mdx

- The webhook covers all four ways an Actor run can end, so a failed, aborted or timed-out Actor resumes your run with an error instead of leaving it waiting until the token times out.
- `payloadTemplate` sends only `eventType` and `resource` (the Actor run). Whatever Apify posts to `token.url` becomes the token's result, so the `ApifyWebhookPayload` type matches this template, not Apify's default webhook payload.
- The token `timeout` is longer than the Actor's `timeout`, so the Actor always finishes, and the webhook fires, before the token expires.

@devin-ai-integration devin-ai-integration Bot Oct 22, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Webhook delivery has no guaranteed margin

The ten-minute gap between the Actor timeout and token expiry does not guarantee webhook delivery. A delayed callback expires the wait and retries the Actor.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daveomri daveomri Oct 22, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apify sends the webhook as soon as the run ends, so a 10-minute delay is unlikely. If it happens, the task retries, which the retry-safety note covers.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daveomri
docs(apify): note the 10MB task output limit for large datasets
f9cde18
devin-ai-integration[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daveomri and others added 6 commits October 22, 2026 10:20
@daveomri
docs: link to the task output limit instead of quoting a size
b76064d
@daveomri
Merge branch 'main' into docs/735-actor-run-example-task-page
e754f8a
@daveomri
Merge branch 'main' into docs/735-actor-run-example-task-page
a8fce39
@daveomri
Merge branch 'main' into docs/735-actor-run-example-task-page
4c74f7a
@daveomri
Merge branch 'main' into docs/735-actor-run-example-task-page
4bd63c4
@daveomri
Merge branch 'main' into docs/735-actor-run-example-task-page
dfa5eff
@daveomri

daveomri commented Nov 11, 2026

Copy link
Copy Markdown

@isshaddad @D-K-P could one of you take a look when you have a moment? The review comments are addressed, and the checks pass.

This is the Apify docs work agreed on in this Discord thread: https://discord.com/channels/1066956501299777596/1534928934184157205

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daveomri daveomri mentioned this pull request Nov 11, 2026
docs: add Apify to recommended proxy services #5020
Open
3 tasks done

This branch has not been deployed

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

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@devin-ai-integration devin-ai-integration[bot] devin-ai-integration[bot] left review comments
+1 more reviewer
@daveomri daveomri daveomri left review comments
Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Jakub-Vacek @daveomri
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.