<?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: Gowtham D</title>
    <description>The latest articles on DEV Community by Gowtham D (@gowtham_d).</description>
    <link>https://dev.to/gowtham_d</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%2F4175499%2F13b9a19f-7704-421c-8660-7ddb37ea43fe.png</url>
      <title>DEV Community: Gowtham D</title>
      <link>https://dev.to/gowtham_d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gowtham_d"/>
    <language>en</language>
    <item>
      <title>Your agent shouldn't write your API layer. One binary serves it.</title>
      <dc:creator>Gowtham D</dc:creator>
      <pubDate>Wed, 04 Nov 2026 12:29:55 +0000</pubDate>
      <link>https://dev.to/gowtham_d/your-agent-shouldnt-write-your-api-layer-one-binary-serves-it-c26</link>
      <guid>https://dev.to/gowtham_d/your-agent-shouldnt-write-your-api-layer-one-binary-serves-it-c26</guid>
      <description>&lt;p&gt;We've all become merchants of complexity. We just outsourced the manufacturing to a model.&lt;/p&gt;

&lt;p&gt;Prompt, generate, handler. Prompt, generate, tests. Prompt, generate, tools. Per table, per service, per company. It's never been easier to produce code and never been harder to say what any of it is for. We industrialized the one thing software was supposed to eliminate: busywork.&lt;/p&gt;

&lt;p&gt;We wanted no part of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  One binary. Every table is an API.
&lt;/h2&gt;

&lt;p&gt;Minimal Core: one binary. Drop it on the database you already have. Every table is a REST API and an MCP tool. Permissioned. Audited. Nothing generated, nothing scaffolded, nothing "quietly" written for you. No code, because the right amount of code for this layer is none.&lt;/p&gt;

&lt;p&gt;The moment it starts, you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A REST API for every table&lt;/strong&gt;, with permissions set per table and per verb.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An MCP tool for every table&lt;/strong&gt;, so an agent works with the same data under the same rules. That is 115 tools in all: read and write tables, govern them, build APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An audit trail of every call&lt;/strong&gt;, from people and agents alike.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No handler code.&lt;/strong&gt; Definitions live in a Postgres store and requests are answered from them. There is nothing to generate, test or review, so there is nothing to defend.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your agent stops writing the API and starts asking for it.&lt;/p&gt;

