Skip to content

Say why a call answered found: false, and which words each API can use - #19

Merged
kev1n merged 2 commits into
mainfrom
not-found-reason
Sep 17, 2026
Merged

kev1n merged 2 commits into
mainfrom
not-found-reason

Conversation

@kev1n

@kev1n kev1n commented Sep 17, 2026

Copy link
Copy Markdown
Member

Follows the gateway change shipped in getanyapi-com/anyapi#1202 (live in production).

Every found: false answer now carries output.reason, and each API's output schema publishes the exact words that API can answer with: not_found everywhere, plus suspended on the APIs whose sources can tell a suspended account apart (today twitter.profile and twitter.user_posts).

  • quickstart - the miss example shows reason, and says a suspended account says suspended on an API whose source can tell.
  • sdks - the outcome table gives the reason per case, splits "suspended" from "deleted or removed" because no source can tell the latter from never having existed, and a new paragraph names the TypeScript NotFoundReason union and Python OutputNotFound.reason, with the instruction to read the list from /v1/apis/{slug} rather than hardcoding it.
  • mcp-server - the tool-error section names output.reason.

Verified live after the gateway deploy:

POST /v1/run/twitter.profile {"handle":"DonaldJTrumpJr_"}
{"output":{"found":false,"data":null,"reason":"suspended"}, "costUsd":0.00022, "source":{"id":"anonymous-badger"}}

and the same handle on a rescue source answers the same word:

POST /v1/run/twitter.profile {"handle":"DonaldJTrumpJr_","ignoreSources":["anonymous-badger"]}
{"output":{"found":false,"data":null,"reason":"suspended"}, "costUsd":0.0003, "source":{"id":"anonymous-lynx"}}

🤖 Generated with Claude Code

kev1n and others added 2 commits September 17, 2026 12:44
…ut schema publishes

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…I can answer with

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@kev1n
kev1n merged commit c8c4954 into main Sep 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant