<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: OpenAny</title>
    <description>The latest articles on DEV Community by OpenAny (@openany).</description>
    <link>https://dev.to/openany</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4211989%2F9a267889-3c0b-4847-8c5f-52fb8fc13b28.png</url>
      <title>DEV Community: OpenAny</title>
      <link>https://dev.to/openany</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/openany"/>
    <language>en</language>
    <item>
      <title>B2A Marketplace: Wrap a Local Skill as a Callable Endpoint (Minimal Example)</title>
      <dc:creator>OpenAny</dc:creator>
      <pubDate>Wed, 18 Nov 2026 05:02:34 +0000</pubDate>
      <link>https://dev.to/openany/b2a-marketplace-wrap-a-local-skill-as-a-callable-endpoint-minimal-example-5g81</link>
      <guid>https://dev.to/openany/b2a-marketplace-wrap-a-local-skill-as-a-callable-endpoint-minimal-example-5g81</guid>
      <description>&lt;p&gt;A skill that only runs in your terminal is not yet something an authorized AI agent can discover, call, and pay for. On a B2A marketplace, the missing piece is often a small, documented HTTP contract in front of work you already run yourself.&lt;/p&gt;

&lt;p&gt;I build OpenAny, a &lt;a href="https://openany.si/" rel="noopener noreferrer"&gt;B2A marketplace&lt;/a&gt; in the Business-to-Agent sense — selling to an agent that acts for a person or an organization, not the older Business-to-Administration sense. This article is a local, self-contained example of that packaging step. It is not a listing walkthrough, not an official OpenAny SDK, and not a promise that a listing will sell.&lt;/p&gt;

&lt;p&gt;The longer seller guide lives on the &lt;a href="https://blog.openany.si/posts/b2a-marketplace-how-to-sell-skills-bots-apis-and-data-to-ai-agents/" rel="noopener noreferrer"&gt;OpenAny Blog&lt;/a&gt;. Use that for Seller Console binding, pricing, and publication. Keep this file for the runtime contract you can test on your own machine first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you are wrapping
&lt;/h2&gt;

&lt;p&gt;OpenAny’s seller docs distinguish two products. A &lt;strong&gt;downloadable template&lt;/strong&gt; gives the buyer files or a package to run in their environment. A &lt;strong&gt;callable service&lt;/strong&gt; is work you run, through an endpoint you control, that returns an agreed result. OpenAny connects the two sides. It does not host or operate your bot, skill, or external service.&lt;/p&gt;

&lt;p&gt;This example wraps the official illustrative &lt;strong&gt;Competitor research skill&lt;/strong&gt; from those docs: the buyer sends an industry, a region, competitor names, and a question; you return a comparison, source links, a brief, and explicit gaps. The sample is not a listing we have sold. The server below does not search the web and does not call a paid API. It answers from a hard-coded example set so you can inspect the contract locally, at no charge.&lt;/p&gt;

&lt;p&gt;A Hermes agent, a Grok Bot, or any other bot follows the same rule: it is sellable as a callable service only if you can expose a trigger and return a result. Uploading a template is not the same as selling remote execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  The path of a call — and where this demo sits
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fesuzeqo8cre570g40hlw.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fesuzeqo8cre570g40hlw.webp" alt="Conceptual five-step flow: a human authorizes a budget, the buyer’s agent calls, OpenAny routes and meters, the seller-owned runtime executes, and the result and usage record come back." width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Conceptual flow, not a product screenshot. The buyer’s agent and your service both run outside OpenAny. Charges follow the listing’s billing unit and charge conditions; payment does not have to be a separate step before every call. Same diagram as the main blog guide.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The local server in this article stands in only for the box on the right: &lt;strong&gt;your endpoint executes&lt;/strong&gt;. It does not implement OpenAny routing, metering, buyer authorization, or Seller Console binding. Sign-in is not permission to spend; a person still has to authorize a budget before a paid call. Those steps belong in the &lt;a href="https://blog.openany.si/posts/b2a-marketplace-how-to-sell-skills-bots-apis-and-data-to-ai-agents/" rel="noopener noreferrer"&gt;main guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  An illustrative contract, not an OpenAny schema
&lt;/h2&gt;

&lt;p&gt;The JSON below is a sample payload for this skill. It is &lt;strong&gt;not&lt;/strong&gt; an OpenAny platform API contract, not a required field list, and not a live route. The public seller docs do not publish one fixed request/response schema that every listing must use. Field names such as &lt;code&gt;ok&lt;/code&gt;, &lt;code&gt;coverage&lt;/code&gt;, and &lt;code&gt;error.code&lt;/code&gt; belong to this illustration. Example company names are fictional.&lt;/p&gt;

&lt;p&gt;Request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"industry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"developer tools"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"target_region"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Southeast Asia"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"competitor_names"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ExampleCo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Sample Labs"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"question"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"How do these companies describe their agent integrations in public, and where is the evidence thin?"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A useful result states sources, freshness, and coverage, not only a paragraph of prose. A useful failure is a &lt;strong&gt;business error&lt;/strong&gt; you have already described — for example, a region outside published coverage — not a crashed process disguised as an empty brief.&lt;/p&gt;

&lt;p&gt;One charge-rule warning, because it is easy to get wrong: in a 17 November 2026 Seller Console recording, the visible default charge condition was “HTTP status is 200–299”. Seller Terms say an HTTP success status alone does not establish that you delivered the agreed result. If this demo returns HTTP 200 with &lt;code&gt;"ok": false&lt;/code&gt; for an out-of-scope request, that is a contract choice you must publish. If your charge rule is “HTTP 200–299”, that response could be billed. Either use a charge condition that matches agreed delivery, or return a non-success status when you do not intend to charge. Do not invent a platform-wide rule beyond what your listing says.&lt;/p&gt;

&lt;h2&gt;
  
  
  A local adapter you can actually run
&lt;/h2&gt;

&lt;p&gt;The complete script is below (Python 3 standard library only). Save it as &lt;code&gt;dev-local-demo.py&lt;/code&gt; on your own machine if you want to run it. It binds to &lt;code&gt;127.0.0.1&lt;/code&gt;. The default port &lt;code&gt;8765&lt;/code&gt; is a &lt;strong&gt;local example only&lt;/strong&gt; — not an OpenAny port. If that port is busy, pass &lt;code&gt;--port&lt;/code&gt; and use the same value in the curl commands. There is no go-live command, no official timeout, and no installable OpenAny client in this file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#!/usr/bin/env python3&lt;/span&gt;
&lt;span class="s2"&gt;"""Local demonstration only.

This is not an OpenAny SDK, not a Seller Console binding, not a live listing,
and not a billed call. It shows how a local function can sit behind a JSON
HTTP contract on your own machine.

The default bind address is 127.0.0.1. The default port 8765 is only a local
example; change it with --port if that port is busy. It is not an OpenAny port.

Example company names and URLs are illustrative. The handler does not call
paid APIs or the public internet.
"""&lt;/span&gt;

&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;__future__&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;annotations&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;argparse&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;BaseHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ThreadingHTTPServer&lt;/span&gt;

&lt;span class="c1"&gt;# Example coverage only — not a production catalog.&lt;/span&gt;
&lt;span class="no"&gt;ALLOWED_REGIONS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"Southeast Asia"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"North America"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="no"&gt;EXAMPLE_PUBLIC_PAGES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"ExampleCo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/docs/agents"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"Sample Labs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include_usage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;industry&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"industry"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"target_region"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;names&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"competitor_names"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;question&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"question"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;industry&lt;/span&gt;
        &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt;
        &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;question&lt;/span&gt;
        &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;
        &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nb"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INVALID_INPUT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"industry, target_region, competitor_names, and question are required."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;ALLOWED_REGIONS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"OUT_OF_SCOPE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"The requested region is outside the published coverage. No research was run."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"coverage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"as_of"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-18"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"limits"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"This local demo only accepts the example regions Southeast Asia and North America."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;comparison&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;gaps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;EXAMPLE_PUBLIC_PAGES&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;comparison&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"finding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Public docs describe an official agent integration."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"source_urls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;comparison&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"finding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"No comparable public integration page was found in the local example set."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"source_urls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"No public pricing page for {name} was found as of the coverage date."&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"brief"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Local simulation only: results come from a fixed example set, not a live web search."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"comparison"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;comparison&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"evidence_gaps"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"coverage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"as_of"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-18"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"sources"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Hard-coded example pages in this demo (example.com). Not a live crawl."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"limits"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"English-language public web only in this illustration; not complete, real-time, or legally cleared."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;# usage.count is shown only when requested. A fixed-price brief does not need it.&lt;/span&gt;
    &lt;span class="c1"&gt;# The shape matches the 17 November 2026 Seller Console helper; this demo does not bill anyone.&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;include_usage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"usage"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;BaseHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;log_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"[demo]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;address_string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"-"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ensure_ascii&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_header&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Content-Type"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"application/json; charset=utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_header&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Content-Length"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end_headers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wfile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;do_POST&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;"/brief"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"NOT_FOUND"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"POST /brief only."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;
        &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Content-Length"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rfile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="s2"&gt;"null"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;UnicodeDecodeError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;JSONDecodeError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INVALID_JSON"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Body must be JSON."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INVALID_JSON"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"JSON object required."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;
        &lt;span class="n"&gt;include_usage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"?usage=1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"include_usage"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;
        &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include_usage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;parser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;argparse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ArgumentParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Local JSON contract demo (not an OpenAny service)."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"--host"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"127.0.0.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Bind address (default: 127.0.0.1)."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;"--port"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8765&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nb"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Local example port only (default: 8765). Change it if the port is busy. Not an OpenAny port."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse_args&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ThreadingHTTPServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Handler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Local demo listening on http://{args.host}:{args.port}/brief"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flush&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"This is a machine-local example. It is not an OpenAny endpoint and does not bill."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flush&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serve_forever&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;KeyboardInterrupt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\nStopping local demo."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shutdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"__main__"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 dev-local-demo.py --host 127.0.0.1 --port 8765
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is the handler: validate inputs, reject out-of-scope work without pretending to research it, and return coverage notes. The field &lt;code&gt;usage.count&lt;/code&gt; is omitted for a fixed-price brief. It appears only when you pass &lt;code&gt;"include_usage": true&lt;/code&gt;, in the shape shown by the Seller Console helper on 17 November 2026. This demo does not bill anyone.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;ALLOWED_REGIONS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"Southeast Asia"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"North America"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="no"&gt;EXAMPLE_PUBLIC_PAGES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"ExampleCo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com/docs/agents"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"Sample Labs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include_usage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;industry&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"industry"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"target_region"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;names&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"competitor_names"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;question&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"question"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;industry&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;question&lt;/span&gt;
        &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INVALID_INPUT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"industry, target_region, competitor_names, and question are required."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;ALLOWED_REGIONS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"OUT_OF_SCOPE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"The requested region is outside the published coverage. No research was run."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"coverage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"as_of"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-18"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"limits"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"This local demo only accepts the example regions Southeast Asia and North America."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;comparison&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gaps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;EXAMPLE_PUBLIC_PAGES&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;comparison&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"finding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Public docs describe an official agent integration."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"source_urls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;comparison&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"finding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"No comparable public integration page was found in the local example set."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"source_urls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"No public pricing page for {name} was found as of the coverage date."&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"brief"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Local simulation only: results come from a fixed example set, not a live web search."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"comparison"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;comparison&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"evidence_gaps"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;gaps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"coverage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"as_of"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-18"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"sources"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Hard-coded example pages in this demo (example.com). Not a live crawl."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"limits"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Not complete, real-time, or legally cleared research."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;include_usage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"usage"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The HTTP server in the same file only accepts &lt;code&gt;POST /brief&lt;/code&gt; and never leaves your machine. Copy the script, then run the checks below against whatever local port you chose.&lt;/p&gt;

&lt;p&gt;In-scope example (HTTP 200, &lt;code&gt;ok: true&lt;/code&gt;, example.com sources only):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; -d &lt;span class="s1"&gt;'{
  "industry": "developer tools",
  "target_region": "Southeast Asia",
  "competitor_names": ["ExampleCo", "Sample Labs"],
  "question": "How do these companies describe their agent integrations in public, and where is the evidence thin?"
}'&lt;/span&gt; http://127.0.0.1:8765/brief
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Out-of-scope example (HTTP 200, &lt;code&gt;ok: false&lt;/code&gt;, &lt;code&gt;OUT_OF_SCOPE&lt;/code&gt; — see the charge-rule warning above):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; -d &lt;span class="s1"&gt;'{
  "industry": "developer tools",
  "target_region": "Antarctica",
  "competitor_names": ["ExampleCo"],
  "question": "Example question only."
}'&lt;/span&gt; http://127.0.0.1:8765/brief
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A malformed body should not look like a brief. In this demo it returns HTTP 400 and &lt;code&gt;INVALID_INPUT&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These checks were run locally on 18 November 2026 against a copy of the script on &lt;code&gt;127.0.0.1&lt;/code&gt; (the example port was already in use on the test machine, so a different local port was used). All three outcomes matched the contract above. Optional &lt;code&gt;include_usage: true&lt;/code&gt; returned &lt;code&gt;"usage": {"count": 2}&lt;/code&gt; for two competitor names. No paid network calls were made.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this adapter is not
&lt;/h2&gt;

&lt;p&gt;It is not a Seller Console listing, not a curl recipe for a live OpenAny route, and not a substitute for supplier admission, a bounded test, or publication. When you later bind a real endpoint in the console, you use a seller API Key connection — seller credentials, not a buyer OpenAny API key — and you keep those credentials out of the public listing, copied instructions, and screenshots. Publication and runtime readiness are separate states.&lt;/p&gt;

&lt;p&gt;If you later choose usage-based billing, the seller docs ask for a trustworthy quantity in the response, plus the JSON Pointer, unit, and rounding you configure. The console helper showed that quantity as &lt;code&gt;usage.count&lt;/code&gt;. Use that pattern only when your charge rule points at that field. A defined brief usually fits &lt;strong&gt;fixed price per call&lt;/strong&gt; and does not need a usage quantity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do next
&lt;/h2&gt;

&lt;p&gt;Run the local checks until the in-scope result, the out-of-scope error, and the invalid-input error are all stable. Then read the &lt;a href="https://blog.openany.si/posts/b2a-marketplace-how-to-sell-skills-bots-apis-and-data-to-ai-agents/" rel="noopener noreferrer"&gt;full seller walkthrough&lt;/a&gt; for packaging, pricing, failed-call billing, and the pre-publish checklist. Copying this example does not submit an application, authorize a paid test, or publish anything.&lt;/p&gt;

&lt;p&gt;If you want a closer look at async delivery, metering, and duplicate callbacks — not at local packaging — that is a different article in this series, not a second copy of this one.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>api</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Give Your AI Agent Fresh Data for Research, Leads, and News</title>
      <dc:creator>OpenAny</dc:creator>
      <pubDate>Tue, 17 Nov 2026 05:46:10 +0000</pubDate>
      <link>https://dev.to/openany/how-to-give-your-ai-agent-fresh-data-for-research-leads-and-news-3c8b</link>
      <guid>https://dev.to/openany/how-to-give-your-ai-agent-fresh-data-for-research-leads-and-news-3c8b</guid>
      <description>&lt;p&gt;When an AI agent researches competitors, looks for leads, or tracks industry news, the most common failure is not that it finds nothing. It is that it writes unverified material as if it were a conclusion. A model may put outdated pricing into a comparison table, treat three negative reviews as "users are generally unhappy," or count five reprints of the same story as five separate events. Models are good at organizing and drafting, but they do not have the live pages from the time window you specified.&lt;/p&gt;

&lt;p&gt;To get these three jobs right, first define the deliverables and the acceptance criteria, then decide what to search, which pages to scrape, and which public discussions to listen to. All three will use web search, page scraping, and social data at the same time. If you sign up with each vendor separately, you have to maintain multiple keys and multiple bills. Below, we will use &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;OpenAny&lt;/a&gt; to put these three kinds of APIs behind one API key and one prepaid balance, charge per call, and structure the results by task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start by defining acceptance criteria for competitor research, lead finding, and news tracking
&lt;/h2&gt;

&lt;p&gt;What you should deliver is not "a pile of links." It is three outputs you can verify.&lt;/p&gt;

&lt;p&gt;The first is a competitor comparison table: how each official site positions itself, the current pricing model and the plans visible on the page, and themes that keep showing up in user feedback, with a source link and a scrape time for every item. The second is a lead table: entries that come only from public business signals, with a score and an outreach draft that still needs review, and that has not been sent. The third is an industry-news brief: deduplicated by event, with a verifiable time and the link closest to the source for each item.&lt;/p&gt;

&lt;p&gt;The three workflows share a few rules. Use only publicly accessible information. Do not bypass logins. Do not scrape private contact details. Keep facts and judgments apart: pricing figures must go back to the official page; reviews are feedback, not a substitute for official statements. If something is missing, write "not obtained." Do not fill the gap from the model's memory. Label observation times in Asia/Taipei. For lead finding, draw a clear line first: the agent only researches, scores, and drafts; a person decides whether to make contact. Do not send messages automatically, and do not go verify private email addresses or phone numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect web search, page scraping, and social data to the same workflow with OpenAny
&lt;/h2&gt;

&lt;p&gt;Once acceptance is clear, the question becomes where this real-time data comes from and how to attach it to the agent.&lt;/p&gt;

&lt;p&gt;Create an account and an API key at &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;openany.si&lt;/a&gt;, and put &lt;code&gt;OPENANY_API_KEY&lt;/code&gt; in the runtime environment, not in the prompt. Creating the account and the key is free. Actual calls are billed per call from a prepaid balance, not as a monthly subscription. The same key and the same balance can call web search, page scraping, and social data. When you need to organize fields or draft a reply, you can also call a model. That covers the three workflows above. Before you call, check the &lt;a href="https://openany.si/docs/" rel="noopener noreferrer"&gt;docs&lt;/a&gt; or the catalog for inputs and prices.&lt;/p&gt;

&lt;p&gt;You only need to remember one thing when you pick an API: OpenAny is a B2A (business to agent) marketplace. The same capability can be listed by multiple sellers. By default it routes to the lowest price among sellers that can serve the request at that moment, and it fails over automatically. The price shown in the catalog is not a price lock. A call is usually billed only when it succeeds (&lt;code&gt;http_status&lt;/code&gt; is 200).&lt;/p&gt;

&lt;p&gt;You do not have to turn the catalog into a list. This default split is enough: use Serper Search to discover official sites, pricing pages, and documentation entry points; use Web Scrape for official pages or news originals you have already confirmed, and use Tavily Extract when you need to scrape several pages at once, then check the failure list; use Tavily Search when you need a time filter or snippets. Use Reddit Search and X Search for user feedback and public demand; use Google News for industry coverage, and add Hacker News Search when you want technical-community discussion. The required fields are straightforward: a query for search, and an already confirmed URL for scraping.&lt;/p&gt;

&lt;p&gt;Verification matters more. Keep titles and links from search results; do not treat a snippet as current pricing. After scraping, check whether the body contains the passage you need; if it is empty, mark it "not obtained." Keep the original link and timestamp for social results. For a publish time from a news API, it is better to open the original page and check it. On X Search, multiple terms must all appear in a hit by default, so packing in too many words often returns nothing.&lt;/p&gt;

&lt;p&gt;According to catalog metadata from 2026-11-17, Serper Search is listed at $0.001 per successful call, and Google News at $0.00099 per successful call. Web Scrape, Reddit Search, and X Search are rule-based prices; the default routes are about $0.000701, $0.000351, and $0.000601. Tavily Search and Tavily Extract are billed per credit, and the catalog lists $0.008 per 1 credit, so $0.008 must not be treated as the bill for a single call. None of these figures is a charged receipt for this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow 1: How an AI agent researches competitors
&lt;/h2&gt;

&lt;p&gt;Start with web search to locate official sites, pricing pages, and documentation, then scrape the body of those pages.&lt;/p&gt;

&lt;p&gt;As a schematic category, we will use "public services that give developers and AI agents access to models or data APIs," and take OpenRouter, Together AI, and Fireworks as samples. All three have public official sites and pricing pages. This section only demonstrates the process and the output fields. It does not fill in these companies' current plan prices, and it does not invent user quotes. OpenAny is the execution tool; it does not enter the comparison table as a winner or loser.&lt;/p&gt;

&lt;p&gt;First use Serper Search to find official sites and pricing pages. Queries can be &lt;code&gt;OpenRouter pricing&lt;/code&gt;, &lt;code&gt;Together AI pricing&lt;/code&gt;, &lt;code&gt;Fireworks AI pricing&lt;/code&gt;, plus changelog or docs, and then pick URLs by the official domain. Next, use Web Scrape on the already confirmed homepages and pricing pages. When you scrape several pages at once, you can use Tavily Extract, but you must check the failure list. Then extract from the body: a one-sentence positioning statement, the billing unit, visible plans, whether there is a free tier, whether the enterprise tier says "contact sales," and any recent update visible on the page. If you use a model to organize the fields, every number must be traceable to the scraped text. Finally, use Reddit Search and X Search with the product name plus &lt;code&gt;pricing&lt;/code&gt; or &lt;code&gt;alternative&lt;/code&gt;, collect users' own words, and record the sample size and time. Do not write "people generally think."&lt;/p&gt;

&lt;p&gt;When an official page and a media paraphrase conflict, the official page wins. If the scrape fails, or the body has no price, write "not obtained." Do not backfill an old number from memory.&lt;/p&gt;

&lt;p&gt;A schematic output looks like this. Every row is a placeholder, not a scrape result:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Official site&lt;/th&gt;
&lt;th&gt;Pricing page&lt;/th&gt;
&lt;th&gt;Pricing model&lt;/th&gt;
&lt;th&gt;Visible plans&lt;/th&gt;
&lt;th&gt;Feedback themes (sample size)&lt;/th&gt;
&lt;th&gt;Scraped at&lt;/th&gt;
&lt;th&gt;Gaps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter&lt;/td&gt;
&lt;td&gt;[to fill: official URL]&lt;/td&gt;
&lt;td&gt;[to fill: pricing page URL]&lt;/td&gt;
&lt;td&gt;[to fill: use the pricing page text]&lt;/td&gt;
&lt;td&gt;[not obtained]&lt;/td&gt;
&lt;td&gt;[to fill: theme + sample size + original post link]&lt;/td&gt;
&lt;td&gt;[to fill: Asia/Taipei]&lt;/td&gt;
&lt;td&gt;Schematic; not yet scraped&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Together AI&lt;/td&gt;
&lt;td&gt;[to fill: official URL]&lt;/td&gt;
&lt;td&gt;[to fill: pricing page URL]&lt;/td&gt;
&lt;td&gt;[to fill: use the pricing page text]&lt;/td&gt;
&lt;td&gt;[not obtained]&lt;/td&gt;
&lt;td&gt;[to fill: theme + sample size + original post link]&lt;/td&gt;
&lt;td&gt;[to fill: Asia/Taipei]&lt;/td&gt;
&lt;td&gt;Schematic; not yet scraped&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fireworks&lt;/td&gt;
&lt;td&gt;[to fill: official URL]&lt;/td&gt;
&lt;td&gt;[to fill: pricing page URL]&lt;/td&gt;
&lt;td&gt;[to fill: use the pricing page text]&lt;/td&gt;
&lt;td&gt;[not obtained]&lt;/td&gt;
&lt;td&gt;[to fill: theme + sample size + original post link]&lt;/td&gt;
&lt;td&gt;[to fill: Asia/Taipei]&lt;/td&gt;
&lt;td&gt;Schematic; not yet scraped&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For acceptance, pick three pricing or feature conclusions at random; you must be able to open the corresponding scraped page and see the original wording. Cells without a source should say "not obtained." Keep user feedback in its own column, with the time and sample size. The table is for comparison, not for ranking "who is best." Pricing pages often depend on front-end rendering, so a scrape may be incomplete. "Contact sales" usually has no public number. Reviews have selection bias. Search may also rank older pages first. So the current scraped page is what counts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow 2: How an AI agent finds leads
&lt;/h2&gt;

&lt;p&gt;In public discussions, people often say they have too many keys to manage, they want pay-per-call billing, or they want models and web search connected together. These are usable public business signals. They are not a license to contact people automatically.&lt;/p&gt;

&lt;p&gt;Start by defining the ICP. For this schematic workflow, that is developers, founders, or growth people who are connecting models or data APIs to an agent. Useful signals can include public complaints about too many keys, questions about pay-per-call pricing, and discussions of how to connect models and web search at the same time. You can start with a window of the past 30 days, and cap the output at a top 10.&lt;/p&gt;

&lt;p&gt;The main sources are social search. Use X Search, Reddit Search, and Hacker News Search when needed, with short queries, to find public questions or demand. Schematic directions include &lt;code&gt;too many API keys&lt;/code&gt;, &lt;code&gt;pay per call&lt;/code&gt;, and &lt;code&gt;one API key for models&lt;/code&gt;. Do not pack many unrelated terms into one query. For every lead, keep the original text, publicly visible author information, the link, and the time. When you need more context, use Serper Search to find a public homepage, blog, or jobs page, and use Web Scrape only on those already located public pages. Then score by signal strength and ICP fit, and generate a reply draft for human review. Organizing and drafting can use a model under the same key, but a person decides whether anything is sent.&lt;/p&gt;

&lt;p&gt;For a narrower, X-only walkthrough of finding buying intent, see &lt;a href="https://blog.openany.si/posts/find-customer-leads-on-x-with-coding-agent" rel="noopener noreferrer"&gt;Let Your Coding Agent Find Real Customer Leads on X&lt;/a&gt;. This article is broader and more restrained, and it does not reuse the bills from that run.&lt;/p&gt;

&lt;p&gt;A schematic output looks like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Lead&lt;/th&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Original post&lt;/th&gt;
&lt;th&gt;Public signal&lt;/th&gt;
&lt;th&gt;ICP fit&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Observed at&lt;/th&gt;
&lt;th&gt;Draft status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;lead-01&lt;/td&gt;
&lt;td&gt;X / Reddit / HN&lt;/td&gt;
&lt;td&gt;[to fill: permalink]&lt;/td&gt;
&lt;td&gt;[to fill: excerpt of the original post]&lt;/td&gt;
&lt;td&gt;High / medium / low + rationale&lt;/td&gt;
&lt;td&gt;[to fill]&lt;/td&gt;
&lt;td&gt;[to fill: Asia/Taipei]&lt;/td&gt;
&lt;td&gt;Drafted, not sent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lead-02&lt;/td&gt;
&lt;td&gt;X / Reddit / HN&lt;/td&gt;
&lt;td&gt;[to fill: permalink]&lt;/td&gt;
&lt;td&gt;[to fill: excerpt of the original post]&lt;/td&gt;
&lt;td&gt;High / medium / low + rationale&lt;/td&gt;
&lt;td&gt;[to fill]&lt;/td&gt;
&lt;td&gt;[to fill: Asia/Taipei]&lt;/td&gt;
&lt;td&gt;Drafted, not sent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The table should not contain private email addresses or phone numbers. For acceptance, every row must open to the original post. Entries that cannot be verified, or that are clearly off-topic, should be dropped or marked as low confidence. Social search is not a complete index, and deleted posts or visibility changes can also break links. A media paraphrase is not the person's own words.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow 3: How an AI agent tracks industry news
&lt;/h2&gt;

&lt;p&gt;Research answers a specific question. Monitoring watches what changes under a defined topic. The value of a brief is not the number of items, but that the same event appears once and can be traced back to its source.&lt;/p&gt;

&lt;p&gt;The input can stay in the same category: the sample product names, plus topic terms such as API marketplace and LLM API. Start with a window of the past 7 days. A useful source priority is: official blogs or changelogs above first-hand reporting, first-hand reporting above reprints, and reprints above social discussion.&lt;/p&gt;

&lt;p&gt;First use Google News with the time range limited to the past 7 days, and collect titles, links, publisher names, and publish times. When you need more web results, use Serper Search, or Tavily Search in a news topic. Then use X Search, Reddit Search, and Hacker News Search when needed, to add official-account or community first posts. Keep only one primary record per event. For key originals that will go into the brief, open them again with Web Scrape and check: whether the title is overstated, and whether the date was changed in a reprint. A timestamp from a news API may be a crawl time; the page should be the authority.&lt;/p&gt;

&lt;p&gt;When you deduplicate, merge by a normalized URL, title similarity, and event elements (who did what). The primary record keeps the earliest verifiable time and the link closest to the source. Reprints go under "Also seen." Items without a reliable time are listed separately; do not put them under "past 7 days" or "past 24 hours."&lt;/p&gt;

&lt;p&gt;A schematic output looks like this. Every row is a placeholder, not a collection result:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event&lt;/th&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;Event time&lt;/th&gt;
&lt;th&gt;Primary source&lt;/th&gt;
&lt;th&gt;Source type&lt;/th&gt;
&lt;th&gt;Also seen&lt;/th&gt;
&lt;th&gt;Gaps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;event-01&lt;/td&gt;
&lt;td&gt;[to fill: title after checking the original]&lt;/td&gt;
&lt;td&gt;[to fill: use the original / time unconfirmed]&lt;/td&gt;
&lt;td&gt;[to fill: primary link]&lt;/td&gt;
&lt;td&gt;Official / first-hand report / reprint / social&lt;/td&gt;
&lt;td&gt;[to fill, or none]&lt;/td&gt;
&lt;td&gt;Schematic; not yet collected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;event-02&lt;/td&gt;
&lt;td&gt;[to fill: title after checking the original]&lt;/td&gt;
&lt;td&gt;[to fill: use the original / time unconfirmed]&lt;/td&gt;
&lt;td&gt;[to fill: primary link]&lt;/td&gt;
&lt;td&gt;Official / first-hand report / reprint / social&lt;/td&gt;
&lt;td&gt;[to fill, or none]&lt;/td&gt;
&lt;td&gt;Schematic; not yet collected&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Acceptance is straightforward: the same event does not repeat in the main list; every item has a clickable source and a verifiable time; items whose time cannot be confirmed sit in a separate list; and you do not treat a repost count as an event count. It is normal for the same press release to be reprinted by many outlets. If search did not cover a language or region, say so in the brief.&lt;/p&gt;

&lt;h2&gt;
  
  
  A single example: finish all three tasks with the same key
&lt;/h2&gt;

&lt;p&gt;When you connect the three workflows above, use the same sample set and the same time window, and produce the comparison table, the lead table, and the deduplicated brief in one pass. The task prompt below can be given to an agent that already has OpenAny connected. It describes the process and the acceptance criteria, not a run that has already been completed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use only public information to produce three verifiable outputs. Do not contact anyone automatically. Do not scrape private email addresses or phone numbers. If data is missing, write "not obtained."

Schematic samples: OpenRouter, Together AI, Fireworks. OpenAny is only the data access layer; do not write it as the winner in the comparison table. Use Asia/Taipei for observation times.

1) Competitor research: use web search to find these three companies' official sites and pricing pages, then scrape the body of the confirmed pages. Extract positioning, billing unit, visible plans, and whether the page says "contact sales." Then use Reddit and X to collect users' own words from the past 30 days; you must record the sample size and links. Pricing is based on the scraped page. Do not fill in numbers from a search snippet or from memory.

2) Finding leads: on X, Reddit, and Hacker News when needed, use short queries to find public signals, such as someone complaining about too many API keys, asking about pay-per-call pricing, or wanting to connect models and web search. For each lead, keep the original post link, publicly visible author information, and the time. After scoring, draft a reply, and mark every draft as "not sent." Output no more than 10 leads.

3) Tracking industry news from the past 7 days: collect related coverage with news search, scrape key originals again to check times and wording, and deduplicate by event. The primary record keeps the earliest verifiable time and the link closest to the source. Put reprints under "Also seen." List items without a reliable time separately.

First list the search, scrape, and social-data APIs you plan to call, along with the queries; then provide the three tables. For any cell that has not been scraped or cannot be verified, write "not obtained."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the price before you call. If you later turn the schematic tables into a real run, record the request id and the settlement receipt from that time, and keep them distinct from catalog list prices. Do not reuse old bills from other articles, and do not write "this run cost X" when no run has been made.&lt;/p&gt;

&lt;p&gt;For a more detailed pattern of searching first and then letting a model organize the results, see &lt;a href="https://blog.openany.si/posts/ai-agent-llms-and-web-search-one-api-key" rel="noopener noreferrer"&gt;How to Give Your AI Agent LLMs and Web Search With One API Key&lt;/a&gt;. This article is not about answering a single question. It is about using the same key across three workflows you can accept. For how agents discover, choose, and pay for services, continue with &lt;a href="https://blog.openany.si/posts/the-b2a-economy-how-ai-agents-discover-choose-and-pay-for-services/" rel="noopener noreferrer"&gt;The B2A Economy&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common limits: freshness, coverage, missing data, and errors
&lt;/h2&gt;

&lt;p&gt;This method can speed up "finding" and "checking." It cannot cancel the need to verify. Web search is not a complete index, and it may rank old pages first. Pricing pages and some news pages depend on front-end rendering, so a scrape may return an incomplete body. Social and news search both have coverage limits. Deleted posts, visibility changes, and syndicated press releases will also distort the results.&lt;/p&gt;

&lt;p&gt;Conclusions can only rest on scraped body text, clickable original posts, and times that have already been checked. A model can help classify and draft, but it should not be the only source of fact. Writing down what is missing is more useful than filling in a number that only looks complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Should an AI agent search first, or scrape pages first, when it researches competitors?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start with web search to locate official sites, pricing pages, and documentation, then scrape the body of those pages. Snippets and older articles in search results are not current pricing. Figures you did not scrape should be marked "not obtained," not filled in from the model's memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can an AI agent automatically message people or harvest email addresses when it looks for leads?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We do not recommend it, and this article is not designed that way. The agent only handles public business signals, and it outputs scores and drafts that still need review. A person decides whether to make contact. Sending messages automatically, verifying private email addresses, or scraping non-public contact details is both out of bounds and a reliable way to degrade list quality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How should an industry-news brief be deduplicated while keeping times and sources?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Merge by event, not by the number of headlines. For the same event, keep the earliest verifiable time and the link closest to the source, and put reprints under "Also seen." List items without a reliable time separately; do not put them under "past 24 hours."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why can't you rely on a model alone to answer competitor and news questions?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A model does not have the live pages from the time window you specified. Pricing, product changes, and discussion live on official sites and public social sources, and they need search, scraping, and verification. Models are good at organizing and drafting. They are not a sufficient sole source of fact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do these three workflows belong on the same API key?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They all use web search, page scraping, and social data at the same time. Connecting each vendor separately means maintaining multiple keys and multiple bills. OpenAny is a B2A marketplace that puts these APIs from multiple sellers behind one key and one prepaid balance, bills per call, and routes to the lowest price available at that moment by default. It provides the tools. It does not replace your ICP, your acceptance criteria, or human review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;For an AI agent that researches competitors, finds leads, and tracks industry news, the key is not hooking a search box up to a model. It is defining acceptance first, then retrieving public data that can be checked, task by task. With the same OpenAny key and the same prepaid balance, you can connect web search, page scraping, and social data on a pay-per-call basis, but every conclusion still has to go back to a source, a time, and the original text. The next step is concrete: define the fields of the three tables, call the APIs according to the workflows, and leave "not obtained" in the cells where it belongs. To inspect the catalog and how to call it, start at &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;openany.si&lt;/a&gt; and the &lt;a href="https://openany.si/docs/" rel="noopener noreferrer"&gt;docs&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>tutorial</category>
      <category>agents</category>
    </item>
    <item>
      <title>One API Key for X, Reddit, TikTok and Web Scraping: Pay-Per-Request Social Data for AI Agents</title>
      <dc:creator>OpenAny</dc:creator>
      <pubDate>Mon, 16 Nov 2026 02:18:34 +0000</pubDate>
      <link>https://dev.to/openany/one-api-key-for-x-reddit-tiktok-and-web-scraping-pay-per-request-social-data-for-ai-agents-1m1d</link>
      <guid>https://dev.to/openany/one-api-key-for-x-reddit-tiktok-and-web-scraping-pay-per-request-social-data-for-ai-agents-1m1d</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: this post is written by the OpenAny team, and OpenAny is our product. We show the actual requests, prices and one failure we hit, so you can reproduce it or pick something else.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; if your agent needs public social data (X/Twitter posts, Reddit threads, TikTok videos) &lt;em&gt;and&lt;/em&gt; generic web pages, you can either sign up with one scraper vendor per platform, or use a pay-per-call marketplace where all of those sit behind one key and one prepaid balance. This post walks through the second option with &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;OpenAny&lt;/a&gt;: four real calls, what each cost, and the knobs that keep an agent from overspending.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why social data is awkward for agents
&lt;/h2&gt;

&lt;p&gt;A typical "what are people saying about X?" agent task touches several sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;recent posts from a specific X account,&lt;/li&gt;
&lt;li&gt;Reddit threads in one or two subreddits,&lt;/li&gt;
&lt;li&gt;trending TikTok videos for a hashtag,&lt;/li&gt;
&lt;li&gt;and a couple of linked articles that need to be turned into clean text.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Done the usual way, that's three or four vendor accounts, keys in the agent's environment for each, separate dashboards and separate monthly minimums. For an agent that runs a few research tasks a day, the subscriptions often cost more than the data.&lt;/p&gt;

&lt;p&gt;Pay-per-request fits this workload better: the agent pays for the calls it actually makes, and you set the budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup: one key, one MCP server
&lt;/h2&gt;

&lt;p&gt;Create a key at &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;openany.si&lt;/a&gt; (new accounts get a $0.50 signup credit, which is plenty for everything in this post), then put it in your client's environment as &lt;code&gt;OPENANY_API_KEY&lt;/code&gt;. Never paste it into a prompt.&lt;/p&gt;

&lt;p&gt;For Claude Code, Cursor or any MCP client that speaks Streamable HTTP, the docs give this entry for &lt;code&gt;.mcp.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"openany"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://mcp.openany.si/mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Bearer ${OPENANY_API_KEY}"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tool discovery is public; executing a paid call needs the key. There is no OAuth step. If your agent prefers a terminal, the same catalog is available through the CLI (&lt;code&gt;npm install -g openany-cli@latest&lt;/code&gt;, then &lt;code&gt;openany discover -q "reddit search" -j&lt;/code&gt; and &lt;code&gt;openany inspect --id API_ID -j&lt;/code&gt;). Details are in &lt;a href="https://openany.si/docs/" rel="noopener noreferrer"&gt;the docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The workflow: discover, inspect, then call
&lt;/h2&gt;

&lt;p&gt;The pattern is the same for every source, and it's worth teaching your agent explicitly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Discover&lt;/strong&gt;: search the catalog by keyword or platform (free, no key needed).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inspect&lt;/strong&gt;: read the exact input schema and the current price of one concrete API (free).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Call&lt;/strong&gt;: run it once, inside a budget you set.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When we checked on 2026-11-15, the first page of a keyword search for "reddit search posts" already showed Reddit search endpoints from three providers (AnyAPI, JustOneAPI and Scrape Creators). That's the point of inspecting first: the same capability can have several offerings, each with its own schema and price.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four real calls
&lt;/h2&gt;

&lt;p&gt;All prices below are the &lt;code&gt;costUsd&lt;/code&gt; each response reported on 2026-11-15 — the amount actually charged. Prices can change; inspect before you call.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Reddit: search one subreddit
&lt;/h3&gt;

&lt;p&gt;API: &lt;code&gt;anyapi_post_v1_run_reddit_search&lt;/code&gt; (actually charged $0.00038 per call)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"\"api marketplace\" agents subreddit:AI_Agents"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"sort"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"relevance"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"timeframe"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"year"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"max_items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"fields"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"title,subreddit,url,score"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"max_cost_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.002"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reddit's own operators (&lt;code&gt;subreddit:&lt;/code&gt;, &lt;code&gt;author:&lt;/code&gt;, &lt;code&gt;title:&lt;/code&gt;, boolean &lt;code&gt;AND/OR/NOT&lt;/code&gt;) work inside &lt;code&gt;query&lt;/code&gt;. The response came back with HTTP 200 and &lt;code&gt;"costUsd": 0.00038&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gotcha:&lt;/strong&gt; our first try used &lt;code&gt;sort: "new"&lt;/code&gt; with a loose query (&lt;code&gt;pay per call API for AI agents&lt;/code&gt;) and returned unrelated posts from r/Hoboken and r/XboxSupport. For agent research, scope the query with &lt;code&gt;subreddit:&lt;/code&gt; and use &lt;code&gt;relevance&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. X/Twitter: an account's recent posts
&lt;/h3&gt;

&lt;p&gt;API: &lt;code&gt;anyapi_post_v1_run_twitter_user_posts&lt;/code&gt; (actually charged $0.00045 per call)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"handle"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"openanysi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"max_items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"max_cost_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.002"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response returned tweets with &lt;code&gt;text&lt;/code&gt;, &lt;code&gt;createdUtc&lt;/code&gt;, &lt;code&gt;likes&lt;/code&gt;, &lt;code&gt;replies&lt;/code&gt;, &lt;code&gt;retweets&lt;/code&gt;, &lt;code&gt;views&lt;/code&gt; and &lt;code&gt;url&lt;/code&gt;, plus a &lt;code&gt;nextCursor&lt;/code&gt; for paging. Reported cost: &lt;code&gt;"costUsd": 0.00045&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. TikTok: videos for a hashtag
&lt;/h3&gt;

&lt;p&gt;API: &lt;code&gt;anyapi_post_v1_run_tiktok_search_hashtag&lt;/code&gt; (actually charged $0.0012 per call)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"aiagents"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"max_items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"fields"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"url,views,likes,createdUtc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"max_cost_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.003"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returned 20 videos (we kept 3 with &lt;code&gt;max_items&lt;/code&gt;), each with &lt;code&gt;url&lt;/code&gt;, &lt;code&gt;views&lt;/code&gt;, &lt;code&gt;likes&lt;/code&gt; and &lt;code&gt;createdUtc&lt;/code&gt;. Reported cost: &lt;code&gt;"costUsd": 0.0012&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Web scraping: any page to Markdown
&lt;/h3&gt;

&lt;p&gt;API: &lt;code&gt;anyapi_post_v1_run_web_scrape&lt;/code&gt; (actually charged $0.0007 per call)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default it returns both &lt;code&gt;markdown&lt;/code&gt; and &lt;code&gt;html&lt;/code&gt;; pass &lt;code&gt;"formats": ["markdown"]&lt;/code&gt; and &lt;code&gt;"onlyMainContent": true&lt;/code&gt; when you only want article text for the model. Reported cost: &lt;code&gt;"costUsd": 0.0007&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gotcha:&lt;/strong&gt; two scrape attempts against a different, JavaScript-heavy page came back with HTTP 400 from the upstream. The listing's charge condition is HTTP 200, so a failed call shouldn't be billed, but check your usage records instead of assuming. For pages that render client-side, the schema offers &lt;code&gt;waitFor&lt;/code&gt; (up to 15,000 ms); try that before switching providers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Total for the four successful calls: $0.00273&lt;/strong&gt; (0.00038 + 0.00045 + 0.0012 + 0.0007).&lt;/p&gt;

&lt;h2&gt;
  
  
  Knobs that keep an agent's spending bounded
&lt;/h2&gt;

&lt;p&gt;These parameters are in the input schema of the AnyAPI-routed endpoints above, and they're the useful part for autonomous agents:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;max_cost_usd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Hard ceiling for this one request. If no route is at or under it, the request is refused before it runs and nothing is charged.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fields&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Keep only the keys you need on each result item. Shrinks the response (and your context window) &lt;strong&gt;without changing cost&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;max_items&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cap returned rows. Also doesn't change cost.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;jq&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reshape the result envelope server-side, sandboxed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;source&lt;/code&gt; / &lt;code&gt;allowFallbacks&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Pin a specific upstream source, or let the cheapest available one serve with automatic failover (the default).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;requireFields&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only route to sources that can return, say, &lt;code&gt;nextCursor&lt;/code&gt;. This can cost more, so name it only if you'll page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Idempotency-Key&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Safe retries: a completed result replays without a second charge.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two rules worth putting in your agent's instructions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Always set &lt;code&gt;max_cost_usd&lt;/code&gt;.&lt;/strong&gt; It turns "the agent looped 400 times" from a billing problem into a refused request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never auto-retry an uncertain paid request.&lt;/strong&gt; The docs are explicit that a timeout doesn't prove the request stopped. Check &lt;code&gt;openany calls list&lt;/code&gt; / &lt;code&gt;calls get&lt;/code&gt; with the request ID first, or use an &lt;code&gt;Idempotency-Key&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A prompt you can paste into your agent
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Use the openany MCP tools. For the topic "{topic}": (1) get the last 10 posts from X account {handle}; (2) search r/{subreddit} for the topic, sorted by relevance, past month; (3) get 10 TikTok videos for hashtag #{tag}; (4) scrape the two most-linked articles to Markdown with onlyMainContent. Inspect each API's schema and price before calling. Set max_cost_usd on every call and keep the total under $0.02. Return a short summary with source URLs and the costUsd of each call.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  When you don't need this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You only need one platform at high volume.&lt;/strong&gt; A dedicated vendor (or the platform's official API, where available) may be cheaper per record and gives you a direct support relationship.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You need full-site crawls&lt;/strong&gt;, not single pages. A crawler built for that job (Apify, Firecrawl and similar) is a better fit than per-page calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance requires you to hold the data contract yourself.&lt;/strong&gt; Marketplaces route to upstream providers; check each listing's terms.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your agent does mixed, low-to-medium-volume research across several platforms, one key and one balance is simply less to manage.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can one API key cover X, Reddit, TikTok and web scraping?&lt;/strong&gt;&lt;br&gt;
On OpenAny, yes. One key authenticates account-based APIs and models, and every call draws from the same prepaid balance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does a social data call cost?&lt;/strong&gt;&lt;br&gt;
It depends on the listing. In our test on 2026-11-15, the amounts actually charged were: Reddit search $0.00038, X user posts $0.00045, TikTok hashtag search $0.0012, web scrape $0.0007 per call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is there a free trial?&lt;/strong&gt;&lt;br&gt;
New accounts get a $0.50 signup credit. After that, calls are paid from prepaid credits (card, USDC or x402 top-up).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do failed calls cost money?&lt;/strong&gt;&lt;br&gt;
The listings we used charge on HTTP 200. Still, check your usage records rather than inferring from the status code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does my agent need MCP?&lt;/strong&gt;&lt;br&gt;
No. MCP, the OpenAny skill + CLI, and direct HTTP are all documented paths. Pick whatever your client supports.&lt;/p&gt;




&lt;p&gt;OpenAny is the B2A (business to agent) marketplace. Give your agent 3,200+ APIs and 168+ AI models with one key and pay-per-call pricing. &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;openany.si&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Questions or a broken example? Email &lt;a href="mailto:team@openany.si"&gt;team@openany.si&lt;/a&gt;. Docs: &lt;a href="https://openany.si/docs/" rel="noopener noreferrer"&gt;openany.si/docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>webscraping</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Give Your AI Agent LLMs and Web Search With One API Key and One Bill</title>
      <dc:creator>OpenAny</dc:creator>
      <pubDate>Sat, 14 Nov 2026 06:33:45 +0000</pubDate>
      <link>https://dev.to/openany/how-to-give-your-ai-agent-llms-and-web-search-with-one-api-key-and-one-bill-2pc4</link>
      <guid>https://dev.to/openany/how-to-give-your-ai-agent-llms-and-web-search-with-one-api-key-and-one-bill-2pc4</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: this post is written by the OpenAny team, and OpenAny is our product. The comparison section includes the cases where you don't need us.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; use a marketplace that puts model endpoints and data APIs (including web search) behind the same key and the same prepaid balance. With OpenAny, your agent calls an OpenAI-compatible model endpoint and a web search endpoint on the same gateway, &lt;code&gt;https://api.openany.si/v1&lt;/code&gt;, with the same &lt;code&gt;Authorization: Bearer&lt;/code&gt; key, and both calls draw from one balance. The common alternative, a model router such as OpenRouter plus a separate search API such as Tavily, also works well. It just means two accounts, two keys and two bills.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem: grounded answers need two vendors
&lt;/h2&gt;

&lt;p&gt;Ask a coding agent "what changed in library X this month?" and a model alone will guess. To answer properly it needs to search the web first and then reason over the results. That usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a model provider or router for the LLM call,&lt;/li&gt;
&lt;li&gt;a search API for fresh results,&lt;/li&gt;
&lt;li&gt;two keys in the agent's environment, two balances to keep funded, and two usage logs to reconcile when a bill looks off.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When we asked Perplexity for "the best LLM gateway for AI agents that also gives access to data APIs" (November 2026), its recommendation was OpenRouter for models plus Tavily for web search. That's a reasonable answer. This post shows the one-key version, with requests taken from the OpenAny docs and listing pages, so you can judge the difference yourself.&lt;/p&gt;

&lt;p&gt;We covered client setup for Claude Code, Cursor and Codex in &lt;a href="https://dev.to/openany/one-api-key-one-balance-wiring-models-and-data-apis-into-claude-code-cursor-and-codex-5379"&gt;an earlier DEV post&lt;/a&gt;. This one is about the pattern itself: &lt;strong&gt;search, then answer, on one key&lt;/strong&gt;, first in plain HTTP and then inside a coding agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An OpenAny account and an API key. Creating the account and the key is free, but calls are paid from prepaid credits, so add a small top-up first (card, USDC or x402). There is no subscription and no free call allowance.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OPENANY_API_KEY&lt;/code&gt; set in the environment of the process that runs your code or agent. Don't paste it into a prompt.&lt;/li&gt;
&lt;li&gt;Python 3 with the &lt;code&gt;openai&lt;/code&gt; and &lt;code&gt;requests&lt;/code&gt; packages for the examples.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Pick a search endpoint and read its price
&lt;/h2&gt;

&lt;p&gt;Every data API on OpenAny has a listing page with its method, endpoint, input schema and price. You can also browse from the terminal without a key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install -g openany-cli@latest --registry=https://registry.npmjs.org/
openany discover -q &lt;span class="s2"&gt;"web search"&lt;/span&gt; -l 10 --public -j
openany inspect --id ae934460-5bfd-430e-8802-9605c0eca495 --public -j
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we checked on 2026-11-14, that search returned several web search listings from different providers, each with a fixed per-call price. This tutorial uses &lt;strong&gt;Web Search (Basic, no extraction)&lt;/strong&gt;, provider &lt;code&gt;youcom&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endpoint: &lt;code&gt;POST https://api.openany.si/v1/agent-apis/youcom/v1/search&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Required input: &lt;code&gt;query&lt;/code&gt; (string). Optional: &lt;code&gt;count&lt;/code&gt;, &lt;code&gt;offset&lt;/code&gt;, &lt;code&gt;country&lt;/code&gt;, &lt;code&gt;language&lt;/code&gt;, &lt;code&gt;include_domains&lt;/code&gt;, &lt;code&gt;exclude_domains&lt;/code&gt; and a few more.&lt;/li&gt;
&lt;li&gt;Price on the listing: &lt;strong&gt;$0.005 per call&lt;/strong&gt; (contract revision 3).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prices and revisions can change, so read the &lt;a href="https://openany.si/apis/ae934460-5bfd-430e-8802-9605c0eca495/" rel="noopener noreferrer"&gt;listing page&lt;/a&gt; before you run anything. If you prefer a different provider, the same flow works with any search listing. Just copy its endpoint and schema.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Call search over plain HTTP
&lt;/h2&gt;

&lt;p&gt;This is the request shown on the listing page, trimmed to two fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s1"&gt;'https://api.openany.si/v1/agent-apis/youcom/v1/search'&lt;/span&gt; \
  -X POST \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $OPENANY_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  --data-raw &lt;span class="s1"&gt;'{"query": "Node.js 24 release notes", "count": 5}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we ran this on 2026-11-14 it returned HTTP 200 in about two seconds. The body looks like this (trimmed):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"metadata"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Node.js 24 release notes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"search_uuid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"latency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.51&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"openany_cost"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"results"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Node.js — Node.js 24.0.0 (Current)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://nodejs.org/en/blog/release/v24.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"snippets"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"We're excited to announce the release of Node.js 24! ..."&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"favicon_url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"thumbnail_url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things to notice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;results.web&lt;/code&gt; holds the hits. Each has &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt;, a short &lt;code&gt;description&lt;/code&gt; and a &lt;code&gt;snippets&lt;/code&gt; array with longer extracts, which is the better text to ground a model on. The listing's sample also shows a &lt;code&gt;results.news&lt;/code&gt; array; our queries only came back with &lt;code&gt;web&lt;/code&gt;, so treat &lt;code&gt;news&lt;/code&gt; as optional.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;openany_cost&lt;/code&gt; is the charge for this call in micro-USD: 5000 means $0.005, matching the listing. The response headers also carry an &lt;code&gt;x-request-id&lt;/code&gt; you can match against your usage records.&lt;/li&gt;
&lt;li&gt;Errors come back as JSON too. A request without a valid &lt;code&gt;Authorization&lt;/code&gt; header returned HTTP 401 with &lt;code&gt;"code": "openany_authentication_invalid"&lt;/code&gt;, a readable &lt;code&gt;message&lt;/code&gt; and &lt;code&gt;"openany_cost": 0&lt;/code&gt;. Your agent can branch on &lt;code&gt;code&lt;/code&gt; instead of parsing prose.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 3: Let the model choose the searches, on the same key
&lt;/h2&gt;

&lt;p&gt;The model endpoint is OpenAI-compatible, so the official &lt;code&gt;openai&lt;/code&gt; package works with a changed &lt;code&gt;base_url&lt;/code&gt;. Model IDs are route-specific, so copy one from the &lt;a href="https://openany.si/models/" rel="noopener noreferrer"&gt;model catalog&lt;/a&gt;. We tested with &lt;code&gt;deepseek-v4-flash&lt;/code&gt;, which supported tool calling through OpenAny when we ran this on 2026-11-14. Check the listing for the model you pick.&lt;/p&gt;

&lt;p&gt;The flow has two model calls. First the model gets a &lt;code&gt;web_search&lt;/code&gt; tool and decides what to search for. Then it answers from numbered sources, with no tools offered:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;

&lt;span class="no"&gt;KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"OPENANY_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="no"&gt;BASE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://api.openany.si/v1"&lt;/span&gt;
&lt;span class="no"&gt;MODEL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"OPENANY_MODEL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"deepseek-v4-flash"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# copy a current ID from the catalog&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;BASE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;web_search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{BASE}/agent-apis/youcom/v1/search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Bearer {KEY}"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"search failed: {r.status_code} {body.get('code')} {body.get('message')}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"search {query!r}: openany_cost={body.get('openany_cost')} micro-USD"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"snippets"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"results"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="no"&gt;TOOLS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"function"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"function"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"web_search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Search the web. Returns titles, URLs and text snippets."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"parameters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_searches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Round 1: let the model decide what to search for.&lt;/span&gt;
    &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;TOOLS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# reasoning tokens count against this limit&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;  &lt;span class="c1"&gt;# the model answered without searching&lt;/span&gt;

    &lt;span class="c1"&gt;# Run at most max_searches of the requested searches.&lt;/span&gt;
    &lt;span class="n"&gt;sources&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tc&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;max_searches&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;function&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arguments&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="s2"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;sources&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nf"&gt;web_search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Round 2: answer from the numbered sources, with no tools offered.&lt;/span&gt;
    &lt;span class="n"&gt;numbered&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"\n\n"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"[{i+1}] {s['title']} ({s['url']})\n{s['text']}"&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;final&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"system"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Answer only from the numbered sources and cite them like [1]. If they don't cover something, say so."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{question}\n\nSources:\n{numbered}"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# leave headroom: reasoning tokens count too&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"model usage:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;final&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;final&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"__main__"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"What are the headline changes in Node.js 24?"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On our run the model asked for two searches in parallel ("Node.js 24 headline changes release" and "Node.js 24 new features announcement"). The script ran both and the model answered with a cited list: the V8 13.6 and npm 11 upgrades, global &lt;code&gt;URLPattern&lt;/code&gt;, Undici 7, the &lt;code&gt;--permission&lt;/code&gt; flag and more, each tagged with source numbers.&lt;/p&gt;

&lt;p&gt;Some things we learned while getting this to work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning tokens count against &lt;code&gt;max_tokens&lt;/code&gt;.&lt;/strong&gt; This model reasons before it answers. With &lt;code&gt;max_tokens=500&lt;/code&gt; the final answer came back empty with &lt;code&gt;finish_reason: "length"&lt;/code&gt;, and on a longer prompt even 2,000 tokens all went to reasoning. The script leaves 4,000 for the answering call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the answering call free of tools.&lt;/strong&gt; In a multi-round loop, the model kept asking for more searches, and &lt;code&gt;tool_choice: "none"&lt;/code&gt; didn't stop it on the route we hit. Offering tools once and then answering from a plain sources message was the reliable pattern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cap the searches yourself.&lt;/strong&gt; &lt;code&gt;max_searches&lt;/code&gt; limits paid calls no matter how many the model asks for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every call draws from one balance. The searches are billed at the listing's per-call price and the model calls at the route's token rates, and all of them show up in the same usage records. &lt;code&gt;openany calls list&lt;/code&gt; listed both kinds of rows side by side, each with a &lt;code&gt;chargedCostMicroUsd&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Let Claude Code, Cursor or Codex do it
&lt;/h2&gt;

