Skip to content

api_url ending in /v2 produces /v2/v2 request URLs #1138

Open

Description

@vdusek

ApifyClient and ApifyClientAsync always append the API version: f'{api_url.rstrip("/")}/{API_VERSION}', and the same for api_public_url (_apify_client.py#L164-L167, #L528-L531). ApifyClient(api_url='https://api.apify.com/v2') sends every request to https://api.apify.com/v2/v2/..., which 404s.

The JS client appends /v2 only when the path does not already end with it (apify_client.ts#L51-L59).

Expected behavior

A URL whose path already ends in /v2 (with or without a trailing slash) is used as is, for both api_url and api_public_url.

✍️ Drafted by Claude Code

Activity

  1. added
    bugSomething isn't working.
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Oct 16, 2026
  2. self-assigned this
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions