<?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: Serpbit</title>
    <description>The latest articles on DEV Community by Serpbit (serpbit).</description>
    <link>https://dev.to/serpbit</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%2Forganization%2Fprofile_image%2F16096%2F9b98e78d-2896-42d1-8628-63538b277a0f.png</url>
      <title>DEV Community: Serpbit</title>
      <link>https://dev.to/serpbit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/serpbit"/>
    <language>en</language>
    <item>
      <title>browser-use gets walled on walmart because of its own element highlights</title>
      <dc:creator>Tom Caulfield</dc:creator>
      <pubDate>Wed, 02 Dec 2026 19:49:20 +0000</pubDate>
      <link>https://dev.to/serpbit/browser-use-gets-walled-on-walmart-because-of-its-own-element-highlights-405m</link>
      <guid>https://dev.to/serpbit/browser-use-gets-walled-on-walmart-because-of-its-own-element-highlights-405m</guid>
      <description>&lt;p&gt;We run cloud browsers for AI agents. Agents built with &lt;a href="https://github.com/browser-use/browser-use" rel="noopener noreferrer"&gt;browser-use&lt;/a&gt; kept hitting walmart.com's "Robot or human?" page right after their first search, while the same browser, from the same kind of home connection, searched walmart from plain Playwright without trouble.&lt;/p&gt;

&lt;p&gt;The cause was browser-use's own housekeeping between steps, the scripts it runs in the page to draw boxes around elements, and one argument turns them off.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we tested
&lt;/h2&gt;

&lt;p&gt;We replayed what a browser-use agent does on walmart, with browser-use's own action code and no LLM: open walmart.com, close a panel if one opens, type "Instant Pot" into the search box, press search, wait. Each try was a new session with a new US home connection. The three setups ran mixed together within the same hour, so the time of day can't explain the gap.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;browser-use 0.11.5 on walmart.com, 20 tries each&lt;/th&gt;
&lt;th&gt;Search went through&lt;/th&gt;
&lt;th&gt;"Robot or human?" after the search&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;As it ships&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;With &lt;code&gt;highlight_elements=False&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;As it ships, with our Browser API answering the scripts below&lt;/td&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The other tries didn't get as far as sending the search (5, 1 and 1), so they say nothing about the wall either way. Every try that did send it was walled as shipped, and none was in the other two.&lt;/p&gt;

&lt;h2&gt;
  
  
  What browser-use does between steps
&lt;/h2&gt;

&lt;p&gt;By default browser-use takes a screenshot at each step, with coloured boxes drawn over the page's clickable elements so the model can refer to them by number. To draw and clear those boxes it runs scripts in the page itself, over the DevTools protocol. Before each new state it sends this, more or less:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;highlights&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'[data-browser-use-highlight]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Removing'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;highlights&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="s1"&gt;'browser-use highlight elements'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;highlights&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&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;It also draws a box where it clicks or types. So on every step the page sees elements appear and vanish and a &lt;code&gt;console.log&lt;/code&gt; call run, all from a script, with no person behind any of it. We didn't work out which of these PerimeterX reacts to, only that without them it didn't show the wall.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;



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

&lt;span class="n"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Browser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cdp_url&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="n"&gt;highlight_elements&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That works with any browser, local or in the cloud. The screenshots lose their coloured boxes; the model still gets the numbered list of elements, which is what it acts on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Our Browser API answers the scripts itself
&lt;/h2&gt;

&lt;p&gt;The flag is easy to miss, so our &lt;a href="https://serpbit.com/browser-api/" rel="noopener noreferrer"&gt;Browser API&lt;/a&gt; now answers browser-use's highlight scripts itself, without running them in the page. That's the third row above. If you want the boxes, say for a recording, connect with &lt;code&gt;highlights=on&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits of the test
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It's one site and one anti-bot vendor. On other PerimeterX sites our runs improved too, but we didn't take them apart the same way.&lt;/li&gt;
&lt;li&gt;It's one version of browser-use, 0.11.5, and US home connections.&lt;/li&gt;
&lt;li&gt;Twenty tries per setup is enough to see a gap of 0 against 19. It isn't enough for small differences.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your agent hits walls on other sites, try the flag and tell us what changed at &lt;a href="mailto:support@serpbit.com"&gt;support@serpbit.com&lt;/a&gt;. We told the browser-use team what we found.&lt;/p&gt;

