This file is the fast orientation guide for AI coding agents working in this repository.
This repository contains the official Python SDK for the ReplyNodes public read API.
ReplyNodes provides normalized public web context for software and AI agents. The supported SDK surface mirrors the merged TypeScript reference SDK (replynodes/replynodes-typescript): App Store, Brand, FOMO, Google, Google Maps, Google Play, Google Shopping, Hacker News, Instagram, Reddit, TikTok, Web, and YouTube.
README.md— product context, quick start, supported public SDK surface.sdk/dx/__init__.py— authoritative developer-facing Python wrapper.sdk/README.md— package generation, testing, and implementation notes.openapi/— vendored public OpenAPI contract used to generate the low-level client.
- Public developer-facing API:
sdk/dx/__init__.py - HTTP contract:
openapi/replynodes-fetcher.openapi.json(vendored, byte-identical to the canonicalreplynodes-fetcherrepo'sapi-docs/replynodes-fetcher.openapi.json) - Generated client:
sdk/generated/replynodes/
Do not treat generated files as the primary SDK API.
Do not manually edit sdk/generated/ unless the task explicitly requires investigating generated output. Everything under sdk/generated/replynodes/ (api/, models/, api_client.py, configuration.py, exceptions.py, rest.py, api_response.py, __init__.py) is produced by OpenAPI Generator v7.10.0 and must never be hand-edited; sdk/dx/ is never touched by regeneration.
When the OpenAPI contract changes, regenerate the client using the SDK generation workflow.
cd sdk
bash scripts/generate.sh # requires Docker; regenerates sdk/generated/ only
python3 -m pytest
python3 scripts/check_surface_coverage.pyPreserve these behaviors unless the task explicitly changes the public contract:
- users instantiate the SDK with
ReplyNodes(api_key, base_url=None, timeout=None) - API keys are raw values; the SDK adds the Bearer authorization header
- successful responses expose normalized
dataandmeta meta.request_idis retained for debugging/support- pagination metadata may include
meta.next_cursor - HTTP failures are surfaced as
ReplyNodesError - request deadlines are surfaced as
ReplyNodesTimeoutError - retries are always explicitly disabled (
Configuration(retries=False)); never let a hidden library default retry a request timeoutis in seconds (not milliseconds — a deliberate, documented deviation from the TypeScript reference, matching Python HTTP client convention)
client.youtube.search(...)
client.youtube.comments(...)
client.youtube.transcript(...)
client.reddit.search(...)
client.web.scrape(...)
client.google.search(...)
client.app_store.search(...)
client.app_store.reviews(...)
Do not document or expose a provider that is not present in the public contract. PUBLIC_OPERATION_REGISTRY in sdk/dx/__init__.py is the exhaustive, checked list.
When adding or changing a public SDK method:
- update
openapi/replynodes-fetcher.openapi.jsonwhen applicable (must stay byte-identical to the canonicalreplynodes-fetchercontract; never hand-edit it for presentation — that belongs insdk/scripts/project_public_openapi.py) - regenerate generated code (
sdk/scripts/generate.sh) - update the stable wrapper and
PUBLIC_OPERATION_REGISTRYinsdk/dx/__init__.py - add or update tests in
sdk/test/ - run
python3 sdk/scripts/check_surface_coverage.py - update
sdk/README.mdfor package-specific behavior - update root
README.mdwhen discovery, supported providers, installation, or quick-start behavior changes
Examples should import from replynodes.dx, not from sdk/generated/.
Avoid scanning the entire generated client before understanding the task. Start from sdk/dx/__init__.py and only inspect generated files or OpenAPI operations relevant to the requested method.
Prefer small, explicit changes to the stable wrapper over exposing the full generated client surface.
Before completing SDK changes, run:
cd sdk
pip install -e ".[dev]"
python3 -m pytest
python3 scripts/check_surface_coverage.pyIf generation inputs changed, run bash scripts/generate.sh first (requires Docker).