&lt;p&gt;Three of us have built toward this for years. Minimal Core is in beta today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run it today
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Start here: the lean stack, three containers and five commands&lt;/strong&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/littlebitlabs" rel="noopener noreferrer"&gt;
        littlebitlabs
      &lt;/a&gt; / &lt;a href="https://github.com/littlebitlabs/minimal-setup" rel="noopener noreferrer"&gt;
        minimal-setup
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Guides and scripts to run Minimal, Relay and Postgres with Docker Compose, plus an MCP guide and test script
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Minimal setup&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Your data already lives in a database. &lt;a href="https://littlebitlabs.com" rel="nofollow noopener noreferrer"&gt;Minimal&lt;/a&gt; turns it into a governed API platform: point it at your tables and you get REST endpoints you didn't have to write, permissions per table and per verb, an audit trail of every call — and an MCP server, so AI agents can work with the same data under the same rules. This repository is the shortest tested path to running it yourself: three containers, five commands, about ten minutes. Every command in it was run before it was written down; the few that weren't are marked &lt;strong&gt;(not tested)&lt;/strong&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Quick start&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;This is Docker Compose on your own machine — case 2 of the &lt;a href="https://github.com/littlebitlabs/minimal-setup#choose-your-setup" rel="noopener noreferrer"&gt;setup table&lt;/a&gt; below, and the path to start with. You need Docker with Compose v2, &lt;code&gt;python3&lt;/code&gt; and &lt;code&gt;openssl&lt;/code&gt;, and a Minimal license. The license is self-service: sign in to the &lt;a href="https://license.littlebitlabs.com" rel="nofollow noopener noreferrer"&gt;license portal&lt;/a&gt; with Google…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/littlebitlabs/minimal-setup" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Or the full stack from one compose file: sign-in, gateway, TLS and a sample app&lt;/strong&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/littlebitlabs" rel="noopener noreferrer"&gt;
        littlebitlabs
      &lt;/a&gt; / &lt;a href="https://github.com/littlebitlabs/minimal-pitstop" rel="noopener noreferrer"&gt;
        minimal-pitstop
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Minimal with sign-in, an API gateway, TLS, sample data and a sample app, from one Docker Compose file. Guides and AI-agent setup skills.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Minimal Pitstop&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://littlebitlabs.com" rel="nofollow noopener noreferrer"&gt;Minimal&lt;/a&gt; turns database tables into a governed REST API: roles and permissions are enforced on every call. Pitstop runs it with everything it needs from one Docker Compose file: sign-in, an API gateway, TLS, a sample dataset and a sample app. One &lt;code&gt;docker compose up -d --wait&lt;/code&gt;, then a tour that checks it works.&lt;/p&gt;
&lt;p&gt;This repo holds the compose file and the guides, mirrored byte for byte from the &lt;a href="https://artifacts.littlebitlabs.com" rel="nofollow noopener noreferrer"&gt;Littlebit Labs artifacts registry&lt;/a&gt;. It has no source.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Before you start&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Docker (Engine 26+, Compose 2.17+) on Linux or macOS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A Minimal license, self-service. Sign in to the &lt;a href="https://license.littlebitlabs.com" rel="nofollow noopener noreferrer"&gt;license portal&lt;/a&gt; with Google or GitHub; the free trial needs no card and ends in a hard stop, never an invoice. On the License page download the key file &lt;code&gt;minimal-license-&amp;lt;slug&amp;gt;.json&lt;/code&gt; and copy the &lt;code&gt;LICENSE_SECRET&lt;/code&gt; (shown once; Replace secret gives you a new one). On the Account page note your…&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/littlebitlabs/minimal-pitstop" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  What changes for the agent
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt; prompt, generate a handler, generate its tests, generate a tool wrapper. Then the next table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After:&lt;/strong&gt; it connects, lists the tools and uses them.&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="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3046/minimal/mcp/rpc/v1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"LB-Access-Token: &amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Accept: application/json, text/event-stream'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"jsonrpc":"2.0","id":1,"method":"tools/list"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That call returns all 115 tools. The agent works with exactly the permissions its token carries, and every call is recorded. Minimal speaks MCP, so any MCP client (Claude, ChatGPT, Codex, Cursor and so on) can connect.&lt;/p&gt;

&lt;h2&gt;
  
  
  What goes back in your pocket
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tokens.&lt;/strong&gt; The 90% of tokens you burned on CRUD plumbing go back in your pocket. That figure is ours, from our own tasks, not an independent benchmark. Test it on yours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time.&lt;/strong&gt; The weeks your team spent babysitting that layer go back on the calendar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trust.&lt;/strong&gt; The more autonomous your agents get, the more trust has to be built in, not bolted on. Here, permissions and audit are the foundation, not a feature added later.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it in about ten minutes
&lt;/h2&gt;

&lt;p&gt;You need Docker with Compose v2, &lt;code&gt;python3&lt;/code&gt;, &lt;code&gt;openssl&lt;/code&gt; and a Minimal license. The license is self-service: sign in to the &lt;a href="https://license.littlebitlabs.com" rel="noopener noreferrer"&gt;license portal&lt;/a&gt; with Google or GitHub and download two files.&lt;/p&gt;

&lt;p&gt;One catch first. The license relay checks in with the Littlebit license server every time it starts, and the server only answers addresses on your &lt;strong&gt;Relay access&lt;/strong&gt; list. Find yours and add it in the portal:&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="nt"&gt;-4&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; https://checkip.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/littlebitlabs/minimal-setup.git
&lt;span class="nb"&gt;cd &lt;/span&gt;minimal-setup/compose