</description>
      <category>webscraping</category>
      <category>python</category>
      <category>ai</category>
      <category>automation</category>
    </item>
    <item>
      <title>The Google search tool in your LangChain agent stops on January 1</title>
      <dc:creator>Tom Caulfield</dc:creator>
      <pubDate>Mon, 30 Nov 2026 20:44:17 +0000</pubDate>
      <link>https://dev.to/serpbit/the-google-search-tool-in-your-langchain-agent-stops-on-january-1-d7g</link>
      <guid>https://dev.to/serpbit/the-google-search-tool-in-your-langchain-agent-stops-on-january-1-d7g</guid>
      <description>&lt;p&gt;&lt;em&gt;I work on &lt;a href="https://serpbit.com/custom-search-api-alternative/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=cse-frameworks" rel="noopener noreferrer"&gt;Serpbit&lt;/a&gt;, and this post ends with something we built. The first half holds whichever way you go.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If your agent searches Google through LangChain or LlamaIndex, it almost certainly does it through Google's Custom Search JSON API. That covers &lt;code&gt;GoogleSearchAPIWrapper&lt;/code&gt; in LangChain, &lt;code&gt;GoogleSearchToolSpec&lt;/code&gt; in LlamaIndex and &lt;code&gt;GoogleCustomSearch&lt;/code&gt; in LangChain.js. All three are thin layers over that API, and all three need a search engine id (&lt;code&gt;cx&lt;/code&gt;), which only Custom Search has.&lt;/p&gt;

&lt;p&gt;Google has closed that API to new customers. On January 1, 2027 it stops searching the whole web for everyone else too, and that's a month away.&lt;/p&gt;

&lt;p&gt;We read those three tools line by line, because we wanted replacements that behave exactly the same, and found a few things we didn't expect.&lt;/p&gt;

&lt;h2&gt;
  
  
  LlamaIndex's tool fails without an error
&lt;/h2&gt;

&lt;p&gt;LangChain's Python tool goes through Google's client library, so a refused call raises an exception and the agent run stops with an error. LangChain.js throws too.&lt;/p&gt;

&lt;p&gt;LlamaIndex's tool doesn't look at the response status. It reads &lt;code&gt;items&lt;/code&gt; from whatever comes back, and an error body has no &lt;code&gt;items&lt;/code&gt;. So when the key stops working, the tool tells the model "No search results available". The agent doesn't crash. It carries on as if the web had nothing on the question, and answers from what it already knows.&lt;/p&gt;

&lt;p&gt;If you run LlamaIndex agents, check them first, because a broken search there raises no error.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool's name is part of your prompt
&lt;/h2&gt;

&lt;p&gt;The model never sees your code. It sees the tool's name and description: &lt;code&gt;google_search&lt;/code&gt;, "A wrapper around Google Search. Useful for when you need to answer questions about current events." Prompts, few-shot examples and evals often lean on those exact strings, and traces get searched by them.&lt;/p&gt;

&lt;p&gt;So a search tool with a new name and a new output shape is a bigger change than it looks: you have to re-test the agent.&lt;/p&gt;

&lt;p&gt;One more detail. LangChain's &lt;code&gt;google_search_results_json&lt;/code&gt; says it returns a JSON array, but it actually returns Python's &lt;code&gt;str()&lt;/code&gt; of a list, with single quotes. Models cope fine. But anything downstream that parses that output already depends on the quirk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three packages that keep Google's names and answers
&lt;/h2&gt;

&lt;p&gt;We already answer Custom Search's own request at the same path, so code that calls the API directly moves by changing the host and the key. For the frameworks, we made three small packages. Each keeps its tool's name, description, arguments and answers exactly as Google's, quirks included:&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;from&lt;/span&gt; &lt;span class="n"&gt;langchain_serpbit&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;SerpbitSearchAPIWrapper&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;SerpbitSearchRun&lt;/span&gt;