&lt;p&gt;In a coding agent you usually don't write this loop yourself. The OpenAny skill plus CLI gives the agent the same two capabilities through its terminal, and it leaves the agent's own main model alone.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save the skill where your client looks for it: &lt;code&gt;.claude/skills/openany/SKILL.md&lt;/code&gt; (Claude Code), &lt;code&gt;.cursor/skills/openany/SKILL.md&lt;/code&gt; (Cursor) or &lt;code&gt;.agents/skills/openany/SKILL.md&lt;/code&gt; (Codex). The file is at &lt;code&gt;https://openany.si/SKILL.md&lt;/code&gt;. Read it before installing.&lt;/li&gt;
&lt;li&gt;Install the CLI (Node.js 22+) and run &lt;code&gt;openany setup --scenario call&lt;/code&gt; in your own terminal to store the key.&lt;/li&gt;
&lt;li&gt;Give the agent a bounded task:&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Use the openany skill. Search the web for the Node.js 24 release notes with one search API, show me the price before calling, then summarize the top results with links. Budget: $0.05.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The skill tells the agent to check the balance, &lt;code&gt;discover&lt;/code&gt; a search API, &lt;code&gt;inspect&lt;/code&gt; its schema and price, then &lt;code&gt;run&lt;/code&gt; it, and to report the request ID and cost. You can audit afterwards with &lt;code&gt;openany calls list --limit 20 -j&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you also want the editor's chat model billed through OpenAny, that's a separate, optional step: Cursor's &lt;strong&gt;Override OpenAI Base URL&lt;/strong&gt; set to &lt;code&gt;https://api.openany.si/v1&lt;/code&gt;, or a custom &lt;code&gt;model_providers.openany&lt;/code&gt; block in &lt;code&gt;~/.codex/config.toml&lt;/code&gt; with &lt;code&gt;wire_api = "responses"&lt;/code&gt;. Check that the chosen model route supports the protocol your client needs first; Chat Completions support alone doesn't guarantee Codex's Responses API works.&lt;/p&gt;

&lt;h2&gt;
  
  
  OpenRouter + Tavily vs one balance: an honest comparison
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;OpenRouter alone is fine when&lt;/strong&gt; your agent only needs models. It's a mature router with a large model catalog and a long track record. If you never call a data API, adding OpenAny gives you nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OpenRouter plus a separate search API is fine when&lt;/strong&gt; you only need one or two data sources and you're happy managing them. Tavily, Exa and others are built specifically for agent search, with their own docs and SDKs. Two keys and two bills is a small cost if the setup doesn't change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One balance helps when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your agent keeps reaching for new data sources (search today, GitHub or finance data next week) and you don't want a new account for each,&lt;/li&gt;
&lt;li&gt;you want one usage log that answers "what did this agent spend, and on what?" across models and APIs,&lt;/li&gt;
&lt;li&gt;you want to fund agents with USDC or x402 top-ups as well as cards,&lt;/li&gt;
&lt;li&gt;you want prices visible before the call, so the agent can show the cost and ask first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Where OpenAny is weaker:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's young.&lt;/strong&gt; We launched in October 2026. Listings are not uptime guarantees, so test the endpoints you depend on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's hosted only.&lt;/strong&gt; You can't self-host the gateway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol coverage varies by route.&lt;/strong&gt; Responses API and tool calling depend on the model route.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;x402 here is for funding your balance.&lt;/strong&gt; Direct per-request x402 payment applies only to endpoints that explicitly support it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data APIs come from many providers.&lt;/strong&gt; Response shapes differ between listings, so read each schema rather than assuming they match.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Keeping costs bounded
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prepaid balance:&lt;/strong&gt; the worst case is what you loaded, not an open invoice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Price before the call:&lt;/strong&gt; every listing shows a price and billing unit; &lt;code&gt;inspect&lt;/code&gt; returns them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeouts:&lt;/strong&gt; don't blindly retry a paid call after a timeout. Check &lt;code&gt;openany calls list&lt;/code&gt; or &lt;code&gt;calls get&lt;/code&gt; first. The docs are explicit that a missing record doesn't prove no charge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;429:&lt;/strong&gt; honor &lt;code&gt;Retry-After&lt;/code&gt; and back off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto top-up is opt-in:&lt;/strong&gt; card auto top-up needs its own authorization on the Credits page.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can one API key cover both LLM calls and web search for my agent?&lt;/strong&gt;&lt;br&gt;
Yes, on OpenAny one key authenticates account-based model and API calls, and both draw from the same prepaid balance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the model endpoint OpenAI-compatible?&lt;/strong&gt;&lt;br&gt;
Yes. The base URL is &lt;code&gt;https://api.openany.si/v1&lt;/code&gt; with Chat Completions. Responses API and Anthropic Messages support depend on the route.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need to change Claude Code's main model?&lt;/strong&gt;&lt;br&gt;
No. The skill and CLI add external calls through the agent's existing tools. Changing the main model is optional and separate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is there a free tier or free credits?&lt;/strong&gt;&lt;br&gt;
No. Account and key creation are free, but calls are paid from prepaid credits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How is web search priced?&lt;/strong&gt;&lt;br&gt;
Per listing. The search endpoint in this post was $0.005 per call when we checked on 2026-11-14. Other search providers have different prices; check the listing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can my agent pay with crypto?&lt;/strong&gt;&lt;br&gt;
You can top up the shared balance with USDC or x402, and card auto top-up is available too. API calls still authenticate with your OpenAny key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should I just use OpenRouter plus Tavily?&lt;/strong&gt;&lt;br&gt;
When you only need models plus one stable search provider and the two-account setup isn't a burden.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Questions or a broken example? Email &lt;a href="mailto:team@openany.si"&gt;team@openany.si&lt;/a&gt;. Docs: &lt;a href="https://openany.si/docs/" rel="noopener noreferrer"&gt;openany.si/docs&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
    <item>
      <title>One API Key, One Balance: Wiring Models and Data APIs into Claude Code, Cursor and Codex</title>
      <dc:creator>OpenAny</dc:creator>
      <pubDate>Tue, 03 Nov 2026 05:42:49 +0000</pubDate>
      <link>https://dev.to/openany/one-api-key-one-balance-wiring-models-and-data-apis-into-claude-code-cursor-and-codex-5379</link>
      <guid>https://dev.to/openany/one-api-key-one-balance-wiring-models-and-data-apis-into-claude-code-cursor-and-codex-5379</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: this post is written by the OpenAny team. OpenAny is our product. We tried to keep it practical, and the limitations section is there on purpose.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem: every new tool is another key and another bill
&lt;/h2&gt;

&lt;p&gt;A coding agent rarely stops at one model. In a typical week ours used a frontier model for planning, a cheap fast model for bulk edits, a search API to read the docs, and something to pull GitHub repository metadata. Every one of those meant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a new account and a new API key in &lt;code&gt;.env&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;another prepaid balance or card on file,&lt;/li&gt;
&lt;li&gt;another usage dashboard to check when a bill looked wrong,&lt;/li&gt;
&lt;li&gt;another set of rate limits and error formats for the agent to learn.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agents make this worse because they decide to call things on their own. "Which key paid for that call, and how much did it cost?" gets hard to answer quickly.&lt;/p&gt;