./setup.sh &amp;lt;slug&amp;gt; /path/to/minimal-license-&amp;lt;slug&amp;gt;.json &lt;span class="se"&gt;\&lt;/span&gt;
  /path/to/minimal-license-secret-&amp;lt;slug&amp;gt;.json
./fetch-binaries.sh      &lt;span class="c"&gt;# each download is checked against a pinned SHA-256&lt;/span&gt;
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--build&lt;/span&gt;

curl http://127.0.0.1:3045/minimal/proof/v1/ping      &lt;span class="c"&gt;# expect: "message":"pong"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is three containers: &lt;code&gt;minimal&lt;/code&gt;, &lt;code&gt;postgres&lt;/code&gt; and &lt;code&gt;relay&lt;/code&gt;. Only &lt;code&gt;minimal&lt;/code&gt; publishes ports, and both are bound to &lt;code&gt;127.0.0.1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To get an agent token, the repo ships a script that creates a sample org and a 7-day token, then proves every tool family against your running stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 compose/tests/mcp-proto.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What to know before you try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's a beta.&lt;/strong&gt; A trial license is for evaluation: you can connect a production database to try it, but not to serve production traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's closed source.&lt;/strong&gt; There is no open-source license in the repo. Your use is governed by your Minimal license agreement and Littlebit's terms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It phones home.&lt;/strong&gt; The relay needs outbound access to &lt;code&gt;relay.license.littlebitlabs.com&lt;/code&gt; on port 443, from an address on your allow list. If your address changes, you add the new one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It speaks plain HTTP.&lt;/strong&gt; Fine on loopback on one machine. Across a network, use an SSH tunnel. Docker publishes ports through its own firewall rules, so &lt;code&gt;ufw&lt;/code&gt; alone won't restrict them. The compose guide has the details.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tested on:&lt;/strong&gt; Minimal &lt;code&gt;v0.62.13-2-g2b26815&lt;/code&gt; and Relay &lt;code&gt;v0.2.3&lt;/code&gt;, on an Apple Silicon Mac and on Ubuntu 24.04 (x86-64). Other versions and platforms may differ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not tested yet:&lt;/strong&gt; MCP through an SSH tunnel, and the agent setup skill end to end.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you would rather hand-write your API layer, or you need the whole stack to be open source, this isn't for you, and that's a fair answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/littlebitlabs/minimal-setup" rel="noopener noreferrer"&gt;github.com/littlebitlabs/minimal-setup&lt;/a&gt;&lt;/strong&gt;: the lean stack, three containers, five commands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/littlebitlabs/minimal-pitstop" rel="noopener noreferrer"&gt;github.com/littlebitlabs/minimal-pitstop&lt;/a&gt;&lt;/strong&gt;: the full stack from one compose file, with sign-in, a gateway, TLS, 10 sample datasets, a sample app and a tour that checks it all works.&lt;/p&gt;

&lt;p&gt;The beta has a free tier of 60 days and 3 million requests, no card. Get your license at &lt;a href="https://license.littlebitlabs.com" rel="noopener noreferrer"&gt;license.littlebitlabs.com&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;When your agents need an API over your own data today, what do you do: let them generate it, write it yourself, or something else? And what would you need to see before you trusted a layer you didn't write?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>api</category>
      <category>postgres</category>
    </item>
    <item>
      <title>How to query 65,000 rows of NYC nutrition data without downloading a CSV</title>
      <dc:creator>Gowtham D</dc:creator>
      <pubDate>Sat, 10 Oct 2026 15:37:03 +0000</pubDate>
      <link>https://dev.to/gowtham_d/how-to-query-65000-rows-of-nyc-nutrition-data-without-downloading-a-csv-2jk</link>
      <guid>https://dev.to/gowtham_d/how-to-query-65000-rows-of-nyc-nutrition-data-without-downloading-a-csv-2jk</guid>
      <description>&lt;p&gt;You want to answer a small question  say, &lt;em&gt;which chain restaurant items have the most calories?&lt;/em&gt;  and the data exists. NYC Open Data publishes &lt;a href="https://data.cityofnewyork.us/d/qgc5-ecnb" rel="noopener noreferrer"&gt;MenuStat&lt;/a&gt;: 65,219 menu items from 96 US chains, with calories, sodium, serving sizes.&lt;/p&gt;