&lt;span class="n"&gt;search&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SerpbitSearchRun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_wrapper&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;SerpbitSearchAPIWrapper&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;# reads SERPBIT_API_KEY&lt;/span&gt;
&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"espresso grinder"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;llama-index-tools-serpbit&lt;/code&gt; and &lt;code&gt;@serpbit/langchain&lt;/code&gt; do the same for the other two. To check that "the same" really is the same, each package's tests point Google's own tool and ours at one fake Custom Search. They compare the answers, names and descriptions, and fail on any difference.&lt;/p&gt;

&lt;p&gt;These things differ:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A search engine's own list of sites doesn't carry over. &lt;code&gt;siteSearch&lt;/code&gt; covers a single site.&lt;/li&gt;
&lt;li&gt;There's no &lt;code&gt;pagemap&lt;/code&gt;, so no thumbnails.&lt;/li&gt;
&lt;li&gt;A search takes about 2 seconds, not under one.&lt;/li&gt;
&lt;li&gt;Our LlamaIndex tool raises an error instead of reporting no results. We did that on purpose.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first 1,000 searches each month are free.&lt;/p&gt;

&lt;p&gt;If your search tool lives in a framework we didn't cover, or something else in your stack leaned on Custom Search, tell me in the comments.&lt;/p&gt;

</description>
      <category>langchain</category>
      <category>llamaindex</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>On 60 everyday searches, Google's AI Overviews cited Reddit and YouTube most</title>
      <dc:creator>Tom Caulfield</dc:creator>
      <pubDate>Wed, 25 Nov 2026 16:17:32 +0000</pubDate>
      <link>https://dev.to/serpbit/we-checked-what-googles-ai-overviews-cite-on-60-searches-mostly-reddit-and-youtube-5cde</link>
      <guid>https://dev.to/serpbit/we-checked-what-googles-ai-overviews-cite-on-60-searches-mostly-reddit-and-youtube-5cde</guid>
      <description>&lt;p&gt;&lt;em&gt;I'm part of the team behind &lt;a href="https://serpbit.com" rel="noopener noreferrer"&gt;Serpbit&lt;/a&gt;, a Google search API. This post started as a how-to and turned into something else.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This morning we sat down to write a post about tracking Google's AI Overviews: the summary at the top of the results that cites a handful of sites. We wanted real numbers, so we ran 60 everyday searches through our own API and counted which sites the overviews cited.&lt;/p&gt;

&lt;p&gt;The count said every overview cited google.com.&lt;/p&gt;

&lt;p&gt;That was a bug on our side. On some pages Google now wraps each source link in its own redirect, &lt;code&gt;google.com/url?...&amp;amp;url=&amp;lt;the actual site&amp;gt;&lt;/code&gt;, and our parser passed the wrapper through as the source. Anyone who asked our API "which sites does this overview cite?" got "Google". The real address sits right there in the link, so the fix was small and needed no extra request. It was live the same morning.&lt;/p&gt;

&lt;p&gt;It's a little embarrassing, and it's also why we now run the question our users actually ask before writing about a feature. With the fix in, we ran the 60 searches again.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;60 questions of the everyday kind: "how to clean a cast iron pan", "what is a roth ira", "best air purifier for allergies". English, United States, on desktop and as an iPhone, on the morning of 25 November. We ran the whole set twice, about 80 minutes apart.&lt;/p&gt;

&lt;p&gt;That is a small sample, and a particular one: "how to" and "what is" questions are exactly where Google likes to answer. A list of brand names or product codes would look very different.&lt;/p&gt;

&lt;h2&gt;
  
  
  An overview almost every time
&lt;/h2&gt;

&lt;p&gt;59 of the 60 desktop searches had an AI Overview, and all 60 on the iPhone. For questions like these, the overview is the top of the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  The phone cites more than twice as many sites
&lt;/h2&gt;

