zytedata / zytedata/python-zyte-api

x402 protocol support

Open
#106 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
30
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hi,

Could you please clarify whether the Zyte API currently supports the x402 protocol?

I contacted support previously, but I didn't receive a clear answer about whether this functionality is currently available.

I tried sending the following request:

from zyte_api import ZyteAPI

client = ZyteAPI(eth_key="my eth private key in base network")

result = client.get({"url": "https://toscrape.com", "httpResponseBody": True})
print(result)

However, I receive the following error:

zyte_api._errors.RequestError: RequestError: 401, message=Unauthorized, headers=<CIMultiDictProxy('Date': 'Sun, 19 Jul 2026 15:12:04 GMT', 'Content-Type': 'application/problem+json', 'Content-Length': '202', 'Connection': 'close', 'WWW-Authenticate': 'Basic realm="Zyte API"', 'Request-Id': '01be2ad971ff6e6511893c4a810d49a6', 'Vary': 'Accept-Encoding', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Expose-Headers': '*, X-Project-Key', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, PATCH, OPTIONS', 'Access-Control-Allow-Headers': 'DNT, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range, Authorization, X-Project-Key', 'Access-Control-Max-Age': '1728000')>, body=b'{"type":"/auth/not-valid","title":"Authentication Info Invalid","status":401,"detail":"No valid authentication info found in the request. Check the documentation for the correct authentication schema."}', request_id=01be2ad971ff6e6511893c4a810d49a6
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x101776c90>

These are my project dependencies:

requires-python = ">=3.12"
dependencies = [
    "zyte-api[x402]>=0.10.0",
]

While looking through the project source code, I found the endpoint https://api-x402.zyte.com. However, when I send requests to this endpoint, it also requires authentication in the same way as the main endpoint (api.zyte.com).

Is this the expected behavior, or is x402 support currently unavailable?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the zyte_api[x402] dependency and the source entry point that selects https://api-x402.zyte.com; compare its authentication behavior with https://api.zyte.com. Done means establishing whether x402 is supported, whether the shown authentication is expected, and what configuration or documentation is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.