&lt;p&gt;The usual path: download the CSV, write a loader, discover every number is a string, discover &lt;code&gt;calories&lt;/code&gt; is sometimes &lt;code&gt;null&lt;/code&gt; and sometimes the literal text &lt;code&gt;"110-550"&lt;/code&gt;, build a little Flask thing so your frontend can query it, deploy the little Flask thing, and three days later you have infrastructure instead of an answer.&lt;/p&gt;

&lt;p&gt;This tutorial takes the other path: the dataset is already hosted as a typed REST API on &lt;a href="https://littlebitlabs.com/products/api-bay" rel="noopener noreferrer"&gt;API Bay&lt;/a&gt;. We'll query it with nothing but &lt;code&gt;curl&lt;/code&gt;, page through it correctly, and  because this is the part most tutorials skip  go through the gotchas that cost real (if tiny) money.&lt;/p&gt;

&lt;h2&gt;
  
  
  The approach
&lt;/h2&gt;

&lt;p&gt;Every dataset in the API Bay catalog answers the same query model: one key, one URL shape, the same parameters and filter operators everywhere. Learn it once on this dataset and it's the same on the next one. There's also a sandbox host where calls are free (100/day), so you can follow along without spending anything  create a &lt;em&gt;test&lt;/em&gt; key and swap the host.&lt;/p&gt;

&lt;p&gt;Setup, once:&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;# paste your key when prompted, so it never lands in shell history&lt;/span&gt;
&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-rs&lt;/span&gt; KEY
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'LB-Access-Token: %s\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ~/.apibay-key &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;600 ~/.apibay-key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Your first call
&lt;/h2&gt;

&lt;p&gt;The dataset is &lt;code&gt;nyc_food_cart_menu_statistics&lt;/code&gt;. Ask for two rows, four columns:&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="nt"&gt;-H&lt;/span&gt; @&lt;span class="nv"&gt;$HOME&lt;/span&gt;/.apibay-key &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"https://api.selectstar.wtf/v1/apibay/nyc_food_cart_menu_statistics?ps=2&amp;amp;pg=0&amp;amp;fc=menu_item_id,restaurant,item_name,calories"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"calories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"item_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Broccoli"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"menu_item_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;14850&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"restaurant"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Denny's"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"calories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;130&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"item_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mushroom Chicken, Kids"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"menu_item_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;62672&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"restaurant"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Panda Express"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three parameters did the work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ps&lt;/code&gt;  page size (rows per call, max 100)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pg&lt;/code&gt;  page number, counting from 0&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fc&lt;/code&gt;  the columns you want; omit it and you get all 49&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note &lt;code&gt;calories: 25&lt;/code&gt; is a &lt;strong&gt;number&lt;/strong&gt;. The schema is typed (&lt;code&gt;Int32&lt;/code&gt;, &lt;code&gt;Float64&lt;/code&gt;, &lt;code&gt;String&lt;/code&gt;, &lt;code&gt;Nullable&lt;/code&gt;)  if you've ever pulled this dataset raw from the Socrata API, where every value arrives as a string, this alone saves you a parsing layer.&lt;/p&gt;

&lt;p&gt;The response headers are half the product, so read them once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x-cost-per-1k: USD 1.70          ← this dataset's price per 1,000 calls
x-wallet-remaining: USD 99.99    ← your prepaid balance after this call
x-ratelimit-remaining: 143994    ← calls left in the 24h window
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every metered response prices itself. A program that spends money should read &lt;code&gt;x-wallet-remaining-requests&lt;/code&gt; and &lt;code&gt;x-ratelimit-remaining&lt;/code&gt; on every response  more on why below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filtering, ordering, paging
&lt;/h2&gt;