&lt;p&gt;On desktop an overview cited 3 sites at the median. On the iPhone it was 7. In 48 of the 59 cases, every site the desktop overview cited was also in the phone's list, and the phone added more.&lt;/p&gt;

&lt;p&gt;So if you only check desktop, you see the short version. Most searches happen on phones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Forums and video, everywhere
&lt;/h2&gt;

&lt;p&gt;The most cited site on desktop was Reddit, in 26 of the 59 overviews. On the iPhone it was YouTube, in 50 of 60.&lt;/p&gt;

&lt;p&gt;This is how we got the phone's overview for the cast iron question, the one snippet in this post:&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;from&lt;/span&gt; &lt;span class="n"&gt;serpbit&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Serpbit&lt;/span&gt;

&lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Serpbit&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="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"how to clean a cast iron pan"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ai_overview&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"iphone"&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;source&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai_overview"&lt;/span&gt;&lt;span class="p"&gt;]&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="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;source&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we ran it, it printed seven sources: three YouTube Shorts, two Facebook videos, Lodge, and America's Test Kitchen. So the cookware brand and the test kitchen shared the list with five short videos.&lt;/p&gt;

&lt;h2&gt;
  
  
  Position one is cited most of the time
&lt;/h2&gt;

&lt;p&gt;The site in position one was cited in 44 of the 59 desktop overviews, and in 50 of 60 on the phone. Ranking well still gets you into the answer most of the time.&lt;/p&gt;

&lt;p&gt;11% of the sites cited on desktop weren't on the first page of results at all. On the iPhone it was a third, anything from YouTube and Instagram to health sites and Wikipedia. An overview has sources a rank tracker never sees.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stable within the hour
&lt;/h2&gt;

&lt;p&gt;When we ran everything again about 80 minutes later, an overview appeared or disappeared in only 2 of 120 searches. Two thirds came back exactly the same length, to the character. It looks like Google reuses an answer for a while. We haven't measured how it changes from day to day. That's next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the phone first
&lt;/h2&gt;

&lt;p&gt;If we were tracking a site's visibility in AI answers, we'd check the phone first and look at which other sites get cited. For a lot of everyday questions, you're competing in the overview with a forum thread or a 30-second video.&lt;/p&gt;

&lt;p&gt;On Serpbit the overview comes with the search at no extra cost: one credit, and failed searches are free.&lt;/p&gt;

&lt;p&gt;If you track AI Overviews for your own keywords, tell me in the comments whether the phone looks this different for you, or whether you've found a way to get cited other than ranking first.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>ai</category>
      <category>google</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Your AI agent quotes cookie banners because it can't read the pages it finds</title>
      <dc:creator>Tom Caulfield</dc:creator>
      <pubDate>Wed, 18 Nov 2026 09:47:54 +0000</pubDate>
      <link>https://dev.to/serpbit/why-your-ai-agent-keeps-quoting-cookie-banners-and-how-to-fix-it-5fnc</link>
      <guid>https://dev.to/serpbit/why-your-ai-agent-keeps-quoting-cookie-banners-and-how-to-fix-it-5fnc</guid>
      <description>&lt;p&gt;&lt;em&gt;I'm part of the team behind &lt;a href="https://serpbit.com" rel="noopener noreferrer"&gt;Serpbit&lt;/a&gt;. This post is about a problem we kept running into, and how we ended up solving it in our own API.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you've ever wired an AI agent up to the web, you've probably had this moment. You ask it something, it says "according to the source...", and then confidently summarizes a cookie banner. Or a "please enable JavaScript" page. Or the first paragraph of an article that sits behind a paywall.&lt;/p&gt;

&lt;p&gt;The agent had found the right links and then couldn't read them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Search is the easy half
&lt;/h2&gt;