&lt;p&gt;We built OpenAny for that case. It's a pay-per-call marketplace where models, data APIs and agent skills sit behind &lt;strong&gt;one API key and one prepaid balance&lt;/strong&gt;. This post shows the actual setup in Claude Code, Cursor and Codex, the commands involved, and where it isn't a good fit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you get (and what you don't)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Models&lt;/strong&gt; through an OpenAI-compatible Chat Completions endpoint at &lt;code&gt;https://api.openany.si/v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data and tool APIs&lt;/strong&gt; (search, GitHub, finance, e-commerce, SEO and more), called through the &lt;code&gt;openany&lt;/code&gt; CLI. Each listing shows a fixed price and a billing unit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt;: portable &lt;code&gt;SKILL.md&lt;/code&gt; workflows. They run &lt;em&gt;inside your agent&lt;/em&gt; and call the models and APIs above. OpenAny doesn't host a skill runtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Billing&lt;/strong&gt;: one shared prepaid balance with no subscription. You can top up by card, USDC or x402, and card auto top-up and USDC subscriptions are both available. New accounts get &lt;strong&gt;$1 in signup credit&lt;/strong&gt; that doesn't expire.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As of 2026-11-03 the published catalog lists 154 models, 3,138 API endpoints and 59 provider identities. Those are listing counts, not uptime claims.&lt;/p&gt;

&lt;p&gt;There's &lt;strong&gt;no MCP server&lt;/strong&gt;. The integration is a CLI, a skill file and plain HTTP endpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Get a key and make a first call
&lt;/h2&gt;

&lt;p&gt;Create an account, then create an API key from the dashboard. Put the key in the environment of the process that runs your agent, not in a prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OPENANY_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;   &lt;span class="c"&gt;# better: your shell's secret manager or the client's secret store&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pick a model ID from the &lt;a href="https://openany.si/models/" rel="noopener noreferrer"&gt;model catalog&lt;/a&gt;. Model IDs are route-specific, so copy the ID from the listing instead of guessing. The examples below use &lt;code&gt;deepseek-v4-flash&lt;/code&gt;, which was listed when we wrote this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cURL:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl --fail-with-body --silent --show-error \
  https://api.openany.si/v1/chat/completions \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $OPENANY_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "model": "deepseek-v4-flash",
    "messages": [{"role": "user", "content": "Reply with exactly: OpenAny connected"}],
    "max_tokens": 32
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Python (official &lt;code&gt;openai&lt;/code&gt; package):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"OPENANY_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://api.openany.si/v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"OPENANY_MODEL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"deepseek-v4-flash"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Reply with exactly: OpenAny connected"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successful call returns HTTP 2xx with a non-empty &lt;code&gt;choices[0].message.content&lt;/code&gt;. The &lt;code&gt;usage&lt;/code&gt; block tells you what you were billed for.&lt;/p&gt;

&lt;p&gt;Some models have more than one provider route. The catalog listing shows the routes for each model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Install the CLI and the skill
&lt;/h2&gt;

&lt;p&gt;Data APIs and skills go through the &lt;code&gt;openany&lt;/code&gt; CLI (Node.js 22 or later):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install -g openany-cli@latest --registry=https://registry.npmjs.org/
openany --version
openany setup --scenario call     &lt;span class="c"&gt;# paste the key at the hidden prompt, never in chat&lt;/span&gt;
openany status --scenario call -j
openany balance -j
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;setup&lt;/code&gt; saves the key to &lt;code&gt;~/.config/openany/credentials.json&lt;/code&gt; with 0600 permissions. If &lt;code&gt;OPENANY_API_KEY&lt;/code&gt; is set, it takes precedence over the saved key.&lt;/p&gt;

&lt;p&gt;Next, install the OpenAny skill where your agent looks for skills. The file is the same for every client. Only the directory changes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Client&lt;/th&gt;
&lt;th&gt;Skill location&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/skills/openany/SKILL.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.cursor/skills/openany/SKILL.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.agents/skills/openany/SKILL.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example for Claude Code; swap the directory for Cursor or Codex&lt;/span&gt;
mkdir -p .claude/skills/openany
curl -fsSL https://openany.si/SKILL.md -o .claude/skills/openany/SKILL.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the file before you install it. It's plain Markdown, and you should know what instructions you're handing to your agent. There's also a shortcut: paste &lt;code&gt;Read openany.si/AGENT.md and connect OpenAny&lt;/code&gt; into the agent and let it walk through the same steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;None of this replaces your agent's main model.&lt;/strong&gt; Claude Code still uses whatever model you already run. The skill only lets the agent call external models and APIs through the CLI when a task needs them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Call a data API from your agent
&lt;/h2&gt;

&lt;p&gt;Say your agent needs repository metadata such as stars, forks, language and license. Here's what the flow looks like with the CLI. Catalog browsing doesn't need a key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openany discover -q &lt;span class="s2"&gt;"github repository"&lt;/span&gt; -l 5 --public -j
openany inspect --id 2a01d388-02fb-4307-8e47-f3a814d9a3cd --public -j
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;inspect&lt;/code&gt; returns the method, the input schema and the price. For this endpoint, the input is a required &lt;code&gt;url&lt;/code&gt; in the request body, and the billing unit is a fixed price per call ($0.0012 when we checked). Then run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openany run --id 2a01d388-02fb-4307-8e47-f3a814d9a3cd \
  -i &lt;span class="s1"&gt;'{"url": "https://github.com/facebook/react"}'&lt;/span&gt; \
  --query &lt;span class="s1"&gt;'{"max_cost_usd": "0.01"}'&lt;/span&gt; -j
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response is the repository metadata as JSON, plus the request ID and the amount charged.&lt;/p&gt;

&lt;p&gt;That &lt;code&gt;max_cost_usd&lt;/code&gt; parameter caps the price for this one request. If no route can serve the call at or below that price, the request is refused before it runs and nothing is charged. The same endpoint accepts &lt;code&gt;fields&lt;/code&gt;, &lt;code&gt;max_items&lt;/code&gt; and &lt;code&gt;jq&lt;/code&gt; query parameters, which shrink the response without changing the cost. That's useful when the agent doesn't need 40 KB of JSON back.&lt;/p&gt;

&lt;p&gt;In practice you don't type these commands yourself. You give the agent a bounded task like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use the openany skill. Find an API that returns GitHub repository metadata, show me the price before calling, then fetch facebook/react. Budget: $0.05.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The skill tells the agent to check the balance, discover the API, inspect it, show the cost and ask before spending. After the call it should report the request ID and the charge. To check afterwards, run &lt;code&gt;openany calls list --limit 20 -j&lt;/code&gt; or &lt;code&gt;openany calls get --id REQUEST_ID -j&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 (optional): Use OpenAny as the main model provider
&lt;/h2&gt;

&lt;p&gt;This is separate from tool access. Only do it if you actually want your editor's chat model billed through OpenAny.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cursor.&lt;/strong&gt; In &lt;em&gt;Cursor Settings â†’ Models&lt;/em&gt;, enter your OpenAny key in the OpenAI API key field. If your version shows &lt;strong&gt;Override OpenAI Base URL&lt;/strong&gt;, set it to &lt;code&gt;https://api.openany.si/v1&lt;/code&gt;. Then add an exact model ID from the catalog and send one short test message. Two caveats: Cursor limits own-key access to supported chat models, and Tab completion still uses Cursor's built-in models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Codex.&lt;/strong&gt; Merge a custom provider into your user-level &lt;code&gt;~/.codex/config.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="na"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"MODEL_ID_FROM_LISTING"&lt;/span&gt;
&lt;span class="na"&gt;model_provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"openany"&lt;/span&gt;

&lt;span class="k"&gt;[model_providers.openany]&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"OpenAny"&lt;/span&gt;
&lt;span class="na"&gt;base_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://api.openany.si/v1"&lt;/span&gt;
&lt;span class="na"&gt;env_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"OPENANY_API_KEY"&lt;/span&gt;
&lt;span class="na"&gt;wire_api&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"responses"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Codex uses the Responses API, so the model you choose needs a route that supports Responses, streaming and tool calls. Chat Completions support alone doesn't guarantee that. Restart Codex, send one small request, and check the Usage page.&lt;/p&gt;

&lt;p&gt;Check the model listing for Responses support before you switch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code.&lt;/strong&gt; Our documented Claude Code setup is the skill and CLI from Step 2, with Claude Code's own model left unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost control with a prepaid balance
&lt;/h2&gt;

&lt;p&gt;Here's what actually keeps spending bounded:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;It's prepaid.&lt;/strong&gt; The worst case is your balance, not an open-ended invoice. There's no subscription, and the $1 signup credit is enough to test the setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prices are visible before the call.&lt;/strong&gt; Every API listing has a fixed price and a billing unit, and &lt;code&gt;inspect&lt;/code&gt; returns them, so the agent can show the cost before spending.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There's a per-request cap.&lt;/strong&gt; &lt;code&gt;max_cost_usd&lt;/code&gt; on data APIs refuses an over-budget call instead of charging for it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usage is recorded per call.&lt;/strong&gt; &lt;code&gt;openany calls list&lt;/code&gt; shows a &lt;code&gt;chargedCostMicroUsd&lt;/code&gt; for each row, and the dashboard has a usage page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto top-up is opt-in.&lt;/strong&gt; Card auto top-up and USDC subscriptions each need their own authorization. If you let an agent top up through the CLI, you set the network, the per-payment limit, the total limit and an expiry up front.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;a href="https://openany.si/pricing/" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt; explains billing units and the difference between balance-funded calls and direct x402.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations: when not to use this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;If you only use one provider.&lt;/strong&gt; If everything you run is on one vendor's API and their billing works for you, an extra layer only adds a hop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you need a hosted MCP server.&lt;/strong&gt; OpenAny doesn't publish one. The integration is the CLI, &lt;code&gt;SKILL.md&lt;/code&gt; and HTTP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If your agent can't run a terminal.&lt;/strong&gt; Data APIs and skills go through the Node CLI. An HTTP-only client can still use the model endpoint, but not the CLI workflow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you need every protocol on every model.&lt;/strong&gt; Chat Completions works across the catalog, but Responses and Anthropic Messages support depend on the route. Check before switching a main model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you expect x402 everywhere.&lt;/strong&gt; x402 funds your balance. Paying per request directly with x402 only works on endpoints that explicitly support it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you need a long track record.&lt;/strong&gt; We launched in October 2026. Listing counts aren't uptime guarantees, so try a few calls before building anything critical on top.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;The practical win is boring, and that's the point. Your agent gets one key, one balance and one usage log, and the main model stays the same unless you choose to change it. Setup is a CLI install, a skill file and an environment variable. If you try it, the &lt;a href="https://openany.si/docs/" rel="noopener noreferrer"&gt;docs&lt;/a&gt; have the full client recipes. We'd like to hear where it breaks, especially Cursor and Codex edge cases. You can reach us at &lt;a href="mailto:team@openany.si"&gt;team@openany.si&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you run an API and want agents to be able to call it, you can list it on OpenAny for free and set your own prices. Payment and payout fees may still apply.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Connect Claude Code to 3,000+ APIs With One Sentence (Step-by-Step Guide)</title>
      <dc:creator>OpenAny</dc:creator>
      <pubDate>Thu, 29 Oct 2026 14:13:08 +0000</pubDate>
      <link>https://dev.to/openany/connect-claude-code-to-3000-apis-with-one-sentence-step-by-step-guide-fc1</link>
      <guid>https://dev.to/openany/connect-claude-code-to-3000-apis-with-one-sentence-step-by-step-guide-fc1</guid>
      <description>&lt;p&gt;In &lt;a href="https://dev.to/openany/your-ai-agent-is-smart-it-just-cant-reach-anything-meet-openany-2m06"&gt;the first post&lt;/a&gt; we covered &lt;em&gt;why&lt;/em&gt; your agent hits a wall the moment it needs real data. This one is hands-on: connecting Claude Code to OpenAny, making a first real call, and checking what it cost.&lt;/p&gt;

&lt;p&gt;Your part: one sentence, plus one setup command in your own terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt; with terminal access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js 22+&lt;/strong&gt;, which the OpenAny CLI requires (&lt;code&gt;node --version&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A wallet or an email address&lt;/strong&gt; for your OpenAny account. If you already have an OpenAny API key, you can use that instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A small balance.&lt;/strong&gt; All calls draw from one shared balance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Give Claude Code the sentence
&lt;/h2&gt;

&lt;p&gt;Open Claude Code in any project and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read openany.si/AGENT.md and connect OpenAny
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the whole integration prompt. &lt;a href="https://openany.si/AGENT.md" rel="noopener noreferrer"&gt;AGENT.md&lt;/a&gt; is written for agents. It tells Claude Code what to install, where the skill goes, and what it must never do with your credentials.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F59jo2nvh2oeotlyksaee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F59jo2nvh2oeotlyksaee.png" alt="Steps AGENT.md tells Claude Code to take" width="799" height="418"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Illustration (not a real session) of the steps AGENT.md tells Claude Code to take.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2: What Claude Code does next
&lt;/h2&gt;

&lt;p&gt;Following the published Claude Code recipe, your agent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Installs the OpenAny skill&lt;/strong&gt; at &lt;code&gt;.claude/skills/openany/SKILL.md&lt;/code&gt;, so future sessions know how to use it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Installs the CLI:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install -g openany-cli@latest --registry=https://registry.npmjs.org/
openany --version
openany --help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Checks your configuration&lt;/strong&gt; with &lt;code&gt;openany status --scenario call -j&lt;/code&gt;, reading the &lt;code&gt;configured&lt;/code&gt; and &lt;code&gt;missing&lt;/code&gt; fields. A passing local check only means the settings exist. It doesn't prove the key works yet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Claude Code keeps its own main model. OpenAny doesn't replace it. It adds models, data, and tools the agent can call.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Sign in without pasting secrets into chat
&lt;/h2&gt;

&lt;p&gt;This is my favorite part. If you don't have a key yet, Claude Code asks whether you want to use a &lt;strong&gt;wallet&lt;/strong&gt; or &lt;strong&gt;email&lt;/strong&gt;, then hands you a command to run &lt;strong&gt;in your own terminal&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Email: you enter only your email address&lt;/span&gt;
openany setup --scenario email

&lt;span class="c"&gt;# Wallet: private key at a hidden prompt, plus a stable Agent ID like agent-main&lt;/span&gt;
openany setup --scenario wallet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you reply "configured" and the agent continues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Email:&lt;/strong&gt; a six-digit code is sent (&lt;code&gt;openany auth email send&lt;/code&gt;) and verified (&lt;code&gt;openany auth email verify --code ...&lt;/code&gt;). Then a key is created.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;First-time wallet:&lt;/strong&gt; the agent creates a key (&lt;code&gt;openany keys create --identity wallet --label agent-main -j&lt;/code&gt;), which registers your account and balance. Then it logs in with &lt;code&gt;openany auth wallet -j&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key is saved locally in &lt;code&gt;~/.config/openany/credentials.json&lt;/code&gt; (file mode 0600). The docs are explicit: &lt;strong&gt;never paste API keys, private keys, seed phrases, or codes into any AI chat.&lt;/strong&gt; The agent is instructed never to ask for them. Already have a key? Run &lt;code&gt;openany setup --scenario call&lt;/code&gt; and enter it at the hidden prompt.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5a63acknd2sq6jn9x316.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5a63acknd2sq6jn9x316.png" alt="Email setup in your terminal" width="800" height="311"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Illustration (not a real session) of email setup in your own terminal, with generic values.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 4: Fund your balance
&lt;/h2&gt;

&lt;p&gt;Add credits from the OpenAny dashboard at &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;openany.si&lt;/a&gt;. See &lt;a href="https://openany.si/pricing" rel="noopener noreferrer"&gt;openany.si/pricing&lt;/a&gt; for the current options. Your agent can check your balance at any time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openany balance -j
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing tops up automatically by default. Agent-driven top-ups are opt-in, with limits you approve up front: per-payment cap, total cap, network, purpose, and expiry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Make your first real call
&lt;/h2&gt;

&lt;p&gt;Ask for something real, in plain English:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using OpenAny, find an API that returns the top Instagram posts
for the hashtag #coldbrew. Show me the price before you call it,
keep it under $0.05, and give me the results plus the request ID.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude Code follows the same loop every time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openany balance -j                                          &lt;span class="c"&gt;# can we afford it?&lt;/span&gt;
openany discover -q &lt;span class="s2"&gt;"instagram hashtag top posts"&lt;/span&gt; -l 10 -j  &lt;span class="c"&gt;# find candidates&lt;/span&gt;
openany inspect --id API_ID -j                              &lt;span class="c"&gt;# schema, version, price&lt;/span&gt;
openany run --id API_ID --query &lt;span class="s1"&gt;'{...}'&lt;/span&gt; -j                  &lt;span class="c"&gt;# the actual call&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;API_ID&lt;/code&gt; comes from the live catalog, and the parameters come from &lt;code&gt;inspect&lt;/code&gt;, so nothing is guessed. If several providers match, the agent should ask you which one to use.&lt;/p&gt;

&lt;p&gt;Here's my real run. &lt;code&gt;discover&lt;/code&gt; found &lt;strong&gt;Instagram Hashtag Top Posts&lt;/strong&gt;. Before anything was spent, &lt;code&gt;inspect&lt;/code&gt; showed the price and the one required field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Instagram Hashtag Top Posts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"revision"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"price_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.0011&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"hashtag"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's about a tenth of a cent. I capped the call with &lt;code&gt;max_cost_usd&lt;/code&gt;, so no route could charge more than one cent, and asked for three rows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openany run --id 9cc6f928-f102-415e-aeec-db2fc21aaeb5 \
  --query &lt;span class="s1"&gt;'{"max_items":3,"max_cost_usd":"0.01"}'&lt;/span&gt; \
  -i &lt;span class="s1"&gt;'{"hashtag":"coldbrew"}'&lt;/span&gt; -j
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response (trimmed):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"requestId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"64fbd8a3-75c5-4692-99ca-0b19d6ddb2f7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"provider"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"AnyAPI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"costUsd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.0011&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"shown"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"shown"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"total"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"posts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"caption"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Jangan sampe niatnya milih satu, malah k"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"likes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1148&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"comments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"views"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22174&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"caption"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"we, the people who donâ€™t put sugar or sw"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"likes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;503388&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"comments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3605&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"views"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6663369&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"caption"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Nah ini coldbrew pake espresso blend, be"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"likes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"comments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"views"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1196&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's live Instagram data, and I never opened an account with a scraping service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fif1z5bzt62s9mtjist1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fif1z5bzt62s9mtjist1l.png" alt="Real output from a test run" width="800" height="418"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Real output from our test run, trimmed with jq.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Tip: the CLI validates parameters &lt;em&gt;before&lt;/em&gt; sending. My first try passed &lt;code&gt;"max_items":"3"&lt;/code&gt; as a string. The CLI rejected it locally (&lt;code&gt;Invalid type for max_items&lt;/code&gt;), so nothing was sent and nothing was charged.&lt;/p&gt;

&lt;p&gt;The same CLI covers models too: &lt;code&gt;openany models list&lt;/code&gt;, &lt;code&gt;openany models prices&lt;/code&gt;, and &lt;code&gt;openany models run&lt;/code&gt; with the operation that the model's listing publishes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 6: Check what it cost
&lt;/h2&gt;

&lt;p&gt;The response already includes &lt;code&gt;costUsd: 0.0011&lt;/code&gt; next to a &lt;code&gt;requestId&lt;/code&gt;. To double-check, I compared the balance before and after:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"charged_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.0011&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The quoted price matched the charged price. There was no hidden fee and no monthly minimum.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg1446cfn5edrg48lknwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg1446cfn5edrg48lknwk.png" alt="Cost and balance difference" width="800" height="964"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Real output from our test run: the response's cost and the balance difference.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fboo1aozzahv1xxht57uj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fboo1aozzahv1xxht57uj.png" alt="Flow summary" width="799" height="545"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Illustration summarizing the flow, using the real numbers from the run above.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For data and tool APIs, &lt;code&gt;openany calls list&lt;/code&gt; and &lt;code&gt;openany calls get --id REQUEST_ID&lt;/code&gt; show your call history. Model calls and overall usage also appear in the &lt;a href="https://openany.si/?openDash=1&amp;amp;page=usage" rel="noopener noreferrer"&gt;usage records&lt;/a&gt; in the dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;configured: false&lt;/code&gt;:&lt;/strong&gt; run setup on the &lt;strong&gt;same machine and account&lt;/strong&gt; where Claude Code runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;401:&lt;/strong&gt; check your API key. The agent shouldn't keep retrying with a bad one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Email session expired:&lt;/strong&gt; &lt;code&gt;openany auth email refresh -j&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;402 / insufficient balance:&lt;/strong&gt; add credits in the dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeout:&lt;/strong&gt; don't repeat a paid request blindly. Check &lt;code&gt;openany calls list&lt;/code&gt; first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;OPENANY_API_KEY&lt;/code&gt; is set in your shell:&lt;/strong&gt; it overrides the key the CLI saved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Just browsing?&lt;/strong&gt; &lt;code&gt;openany discover -q "..." --public&lt;/code&gt; and &lt;code&gt;openany models prices --public&lt;/code&gt; work without a key.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;You've connected Claude Code, made a call, and seen the receipt. Now try something bigger. The &lt;a href="https://dev.to/openany/your-ai-agent-is-smart-it-just-cant-reach-anything-meet-openany-2m06"&gt;first post&lt;/a&gt; has two full workflows (market research and a competitor price tracker) you can paste straight in.&lt;/p&gt;

&lt;p&gt;Using Cursor, Codex, OpenClaw, or Hermes Agent? It's the same sentence. Each client installs the skill in its own folder (see the &lt;a href="https://openany.si/docs" rel="noopener noreferrer"&gt;client recipes&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;ðŸ‘‰ &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;openany.si&lt;/a&gt; Â· &lt;a href="https://openany.si/docs" rel="noopener noreferrer"&gt;Docs&lt;/a&gt; Â· X: &lt;a href="https://x.com/openanysi" rel="noopener noreferrer"&gt;@openanysi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Keep your agent. Connect it to more.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>tutorial</category>
      <category>agents</category>
    </item>
    <item>
      <title>Your AI Agent Is Smart. It Just Can't Reach Anything. Meet OpenAny.</title>
      <dc:creator>OpenAny</dc:creator>
      <pubDate>Wed, 28 Oct 2026 03:19:00 +0000</pubDate>
      <link>https://dev.to/openany/your-ai-agent-is-smart-it-just-cant-reach-anything-meet-openany-2m06</link>
      <guid>https://dev.to/openany/your-ai-agent-is-smart-it-just-cant-reach-anything-meet-openany-2m06</guid>
      <description>&lt;p&gt;You ask your agent to do something real, like research a market or monitor competitors, and it stops cold.&lt;/p&gt;

&lt;p&gt;"I need an API key for that."&lt;/p&gt;

&lt;p&gt;So you sign up for a search API. Then a product data API. Then a social data provider. Then an LLM. Five accounts, five keys, five invoices, and you haven't shipped anything yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OpenAny fixes that.&lt;/strong&gt; It's the open marketplace for AI agents: 161 AI models and 3,000+ API endpoints, all reachable through one connection, one key, and one balance.&lt;/p&gt;

&lt;p&gt;You don't replace your agent. You connect the one you already use (Claude Code, Cursor, Codex, Gemini CLI, Hermes Agent, or OpenClaw) with a single line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read openany.si/AGENT.md and connect OpenAny
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F88tlyltskmmibuj0282w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F88tlyltskmmibuj0282w.png" alt="Connect OpenAny with one instruction (demo from openany.si)" width="800" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From then on, you ask for the outcome, and your agent finds and pays for what it needs.&lt;/p&gt;

&lt;p&gt;Here's what that looks like in practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use case 1: Sarah validates a product idea before lunch
&lt;/h2&gt;

&lt;p&gt;Sarah runs a small e-commerce brand. She's thinking about launching a portable coffee maker, but before she spends money on samples, she wants to know: is there room in this market?&lt;/p&gt;

&lt;p&gt;Normally that means a week of work: browsing Amazon listings, reading hundreds of reviews, scrolling TikTok for trends, then writing it all up.&lt;/p&gt;

&lt;p&gt;Instead, she opens Claude Code and types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Research the portable coffee maker market.
Find the main competitors and their price range,
summarize what Amazon reviewers complain about,
check what's trending on TikTok,
and tell me where the opportunity is.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Her agent goes to work through OpenAny:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Search&lt;/strong&gt; finds competitors and market sources&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon data&lt;/strong&gt; pulls product listings, prices, and reviews&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TikTok data&lt;/strong&gt; surfaces trending videos about travel coffee&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An LLM&lt;/strong&gt; synthesizes everything into one brief&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffxhxm080f17hppe7vfg1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffxhxm080f17hppe7vfg1.png" alt="Product research workflow example (demo data from openany.si)" width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few minutes later, she has her answer: the price range competitors sit in, the top complaint in reviews (cleanup is a pain), and a content angle that's already working on TikTok (show the brew, then the cleanup).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Her positioning:&lt;/strong&gt; portable coffee with easy cleanup.&lt;/p&gt;

&lt;p&gt;She never created an Amazon data account, a TikTok API account, or an LLM account. Her receipt shows every call itemized, paid from one balance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use case 2: Leo builds a competitor price tracker in an afternoon
&lt;/h2&gt;

&lt;p&gt;Leo is a solo developer who sells a SaaS tool. His three biggest competitors keep changing their pricing pages, and he only finds out when a customer mentions it.&lt;/p&gt;

&lt;p&gt;He wants an agent that checks their pricing every morning and tells him what changed. The hard part has never been the logic. It's the plumbing: scraping, parsing, storing, and summarizing, each with its own service.&lt;/p&gt;

&lt;p&gt;He asks his agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Every morning, check the pricing pages of these 3 competitors.
Extract their plans and prices,
compare them with yesterday,
and send me a short summary of anything that changed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Through OpenAny, his agent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Uses TinyFish&lt;/strong&gt; to extract structured data from each pricing page&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compares&lt;/strong&gt; today's plans against yesterday's&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uses an LLM&lt;/strong&gt; to write a two-line summary, like: "Competitor B raised its Pro plan and added an annual discount."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Leo's agent now does in seconds what used to take him an hour of manual checking, and he didn't sign up for a single new scraping service. When a competitor moves, he knows the same morning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it works
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Without OpenAny&lt;/th&gt;
&lt;th&gt;With OpenAny&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A separate account for every provider&lt;/td&gt;
&lt;td&gt;One connection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A pile of API keys&lt;/td&gt;
&lt;td&gt;One key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multiple invoices and top-ups&lt;/td&gt;
&lt;td&gt;One shared balance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You pick every endpoint&lt;/td&gt;
&lt;td&gt;Your agent picks what it needs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;There are no subscriptions. You pay for measured usage, with an itemized receipt for every task, and you can top up by card through Stripe or with USDC via x402.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzc0m9ioqh98kutp1c8zb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzc0m9ioqh98kutp1c8zb.png" alt="Example usage receipt (demo data from openany.si)" width="800" height="858"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it in 30 seconds
&lt;/h2&gt;

&lt;p&gt;Paste this into your agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read openany.si/AGENT.md and connect OpenAny
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then ask it for something you've been putting off.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://openany.si" rel="noopener noreferrer"&gt;openany.si&lt;/a&gt; · Follow us on X: &lt;a href="https://x.com/openanysi" rel="noopener noreferrer"&gt;@openanysi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Keep your agent. Connect it to more.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sarah and Leo are illustrative examples. Screenshots are demo examples from openany.si and do not show real requests or charges.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