&lt;p&gt;A filter is &lt;code&gt;column=operator.value&lt;/code&gt;. Answer the opening question  highest-calorie items at or above 9,000 kcal:&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="nt"&gt;-H&lt;/span&gt; @&lt;span class="nv"&gt;$HOME&lt;/span&gt;/.apibay-key &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"https://api.selectstar.wtf/v1/apibay/nyc_food_cart_menu_statistics?ps=3&amp;amp;pg=0&amp;amp;fc=restaurant,item_name,calories&amp;amp;calories=ge.9000&amp;amp;oy=calories.ds"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"calories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13960&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"item_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Crave Crate w/ Any 100 Sliders in a Crate"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"restaurant"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"White Castle"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"calories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10205&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"item_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Prime Rib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"restaurant"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Dickey's Barbeque Pit"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"calories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;9240&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"item_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Rib Tips Til Payday, Dinner"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"restaurant"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Famous Dave's"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Yes, White Castle sells a 13,960-calorie crate of 100 sliders. Open data delivers.)&lt;/p&gt;

&lt;p&gt;There are 19 operators  &lt;code&gt;eq&lt;/code&gt;, &lt;code&gt;ne&lt;/code&gt;, &lt;code&gt;gt/ge/lt/le&lt;/code&gt;, &lt;code&gt;bw&lt;/code&gt; (between), &lt;code&gt;in&lt;/code&gt;, &lt;code&gt;li&lt;/code&gt; (contains), &lt;code&gt;il&lt;/code&gt; (contains, case-insensitive), &lt;code&gt;mt&lt;/code&gt; (regex), &lt;code&gt;is.NULL&lt;/code&gt;, and friends. Filters on different columns AND together; &lt;code&gt;or=(...)&lt;/code&gt; groups alternatives:&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;# McDonald's or Subway, at least 1,000 kcal&lt;/span&gt;
...&amp;amp;or&lt;span class="o"&gt;=(&lt;/span&gt;restaurant.eq.McDonald%27s,restaurant.eq.Subway&lt;span class="o"&gt;)&lt;/span&gt;&amp;amp;calories&lt;span class="o"&gt;=&lt;/span&gt;ge.1000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Page like you mean it.&lt;/strong&gt; Every call must carry &lt;code&gt;ps&lt;/code&gt; and &lt;code&gt;pg&lt;/code&gt;  leave one out and you get a &lt;code&gt;406&lt;/code&gt;. That's a guardrail: no call can accidentally return the whole table. But correct paging is still on you:&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;# WRONG-ish: ties in `calories` have no defined order between pages&lt;/span&gt;
&lt;span class="nv"&gt;oy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;calories.ds

&lt;span class="c"&gt;# RIGHT: add tie-breakers until no two rows compare equal&lt;/span&gt;
&lt;span class="nv"&gt;oy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;calories.ds,menu_item_id.as,item_name.as
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This dataset is full of ties (and &lt;code&gt;menu_item_id&lt;/code&gt; itself repeats across collection years  the real key is id + year). Page on an ambiguous order and a row can show up on two pages, or on none. This is true of every paginated API you'll ever use; it just usually bites silently.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gotchas nobody documents
&lt;/h2&gt;