&lt;p&gt;The usual setup has three steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask a search API for links.&lt;/li&gt;
&lt;li&gt;Download each page.&lt;/li&gt;
&lt;li&gt;Strip the menus, ads and banners, and turn what's left into text the model can use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 1 is a solved problem. Steps 2 and 3 are where the weekends go. Some pages are built entirely in JavaScript. Some sites block anything that looks like a script. Some "articles" are 90% navigation. And every one of those steps tends to be a separate service, with its own key, its own bill and its own way of failing.&lt;/p&gt;

&lt;p&gt;We build a Google search API, so our users hit this all the time. They'd get the results from us and then spend days on the part after that.&lt;/p&gt;

&lt;h2&gt;
  
  
  So we moved the reading into the search
&lt;/h2&gt;

&lt;p&gt;Now you can ask for the results and the text of the top pages in the same request. In Python it's one extra argument:&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;from&lt;/span&gt; &lt;span class="n"&gt;serpbit&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Serpbit&lt;/span&gt;

&lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Serpbit&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="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"how does a burr coffee grinder work"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&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;answer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"organic"&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="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="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="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get Google's results as usual, and the first three pages come back as clean Markdown: the main text, the title, the site name and the date when the page states one. If you'd rather paste everything straight into a prompt, there's an option that returns the whole thing as one Markdown document.&lt;/p&gt;

&lt;p&gt;If your agent lives in Claude, Cursor or another MCP client, you don't need code at all. You add our MCP server as a connector, and the search tool gets the same "also read the top pages" switch. The model can decide for itself when reading is worth it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we ran into
&lt;/h2&gt;

&lt;p&gt;Reading pages is slow. In a quick test on 18 November, a search on its own took 1.4 seconds at the median. With three pages read it was 7.4 seconds, because those pages really are fetched and cleaned. That's why reading is opt-in, and why we like letting the model choose: plenty of questions are answered by the results alone.&lt;/p&gt;

&lt;p&gt;Some pages will never be readable: paywalls, sites that block readers, pages that time out. We decided early that a page we couldn't read shouldn't cost anything. It comes back with a short reason (&lt;code&gt;blocked&lt;/code&gt;, &lt;code&gt;timeout&lt;/code&gt; and so on) instead of text, so your agent knows to move on to the next page.&lt;/p&gt;

&lt;p&gt;Long pages eat context. One long article can fill a model's whole window. So each page's text has a size cap you can set, and the cut lands at the end of a paragraph when there's one nearby.&lt;/p&gt;

&lt;p&gt;Because your agent reads the pages people actually see first on Google, its answers line up with what a person would find. That was the point of building on Google in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  One credit per page read
&lt;/h2&gt;

&lt;p&gt;One credit for the search and one for each page read. Pages that couldn't be read are free. The first 1,000 credits every month are free, no card needed, which is enough to try it on your agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Still open
&lt;/h2&gt;

&lt;p&gt;We don't know yet what else agents need from the web beyond results and text: tables, comments, or only the paragraph that answers the question. If you're building something that reads the web, tell me in the comments where it breaks for you; that's what we'll work on next.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Google Custom Search API closes on January 1, 2027; Serpbit answers the same requests</title>
      <dc:creator>Tom Caulfield</dc:creator>
      <pubDate>Fri, 13 Nov 2026 19:55:56 +0000</pubDate>
      <link>https://dev.to/serpbit/google-custom-search-api-is-closing-heres-a-drop-in-replacement-44k2</link>
      <guid>https://dev.to/serpbit/google-custom-search-api-is-closing-heres-a-drop-in-replacement-44k2</guid>
      <description>&lt;p&gt;&lt;em&gt;I'm part of the team behind &lt;a href="https://serpbit.com" rel="noopener noreferrer"&gt;Serpbit&lt;/a&gt;, so this post is about what we built. I've tried to keep the comparison fair.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Google is shutting down the Custom Search JSON API. New sign-ups are already closed, and on January 1, 2027 it stops working for everyone else too.&lt;/p&gt;

&lt;p&gt;Google's suggested replacement, Vertex AI Search, is built for searching your own websites, not the whole web. Microsoft shut down the Bing Search API back in 2025. So if your app, script or AI agent needs real web search results, you have to move somewhere, and soon.&lt;/p&gt;

