x402 protocol support

オープン
#106 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
python

調査の方向性

まず、依存関係 zyte_api[x402]https://api-x402.zyte.com を選択するソースのエントリポイントを確認し、認証動作を https://api.zyte.com と比較します。x402 がサポートされているか、表示されている認証が想定されたものか、どの設定またはドキュメントが必要かを明らかにできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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?

主要言語
Python
スター
30
フォーク
9
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zytedata/python-zyte-api のほかの issue

zytedata/python-zyte-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。