&lt;p&gt;This is a metered API  calls cost money ($1.70 per 1,000 on this dataset, i.e. $0.0017 each). That changes the failure modes in ways worth knowing before you write a loop:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Mistakes that reach the dataset are billed.&lt;/strong&gt; An unknown column, a missing &lt;code&gt;pg&lt;/code&gt;, a filter value with a bare SQL keyword  these come back as &lt;code&gt;417&lt;/code&gt;/&lt;code&gt;406&lt;/code&gt;/&lt;code&gt;400&lt;/code&gt; &lt;em&gt;with&lt;/em&gt; the metering headers, logged and charged like a success. Validate the URL before you send it; resending a broken request just repeats the charge. (Refusals at the door  no key, &lt;code&gt;POST&lt;/code&gt; to a read-only API, &lt;code&gt;ps&lt;/code&gt; over 100  cost nothing.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Only two errors are worth retrying.&lt;/strong&gt; &lt;code&gt;429&lt;/code&gt; means rate limit: wait &lt;code&gt;Retry-After&lt;/code&gt; seconds, send the same request. &lt;code&gt;402&lt;/code&gt; means your wallet or a spend cap is done: no amount of retrying helps. Everything else repeats until you change the request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Cache hits are billed too.&lt;/strong&gt; Repeat an identical request within moments and &lt;code&gt;apisix-cache-status: HIT&lt;/code&gt; tells you it came from cache  at full price. Same for a &lt;code&gt;~rand&lt;/code&gt; order returning the same rows. If you need fresh rows, change the request, don't re-send it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. A call costs the same for 1 row or 100.&lt;/strong&gt; So &lt;code&gt;ps=100&lt;/code&gt; always, and ask for only the columns you need with &lt;code&gt;fc&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The platform types the data; it doesn't interpret it.&lt;/strong&gt; &lt;code&gt;calories&lt;/code&gt; being &lt;code&gt;null&lt;/code&gt; in ~9,900 rows, a &lt;code&gt;calories_text&lt;/code&gt; column holding ranges like &lt;code&gt;"110-550"&lt;/code&gt;, a recorded &lt;code&gt;0&lt;/code&gt; meaning something different from both  that's the source dataset, served faithfully. The serving layer has no business silently "fixing" public data, so those decisions ship in &lt;em&gt;your&lt;/em&gt; client code.&lt;/p&gt;

&lt;p&gt;The worst case is bounded, though: the wallet is prepaid and spending stops at its balance. A runaway loop ends when the wallet does, not when the invoice arrives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;From zero to answering real questions against 65,219 rows: one key, four or five &lt;code&gt;curl&lt;/code&gt; commands, no download, no loader, no deploy. The question from the top  most caloric chain-restaurant items  took one request.&lt;/p&gt;

&lt;p&gt;Honest limitations, so you can decide if this fits your use case:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read-only.&lt;/strong&gt; &lt;code&gt;GET&lt;/code&gt; only; anything else is refused.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No aggregates.&lt;/strong&gt; There's no &lt;code&gt;count(*)&lt;/code&gt; or &lt;code&gt;sum()&lt;/code&gt;  grouping answers "which groups exist", not "how many in each". If you need analytics, pull the rows (at 100/page) and aggregate client-side, or this isn't your tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100 rows per page, 512 KB per response.&lt;/strong&gt; Bulk export is not the use case; the CSV download still wins there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's in beta.&lt;/strong&gt; Screens and details may shift.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want the free route instead: the raw dataset is on &lt;a href="https://data.cityofnewyork.us/d/qgc5-ecnb" rel="noopener noreferrer"&gt;NYC Open Data&lt;/a&gt; with a Socrata API  you'll just be doing your own typing, hosting and semantics. I wrote up what that actually involves (the null-vs-text calories, the duplicate IDs, one genuine two-chains-one-ID bug) in a longer companion piece.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm the co-founder/CTO of Littlebit Labs  API Bay is our product. The &lt;a href="https://littlebitlabs.com/docs/api-bay-bible" rel="noopener noreferrer"&gt;API Bay Bible&lt;/a&gt; documents the full query model, every refusal, and the publisher side (uploading your own table and pricing it), if you want to go deeper.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What's your default move when a side project needs public data  download and load, or find an API? Curious what the split looks like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://littlebitlabs.com" rel="noopener noreferrer"&gt;https://littlebitlabs.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://selectstar.wtf" rel="noopener noreferrer"&gt;https://selectstar.wtf&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>opendata</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