&lt;p&gt;We built Serpbit so that this move takes minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Moving is a change of address and key
&lt;/h2&gt;

&lt;p&gt;Serpbit answers the same requests as Google's Custom Search, in the same format, with results from Google, so your parsing code and your tests stay as they are. You swap the address and the key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://www.googleapis.com/customsearch/v1  →  https://api.serpbit.com/customsearch/v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google's own client libraries for Python and Node keep working, and so do LangChain and LlamaIndex with a small tweak. We tested all of them against the live API before writing this.&lt;/p&gt;

&lt;p&gt;What differs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Results come from the whole web, so your search engine's site settings (&lt;code&gt;cx&lt;/code&gt;) no longer apply. To limit a search to one site, pass &lt;code&gt;siteSearch&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;pagemap&lt;/code&gt; block isn't there.&lt;/li&gt;
&lt;li&gt;It's a bit slower: about 2 seconds per search instead of under one.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The rest of Google on the same key
&lt;/h2&gt;

&lt;p&gt;The same key also gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search, with the AI Overview included at no extra cost&lt;/li&gt;
&lt;li&gt;AI Mode, Shopping, Maps, News, Images and Autocomplete&lt;/li&gt;
&lt;li&gt;An MCP server, so Claude, ChatGPT or Cursor can search Google. You connect by signing in, with no key to copy.&lt;/li&gt;
&lt;li&gt;Answers in JSON or Markdown&lt;/li&gt;
&lt;li&gt;You only pay for answers. A failed search costs nothing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it compares
&lt;/h2&gt;

&lt;p&gt;What 100,000 searches a month costs, from each provider's public pricing:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Results&lt;/th&gt;
&lt;th&gt;Works with your Custom Search code&lt;/th&gt;
&lt;th&gt;Free tier&lt;/th&gt;
&lt;th&gt;100k searches/month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Serpbit&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;Yes, change the URL&lt;/td&gt;
&lt;td&gt;1,000/month, no card&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$75&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://serper.dev/" rel="noopener noreferrer"&gt;Serper&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;No, new integration&lt;/td&gt;
&lt;td&gt;2,500 to start&lt;/td&gt;
&lt;td&gt;~$75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://serpapi.com/pricing" rel="noopener noreferrer"&gt;SerpApi&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;No, new integration&lt;/td&gt;
&lt;td&gt;250/month&lt;/td&gt;
&lt;td&gt;$725&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://brave.com/search/api/" rel="noopener noreferrer"&gt;Brave Search API&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Brave's own index&lt;/td&gt;
&lt;td&gt;No, new integration&lt;/td&gt;
&lt;td&gt;$5 credit/month, card required&lt;/td&gt;
&lt;td&gt;~$500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Custom Search (until Jan 1)&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;100/day&lt;/td&gt;
&lt;td&gt;$485&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Where each one fits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Serper costs about the same as us. If you're starting from scratch and only need web results, it's a fine choice. Serpbit makes more sense if you already have Custom Search code, or want AI Mode, Maps and the rest on one key.&lt;/li&gt;
&lt;li&gt;SerpApi covers many search engines beyond Google, and you pay for that breadth.&lt;/li&gt;
&lt;li&gt;Brave has its own independent index. It works well for feeding an AI agent relevant pages, but its results won't match what people see on Google, which SEO and rank tracking need.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The first 1,000 searches every month are free, and you don't need a card. &lt;a href="https://app.serpbit.com/signup" rel="noopener noreferrer"&gt;Get a key&lt;/a&gt;, point one of your existing Custom Search calls at us, and compare the results with what you get today.&lt;/p&gt;

&lt;p&gt;If anything in your setup doesn't work the way it did with Google, tell me in the comments or at &lt;a href="mailto:support@serpbit.com"&gt;support@serpbit.com&lt;/a&gt;. We'd like to fix it before January.&lt;/p&gt;

</description>
      <category>api</category>
      <category>python</category>
      <category>ai</category>
      <category>google</category>
    </item>
  </channel>
</rss>
