Repository navigation
Conversation
pictureUrl is already returned directly on actor.get() (apify-core's API_PUBLISHED_ACT2_FIELDS includes it; actor_definition.ts already reads it this way). The searchActorsByKeywords call here was only ever a fallback source for the same field, never the sole source.
Contributor
Author
MQ37
added a commit
that referenced
this pull request
Oct 19, 2026
## Why Part of #804. `fetch-actor-details` gets the Actor picture from the Store search (resized imgproxy URL) because the raw S3 URL from the Apify API has no CORS headers and breaks the widget avatar (#459). That costs an extra request per call and does not work for private or unlisted Actors. The hosted server can sign the same URL itself. ## What changed - Before: `fetchActorDetails` always searched the Store for the picture URL. - Now: `ActorStore` has an optional `getProxiedPictureUrl()`. If the host provides it, the search is skipped and its URL is used. Without it (stdio) nothing changes. - `fetchActorDetails` takes `{ cardOptions, actorStore }` to stay at 3 positional params (not exported from `./internals`). ## Notes for reviewers (human-written) - Internal impact: apify-mcp-server-internal#807 implements the method; it needs this released first. - Deliberate: one request less per call on hosted, and private Actors get a working URL. - Alternative considered: a new server option, about 8 files of threading; `actorStore` already reaches every tool. - Out of scope: tool-list icons (`image/png` hard-coded). Supersedes #1377. - AI assistance: Claude Code helped write and test this change. ## Proof it works Internal server with this build, container, real api.apify.com: ``` $ mcpc @pr tools-call fetch-actor-details actor:=apify/instagram-scraper pictureUrl = https://images.apifyusercontent.com/…/rs:fill:76:76/cb:1/….webp (== Store API URL) $ curl -sI -H 'Origin: https://claude.ai' <pictureUrl> 200 image/webp, access-control-allow-origin: *, 1.4 KB (raw S3 PNG: ~200 KB) ``` Same for web-scraper and rag-web-browser. No `/v2/store` call on the hosted path, one in the stdio fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
fetchActorDetailsdrops the extrasearchActorsByKeywordscall it made solely to recoverpictureUrl; reads it straight offactor.get()instead, same untyped-cast pattern already used inactor_definition.ts.Why
Closes #804.
pictureUrlis already returned byGET /v2/acts/:actorId(apify-core'sAPI_PUBLISHED_ACT2_FIELDSincludes it) — the store-search result was only ever a fallback source for the same field, never the sole source. The extra call was pure overhead.Testing
Unit:
pnpm run type-check,lint,test:unit(1683 passed),format,format:check,check:agents— all pass. Added a unit test assertingpictureUrlcomes through from the direct Actor response.E2E: built and ran the stdio server for real via
mcpcagainst production Apify with a real token —fetch-actor-detailsonapify/web-scraperreturnedpictureUrlcorrectly with the store-search call removed.fetch-actor-details-widgetshares this exact function (registry.ts), so the same path covers it.