<?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: Ken-Mutisya</title>
    <description>The latest articles on DEV Community by Ken-Mutisya (@scrapemint).</description>
    <link>https://dev.to/scrapemint</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%2F4006428%2F450d271d-24fa-4dcd-b75c-cda1fe0182dc.jpg</url>
      <title>DEV Community: Ken-Mutisya</title>
      <link>https://dev.to/scrapemint</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/scrapemint"/>
    <language>en</language>
    <item>
      <title>Nottingham Forest are 17th. Their expected points say 6th. Pulling xG tables from FotMob's JSON</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Tue, 24 Nov 2026 09:22:25 +0000</pubDate>
      <link>https://dev.to/scrapemint/nottingham-forest-are-17th-their-expected-points-say-6th-pulling-xg-tables-from-fotmobs-json-d07</link>
      <guid>https://dev.to/scrapemint/nottingham-forest-are-17th-their-expected-points-say-6th-pulling-xg-tables-from-fotmobs-json-d07</guid>
      <description>&lt;p&gt;Eleven games into the Premier League season, Nottingham Forest have &lt;strong&gt;9 points&lt;/strong&gt; and sit 17th. On the chances they have created and conceded, a team like that would expect about &lt;strong&gt;17.7 points&lt;/strong&gt;, which would put them 6th.&lt;/p&gt;

&lt;p&gt;That gap between points and expected points (xPts) is one of the most useful numbers in football betting. Over a season, results drift back towards the underlying chances. Teams far above their xPts tend to cool off, and teams far below tend to pick up. Most sites show xG per match, but the expected-points table is harder to find in a form you can script.&lt;/p&gt;

&lt;p&gt;FotMob has one, in plain JSON, with no key.&lt;/p&gt;

&lt;h2&gt;
  
  
  The endpoint
&lt;/h2&gt;

&lt;p&gt;Every league page on FotMob loads this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="na"&gt;GET https://www.fotmob.com/api/data/leagues?id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;47&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;47&lt;/code&gt; is the Premier League. LaLiga is &lt;code&gt;87&lt;/code&gt;, Serie A &lt;code&gt;55&lt;/code&gt;, Bundesliga &lt;code&gt;54&lt;/code&gt;, Ligue 1 &lt;code&gt;53&lt;/code&gt;, MLS &lt;code&gt;130&lt;/code&gt;. Add &lt;code&gt;&amp;amp;season=2025%2F2026&lt;/code&gt; for a past season.&lt;/p&gt;

&lt;p&gt;The response holds the fixtures, the stat leaderboards and the league table. The table comes in five views: &lt;code&gt;all&lt;/code&gt;, &lt;code&gt;home&lt;/code&gt;, &lt;code&gt;away&lt;/code&gt;, &lt;code&gt;form&lt;/code&gt; and &lt;strong&gt;&lt;code&gt;xg&lt;/code&gt;&lt;/strong&gt;. The &lt;code&gt;xg&lt;/code&gt; rows carry &lt;code&gt;xg&lt;/code&gt;, &lt;code&gt;xgConceded&lt;/code&gt;, &lt;code&gt;xPoints&lt;/code&gt; and &lt;code&gt;xPosition&lt;/code&gt; for every team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ten lines of JavaScript
&lt;/h2&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;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'https://www.fotmob.com/api/data/leagues?id=47'&lt;/span&gt;&lt;span class="p"&gt;,&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="p"&gt;{&lt;/span&gt; &lt;span class="s1"&gt;'User-Agent'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Mozilla/5.0'&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;league&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;res&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="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;xg&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;league&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;table&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;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;realPos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;all&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;idx&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;xg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;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;team&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;t&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="n"&gt;pts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;xPts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xPoints&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&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="n"&gt;gap&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="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pts&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xPoints&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&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="n"&gt;pos&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;realPos&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;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;xPos&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xPosition&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="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gap&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&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="mi"&gt;5&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;Output on November 24:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;team&lt;/th&gt;
&lt;th&gt;pts&lt;/th&gt;
&lt;th&gt;xPts&lt;/th&gt;
&lt;th&gt;gap&lt;/th&gt;
&lt;th&gt;pos&lt;/th&gt;
&lt;th&gt;xPos&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nottingham Forest&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;17.7&lt;/td&gt;
&lt;td&gt;-8.7&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sunderland&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;15.3&lt;/td&gt;
&lt;td&gt;-6.3&lt;/td&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manchester United&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;13.1&lt;/td&gt;
&lt;td&gt;-5.1&lt;/td&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fulham&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;14.6&lt;/td&gt;
&lt;td&gt;-3.6&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Crystal Palace&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;10.4&lt;/td&gt;
&lt;td&gt;-3.4&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three of the bottom five are there because results have gone against them, not because the chances have.&lt;/p&gt;

&lt;h2&gt;
  
  
  The same view across the top five leagues
&lt;/h2&gt;

&lt;p&gt;Running it for all five leagues, the biggest gaps either way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Running hot (points above xPts)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;team&lt;/th&gt;
&lt;th&gt;league&lt;/th&gt;
&lt;th&gt;pts&lt;/th&gt;
&lt;th&gt;xPts&lt;/th&gt;
&lt;th&gt;gap&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lazio&lt;/td&gt;
&lt;td&gt;Serie A&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;19.1&lt;/td&gt;
&lt;td&gt;+12.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Real Betis&lt;/td&gt;
&lt;td&gt;LaLiga&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;17.1&lt;/td&gt;
&lt;td&gt;+9.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Atlético Madrid&lt;/td&gt;
&lt;td&gt;LaLiga&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;td&gt;23.4&lt;/td&gt;
&lt;td&gt;+7.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Milan&lt;/td&gt;
&lt;td&gt;Serie A&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;19.6&lt;/td&gt;
&lt;td&gt;+7.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Borussia Dortmund&lt;/td&gt;
&lt;td&gt;Bundesliga&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;td&gt;16.8&lt;/td&gt;
&lt;td&gt;+7.2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Running cold (points below xPts)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;team&lt;/th&gt;
&lt;th&gt;league&lt;/th&gt;
&lt;th&gt;pts&lt;/th&gt;
&lt;th&gt;xPts&lt;/th&gt;
&lt;th&gt;gap&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Le Havre&lt;/td&gt;
&lt;td&gt;Ligue 1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;11.8&lt;/td&gt;
&lt;td&gt;-9.8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fiorentina&lt;/td&gt;
&lt;td&gt;Serie A&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;17.9&lt;/td&gt;
&lt;td&gt;-8.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nottingham Forest&lt;/td&gt;
&lt;td&gt;Premier League&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;17.7&lt;/td&gt;
&lt;td&gt;-8.7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Villarreal&lt;/td&gt;
&lt;td&gt;LaLiga&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;22.9&lt;/td&gt;
&lt;td&gt;-7.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monza&lt;/td&gt;
&lt;td&gt;Serie A&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;17.3&lt;/td&gt;
&lt;td&gt;-7.3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Lazio top Serie A with the seventh-best underlying numbers. Bayern are second in the Bundesliga but first on xPts, with 32.3 xG against 9.8 conceded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Eleven or twelve games is a small sample.&lt;/strong&gt; Finishing and goalkeeping skill are real, and some teams beat their xG for years.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;xPts uses FotMob's own xG model.&lt;/strong&gt; Understat, Opta and StatsBomb numbers will differ a little.&lt;/li&gt;
&lt;li&gt;The endpoint is undocumented. Send a normal User-Agent, cache what you fetch, and don't hammer it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Going further
&lt;/h2&gt;

&lt;p&gt;The same response links to about 40 player stat lists (xG, xA, xGOT, per 90) under &lt;code&gt;stats.players[].fetchAllUrl&lt;/code&gt;. Per-match xG and full shot maps come from &lt;code&gt;/api/data/matchDetails?matchId=...&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I wrapped all three (xG tables, player xG/xA and match xG with shot maps, for 40+ leagues and past seasons) into an Apify actor, &lt;a href="https://apify.com/scrapemint/football-xg-stats" rel="noopener noreferrer"&gt;Football xG Stats&lt;/a&gt;, so it can run on a schedule and export to CSV or a spreadsheet. The same batch has four more for bettors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://apify.com/scrapemint/historical-football-odds" rel="noopener noreferrer"&gt;Historical Football Odds&lt;/a&gt;: opening and closing lines back to 1993 for backtesting&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://apify.com/scrapemint/flashscore-scraper" rel="noopener noreferrer"&gt;Flashscore Scraper&lt;/a&gt;: live scores, match stats and odds from 20 bookmakers&lt;/li&gt;
&lt;li&gt;&lt;a href="https://apify.com/scrapemint/horse-racing-racecards-results" rel="noopener noreferrer"&gt;Horse Racing Racecards &amp;amp; Results&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://apify.com/scrapemint/forex-sentiment-tracker" rel="noopener noreferrer"&gt;Forex Sentiment&lt;/a&gt;: % of retail traders long or short per pair&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the snippet above is all you need for the xPts table. Which team do you think is most likely to keep beating its numbers?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>datascience</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Every new US trucking company, the day it registers: querying FMCSA's free census API</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Fri, 20 Nov 2026 14:35:45 +0000</pubDate>
      <link>https://dev.to/scrapemint/every-new-us-trucking-company-the-day-it-registers-querying-fmcsas-free-census-api-2h8l</link>
      <guid>https://dev.to/scrapemint/every-new-us-trucking-company-the-day-it-registers-querying-fmcsas-free-census-api-2h8l</guid>
      <description>&lt;p&gt;Every company that runs a commercial truck across state lines in the US needs a USDOT number. When someone files for one, FMCSA adds a row to its Company Census File, and the US DOT publishes that file as an open dataset that refreshes daily.&lt;/p&gt;

&lt;p&gt;That makes it one of the cleanest lead sources around. A brand-new carrier needs insurance, a factoring company, fuel cards, an ELD, a dispatcher and often a truck, all within its first few weeks. In the week to November 18 the file gained &lt;strong&gt;1,509 new active carriers&lt;/strong&gt;, and &lt;strong&gt;every one of them had a phone number and an email address on file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This post shows how to query it directly, with no key and no scraping.&lt;/p&gt;

&lt;h2&gt;
  
  
  The endpoint
&lt;/h2&gt;

&lt;p&gt;The census file lives on the DOT's Socrata portal as dataset &lt;code&gt;az4n-8mr2&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://data.transportation.gov/resource/az4n-8mr2.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Socrata speaks SoQL, a small SQL dialect passed as query parameters. Counting the carriers added since a date takes one request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;GET&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//data.transportation.gov/resource/az4n-8mr2.json&lt;/span&gt;
    &lt;span class="na"&gt;?$select&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;count&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="na"&gt;&amp;amp;$where&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;add_date&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="s1"&gt;'20261113'&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="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1546"&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;&lt;code&gt;add_date&lt;/code&gt; is stored as &lt;code&gt;YYYYMMDD&lt;/code&gt; text, so a plain string comparison works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pulling the new carriers
&lt;/h2&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="no"&gt;BASE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'https://data.transportation.gov/resource/az4n-8mr2.json'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ymd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toISOString&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;slice&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="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/-/&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;since&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ymd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;86400000&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;where&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="sb"&gt;`add_date &amp;gt;= '${since}'`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="sb"&gt;`status_code = 'A'`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                 &lt;span class="c1"&gt;// active only&lt;/span&gt;
  &lt;span class="sb"&gt;`phy_state in ('TX','FL','CA')`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="sb"&gt;`classdef like '%AUTHORIZED FOR HIRE%'`&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;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;' AND '&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`${BASE}?$where=${encodeURIComponent(where)}`&lt;/span&gt;
  &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sb"&gt;`&amp;amp;$order=${encodeURIComponent('add_date DESC, dot_number DESC')}`&lt;/span&gt;
  &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sb"&gt;`&amp;amp;$limit=1000&amp;amp;$offset=0`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&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="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="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="n"&gt;rows&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="n"&gt;rows&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="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Page with &lt;code&gt;$offset&lt;/code&gt; until a page comes back shorter than &lt;code&gt;$limit&lt;/code&gt;. Without an app token Socrata throttles you, but a daily pull of a few thousand rows is nowhere near the limit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fields that matter
&lt;/h2&gt;

&lt;p&gt;Each row has around 40 columns. The useful ones:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Column&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dot_number&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;USDOT number, the primary key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;legal_name&lt;/code&gt;, &lt;code&gt;dba_name&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Company names&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;add_date&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Date FMCSA added the carrier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;phone&lt;/code&gt;, &lt;code&gt;email_address&lt;/code&gt;, &lt;code&gt;company_officer_1&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Contact details from the MCS-150 filing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;phy_street&lt;/code&gt;, &lt;code&gt;phy_city&lt;/code&gt;, &lt;code&gt;phy_state&lt;/code&gt;, &lt;code&gt;phy_zip&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Physical address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;carrier_operation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;A&lt;/code&gt; interstate, &lt;code&gt;B&lt;/code&gt; intrastate hazmat, &lt;code&gt;C&lt;/code&gt; intrastate non-hazmat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;classdef&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Free text such as &lt;code&gt;AUTHORIZED FOR HIRE;PRIVATE PROPERTY&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;power_units&lt;/code&gt;, &lt;code&gt;truck_units&lt;/code&gt;, &lt;code&gt;total_drivers&lt;/code&gt;, &lt;code&gt;total_cdl&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Fleet size&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;hm_ind&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Y&lt;/code&gt; if the carrier hauls hazmat&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A few gotchas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;power_units&lt;/code&gt; is text.&lt;/strong&gt; Cast it to filter numerically: &lt;code&gt;power_units::number &amp;lt;= 2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cargo types are flag columns&lt;/strong&gt; (&lt;code&gt;crgo_genfreight&lt;/code&gt;, &lt;code&gt;crgo_bldgmat&lt;/code&gt;, &lt;code&gt;crgo_produce&lt;/code&gt; and so on) holding &lt;code&gt;'X'&lt;/code&gt; when set. A refrigerated-food filter is &lt;code&gt;crgo_coldfood = 'X'&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MC numbers sit in &lt;code&gt;docket1..3&lt;/code&gt;&lt;/strong&gt;, each with its own prefix and status columns. Look one up across all three with an &lt;code&gt;OR&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phone numbers are bare digits.&lt;/strong&gt; Normalize them to E.164 (&lt;code&gt;+1&lt;/code&gt; and 10 digits) before loading into a CRM.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What a week of new carriers looks like
&lt;/h2&gt;

&lt;p&gt;From the 1,509 active carriers added between November 13 and 18:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;74%&lt;/strong&gt; are authorized for hire, meaning they haul other people's freight and need cargo insurance and a factoring partner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;58%&lt;/strong&gt; have one power unit or none, and &lt;strong&gt;84%&lt;/strong&gt; have two or fewer: these are owner-operators&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;57%&lt;/strong&gt; are interstate, so they also need an MC authority, BOC-3 and UCR&lt;/li&gt;
&lt;li&gt;Top states: California 157, Texas 152, Florida 120, Georgia 80, Pennsylvania 74&lt;/li&gt;
&lt;li&gt;Top cargo: general freight 753, building materials 255, construction 255, grain/feed/hay 75&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Weekday adds run around 400 a day, and weekend adds are far lower.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning it into a daily lead list
&lt;/h2&gt;

&lt;p&gt;The pattern I use is a scheduled job that pulls the last 1 to 2 days, dedupes on &lt;code&gt;dot_number&lt;/code&gt; and pushes new rows to a CRM or a sheet. If you'd rather not maintain it, I packaged the same query as an Apify actor: &lt;a href="https://apify.com/scrapemint/fmcsa-trucking-carrier-leads" rel="noopener noreferrer"&gt;FMCSA Trucking Carrier Leads&lt;/a&gt;. It adds state, fleet size, cargo, hazmat and for-hire filters, plus lookup by DOT number, MC number or company name, and it returns normalized rows with a SAFER snapshot link.&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;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"new"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"addedWithinDays"&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="nl"&gt;"states"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"TX"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"FL"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"authorizedForHireOnly"&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="nl"&gt;"maxPowerUnits"&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;"requireEmail"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Either way, the data is public and free, and it updates every day.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note on use: these are business registrations filed with a federal regulator. Many owner-operators list a personal phone and email, so follow CAN-SPAM and TCPA rules and honor opt-outs.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>api</category>
      <category>datascience</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Computing max pain, gamma exposure and the gamma flip from Cboe's free option chain</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Sun, 15 Nov 2026 23:19:52 +0000</pubDate>
      <link>https://dev.to/scrapemint/computing-max-pain-gamma-exposure-and-the-gamma-flip-from-cboes-free-option-chain-1994</link>
      <guid>https://dev.to/scrapemint/computing-max-pain-gamma-exposure-and-the-gamma-flip-from-cboes-free-option-chain-1994</guid>
      <description>&lt;p&gt;"SPX gamma flip is 7615, dealers are short gamma" is the kind of line that shows up in trading Discords every morning. The data behind it usually sits behind a $50 to $300 a month subscription. Most of it can be computed from one free JSON file, and this post walks through how.&lt;/p&gt;

&lt;h2&gt;
  
  
  The data: one GET per symbol
&lt;/h2&gt;

&lt;p&gt;Cboe publishes a delayed (about 15 minute) quote for every listed option on a symbol in a single JSON document:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://cdn.cboe.com/api/global/delayed_quotes/options/SPY.json
https://cdn.cboe.com/api/global/delayed_quotes/options/_SPX.json   (indexes take an underscore)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It redirects to &lt;code&gt;cdn-api.cboe.com&lt;/code&gt;, needs no key, and returns the underlying's price plus an &lt;code&gt;options&lt;/code&gt; array (about 5,000 contracts for TSLA, more for SPX). Each contract looks like this:&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;"option"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"TSLA261120P00140000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"bid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"ask"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"iv"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;2.164&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"open_interest"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;13695.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"volume"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;55021.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"delta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;-0.001&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"gamma"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"theta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;-0.0238&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The contract code is a standard OCC symbol: root, &lt;code&gt;YYMMDD&lt;/code&gt; expiry, &lt;code&gt;C&lt;/code&gt; or &lt;code&gt;P&lt;/code&gt;, and the strike times 1000 in 8 digits.&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;function&lt;/span&gt; &lt;span class="nf"&gt;parseOcc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&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="no"&gt;A&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="no"&gt;Z0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;.&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="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;6&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;CP&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;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;}&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="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&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="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m&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="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expiry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sb"&gt;`20${d.slice(0,2)}-${d.slice(2,4)}-${d.slice(4,6)}`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'C'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strike&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&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="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;Two gotchas cost me time:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Adjusted contracts.&lt;/strong&gt; After corporate actions you get roots like &lt;code&gt;TSLA1&lt;/code&gt; or odd ones like &lt;code&gt;B1SLA&lt;/code&gt; with non-standard deliverables. Keep only the plain root (plus &lt;code&gt;SPXW&lt;/code&gt;-style weekly roots for indexes), or your open interest totals will be quietly wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unknown symbols return 403, not 404.&lt;/strong&gt; A 403 here means "no chain", not "you're blocked".&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Max pain
&lt;/h2&gt;

&lt;p&gt;Max pain is the strike where option holders' total intrinsic value at expiry would be smallest. For each candidate settlement price K, add up what every open contract would be worth:&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="c1"&gt;// strikes: [{ strike, callOi, putOi }] for one expiry&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;maxPain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;Infinity&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;strikes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;pay&lt;/span&gt; &lt;span class="o"&gt;=&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;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;strikes&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="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;pay&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;callOi&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// calls in the money&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;pay&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;putOi&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// puts in the money&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="n"&gt;pay&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pay&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;maxPain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&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 is O(n²) in strikes, which is fine: even SPX has a few hundred strikes per expiry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gamma exposure (GEX)
&lt;/h2&gt;

&lt;p&gt;GEX estimates how much stock dealers have to buy or sell per 1% move to stay hedged. The usual convention assumes customers are long calls and long puts, so dealers are short both. With that, call gamma stabilizes the market and put gamma destabilizes it:&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="c1"&gt;// per contract, in USD per 1% move&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;gex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gamma&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;openInterest&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;spot&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;spot&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;isCall&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;gex&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;gex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;* 100&lt;/code&gt; is the contract multiplier. &lt;code&gt;spot² * 0.01&lt;/code&gt; turns gamma (delta change per $1) into dollars of delta per 1% move.&lt;/p&gt;

&lt;p&gt;Positive net GEX means dealer hedging dampens moves. Negative means it amplifies them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gamma flip
&lt;/h2&gt;

&lt;p&gt;The flip is the price where net GEX changes sign. To find it you need gamma at prices other than the current one, so you can't use Cboe's published gamma. Re-price it with Black-Scholes from each contract's implied volatility:&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;function&lt;/span&gt; &lt;span class="nf"&gt;bsGamma&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;K&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;iv&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="mf"&gt;0.04&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="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="no"&gt;K&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="no"&gt;T&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;&amp;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="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;st&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;d1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&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="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="no"&gt;K&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="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;st&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;d1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;d1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;PI&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="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;st&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;// scan -20%..+20% in 0.25% steps, linear-interpolate the zero crossing&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;prev&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mf"&gt;0.2001&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mf"&gt;0.0025&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;spot&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;=&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;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;contracts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;bsGamma&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strike&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;call&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="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="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oi&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.01&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="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prev&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;net&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;S&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="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&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="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&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="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;flip&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;spot&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;flip&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;spot&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;flip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;prev&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;net&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;Clamp T to at least half a day, or same-day (0DTE) contracts blow up the gamma.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call wall and put wall
&lt;/h2&gt;

&lt;p&gt;Group GEX by strike. Within about 25% of the price, the strike with the largest positive call GEX is the &lt;strong&gt;call wall&lt;/strong&gt; (often resistance) and the one with the most negative put GEX is the &lt;strong&gt;put wall&lt;/strong&gt; (often support).&lt;/p&gt;

&lt;h2&gt;
  
  
  What it says right now
&lt;/h2&gt;

&lt;p&gt;Using Friday's close (spot 754.37) and the three nearest SPY expiries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SPY  net GEX  -$887M per 1%   regime: negative
     gamma flip 763.47        spot is 1.2% below it
     call wall 760, put wall 758
     max pain (nearest expiry) 762
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SPX told the same story: net GEX of -$11.7B per 1% and a flip at 7615 with spot at 7562. TSLA was the opposite: positive GEX, spot above a flip at 380.6.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open interest updates once a day, overnight, so intraday GEX moves only through price and IV.&lt;/li&gt;
&lt;li&gt;The "dealers are short everything" assumption is a simplification. Real positioning differs, especially in single stocks with heavy call buying.&lt;/li&gt;
&lt;li&gt;Quotes are delayed about 15 minutes. That's fine for daily levels, not for scalping.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  If you'd rather not run it yourself
&lt;/h2&gt;

&lt;p&gt;I packaged this as an &lt;a href="https://apify.com/scrapemint/options-max-pain-gamma-exposure" rel="noopener noreferrer"&gt;Apify actor&lt;/a&gt; (schedule it, export to a sheet or webhook) and as a &lt;a href="https://rapidapi.com/scrapemint/api/options-max-pain-gamma-exposure" rel="noopener noreferrer"&gt;REST API on RapidAPI&lt;/a&gt; with a free tier. The same Cboe chain also powers an &lt;a href="https://rapidapi.com/scrapemint/api/earnings-expected-move" rel="noopener noreferrer"&gt;earnings expected move&lt;/a&gt; endpoint: the at-the-money straddle on the first expiry after each report. This week that's ±11.1% for PANW and ±8.8% for NVDA.&lt;/p&gt;

&lt;p&gt;The math above is everything that's in there. If you build your own version, I'd like to hear how your numbers compare.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>jellyfin</category>
      <category>api</category>
      <category>datascience</category>
    </item>
    <item>
      <title>My weather model said 0%. The market said 90%. The market was right, because of rounding.</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Fri, 13 Nov 2026 18:07:27 +0000</pubDate>
      <link>https://dev.to/scrapemint/my-weather-model-said-0-the-market-said-90-the-market-was-right-because-of-rounding-5cdc</link>
      <guid>https://dev.to/scrapemint/my-weather-model-said-0-the-market-said-90-the-market-was-right-because-of-rounding-5cdc</guid>
      <description>&lt;p&gt;I run a small tool that prices Kalshi's daily temperature markets ("Will the low in Atlanta tomorrow be 49° to 50°?") against a weather forecast. For each bracket it computes a forecast probability and puts it next to the market's price. Where the two disagree, that's the interesting row.&lt;/p&gt;

&lt;p&gt;On November 11 one row disagreed about as much as a row can:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Atlanta, daily low, bracket 49° to 50°
market:   90%
my model:  0%
observed low so far: 48.2°F
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The logic looked airtight. The low for the day had already reached 48.2°F. A low can only go down from there, so it can't end up between 49 and 50. Zero percent.&lt;/p&gt;

&lt;p&gt;The market was pricing 90% with real money behind it. When a model says "impossible" and the market says "very likely," the model is usually the one that's wrong. Here it was.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where 48.2 came from
&lt;/h2&gt;

&lt;p&gt;The observations come from the free National Weather Service API (&lt;code&gt;api.weather.gov/stations/{id}/observations&lt;/code&gt;). It returns two kinds of reading mixed together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hourly METAR reports.&lt;/strong&gt; These carry the temperature to 0.1°C, and the response includes the raw METAR text in &lt;code&gt;rawMessage&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-minute readings&lt;/strong&gt; between the hourly reports. These are &lt;strong&gt;whole degrees Celsius&lt;/strong&gt;, and &lt;code&gt;rawMessage&lt;/code&gt; is empty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;48.2°F is exactly 9°C. The reading wasn't 48.2. It was "9", which means anything from 8.5°C to 9.5°C, or &lt;strong&gt;47.3°F to 49.1°F&lt;/strong&gt;. Converting to Fahrenheit made a rounded number look precise to a tenth of a degree.&lt;/p&gt;

&lt;p&gt;So the observation didn't rule out the 49° bracket at all. The true low could have been 49.1°F. The market (which settles on the station's daily climate report, not on 5-minute snapshots) priced it that way.&lt;/p&gt;

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

&lt;p&gt;Treat each 5-minute reading as a range, not a point. For a daily &lt;strong&gt;high&lt;/strong&gt;, a reading only proves the high reached at least its lower bound. For a daily &lt;strong&gt;low&lt;/strong&gt;, it only proves the low went at least as far down as its upper bound.&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;obs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;features&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;properties&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="c1"&gt;// Hourly METARs carry 0.1 C; 5-minute readings are whole degrees.&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;slack&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rawMessage&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&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="n"&gt;lo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;slack&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;5&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="n"&gt;hi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;slack&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;5&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="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;high&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&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;obs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lo&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;// proven high so far&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;low&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&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;obs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hi&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;// proven low so far&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that change, the Atlanta reading of 9°C proves only that the low is at or below 49.1°F. The 49° to 50° bracket stays possible, and the forecast decides how likely it is.&lt;/p&gt;

&lt;h2&gt;
  
  
  The general lesson
&lt;/h2&gt;

&lt;p&gt;Any time you convert units, check the precision of the source before you trust the decimals. &lt;code&gt;9 * 9/5 + 32 = 48.2&lt;/code&gt; is correct arithmetic and still wrong. The extra digit came from the conversion, not from the thermometer.&lt;/p&gt;

&lt;p&gt;The same thing happens elsewhere:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prices rounded to the cent and then converted to another currency.&lt;/li&gt;
&lt;li&gt;Timestamps stored to the minute and then compared to the second.&lt;/li&gt;
&lt;li&gt;Percentages rounded for display and then summed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The bug is never in the conversion. It's in treating the converted value as exact.&lt;/p&gt;




&lt;p&gt;The tool is &lt;a href="https://apify.com/scrapemint/kalshi-weather-markets" rel="noopener noreferrer"&gt;Kalshi Weather Markets&lt;/a&gt; on Apify: every open Kalshi temperature bracket with the market price, a forecast probability from NWS and NBM data, and the observed high or low so far. It now applies the fix above.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>datascience</category>
      <category>weather</category>
    </item>
    <item>
      <title>My Script Logged 88 Messages Sent. 87 Never Arrived</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Sun, 08 Nov 2026 19:41:13 +0000</pubDate>
      <link>https://dev.to/scrapemint/my-script-logged-88-messages-sent-87-never-arrived-6ga</link>
      <guid>https://dev.to/scrapemint/my-script-logged-88-messages-sent-87-never-arrived-6ga</guid>
      <description>&lt;p&gt;This morning a browser script of mine announced 88 new scrapers in a Discord channel. The log said 88 posted. The channel showed one.&lt;/p&gt;

&lt;p&gt;Discord had silently dropped the other 87. The script was sending every 2.5 seconds, each send looked fine from the outside, and nothing raised an error. Slowing to 7 seconds between sends fixed the delivery. The more useful lesson was why the log was wrong in the first place.&lt;/p&gt;

&lt;p&gt;The script logged the action, not the result. It pressed Enter and wrote "posted". Those are different events, and going back through my posting scripts I found the same mistake three more times.&lt;/p&gt;

&lt;h2&gt;
  
  
  An HTTP 200 that means no
&lt;/h2&gt;

&lt;p&gt;My X poster used to log success after clicking the post button. X answers its CreateTweet call with HTTP 200 even when it refuses the post, and puts the reason in an &lt;code&gt;errors&lt;/code&gt; array. A duplicate comes back as code 187. A refused thread was logged as posted.&lt;/p&gt;

&lt;p&gt;The fix was to watch the response and treat only an accepted tweet as success:&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="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;response&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;url&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;CreateTweet&lt;/span&gt;&lt;span class="dl"&gt;'&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;createErrors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nx"&gt;createdIds&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;create_tweet&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;tweet_results&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;rest_id&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;If &lt;code&gt;createdIds&lt;/code&gt; is empty after the click, nothing was posted, whatever the button appeared to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The right action on the wrong element
&lt;/h2&gt;

&lt;p&gt;Discord's search field and its message composer are both editable boxes with &lt;code&gt;role="textbox"&lt;/code&gt;, and search comes first in the DOM. My selector grabbed search. A whole promo message was typed into it, Enter ran a query, and the page showed "No results". The script thought it had posted.&lt;/p&gt;

&lt;p&gt;Now the selector requires the composer's own label, and the script refuses to type if the label does not start with "Message".&lt;/p&gt;

&lt;h2&gt;
  
  
  A check that could never pass
&lt;/h2&gt;

&lt;p&gt;Tonight I found the opposite bug. After sending, my verifier looked for the raw URL on the page. Discord renders markdown links as their titles, so the URL never appears, and a message that had arrived was reported as uncertain.&lt;/p&gt;

&lt;p&gt;A verifier that always fails trains you to ignore it. The check now looks for the first line of the message in the channel, once the composer has emptied.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parser that lost a tweet
&lt;/h2&gt;

&lt;p&gt;My thread parser expected a &lt;code&gt;---&lt;/code&gt; after each tweet. A file whose last tweet had no terminator lost that tweet, and the thread went out one short with no warning. It now compares how many sections a file declares with how many it parsed, and aborts if they differ.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I do now
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Log the observed result.&lt;/strong&gt; "Clicked" and "delivered" get different words.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check from the receiving side.&lt;/strong&gt; A cleared input box only tells you the input is empty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate three outcomes:&lt;/strong&gt; confirmed, definitely not sent, and unclear. Only "definitely not sent" is safe to retry. Retrying "unclear" is how you post twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test the checker against a real success.&lt;/strong&gt; If it cannot pass, it is not a check.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The bulk Discord script still only paces its sends and does not verify each one, so for that one I count what reached the channel by hand.&lt;/p&gt;

&lt;p&gt;When did a green log last lie to you?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I build &lt;a href="https://apify.com/scrapemint" rel="noopener noreferrer"&gt;Scrapemint&lt;/a&gt;, a set of data scrapers on Apify, and these scripts handle its announcements. This post was written with help from an AI assistant, based on my own code and logs.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Two free datasets that are easy to pull and easy to misread</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Sun, 09 Aug 2026 20:24:20 +0000</pubDate>
      <link>https://dev.to/scrapemint/two-free-datasets-that-are-easy-to-pull-and-easy-to-misread-4hpf</link>
      <guid>https://dev.to/scrapemint/two-free-datasets-that-are-easy-to-pull-and-easy-to-misread-4hpf</guid>
      <description>&lt;p&gt;Some of the most useful public data needs no key, no account and no browser. You can get it with one HTTP call. The hard part was never fetching it. The hard part is knowing what the number actually means, because both of the datasets below are routinely quoted as something they are not.&lt;/p&gt;

&lt;h2&gt;
  
  
  FINRA daily short volume
&lt;/h2&gt;

&lt;p&gt;FINRA publishes a plain text file every trading day listing, per symbol, how much of that day's volume printed on the short side. It is free and it updates daily.&lt;/p&gt;

&lt;p&gt;Here is GME across five sessions in early August, as a share of total volume:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Aug 3   79.76%
Aug 4   72.55%
Aug 5   65.09%
Aug 6   61.83%
Aug 7   58.71%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A steady decline, and the kind of shape you only see if you pull the daily file rather than the headline number.&lt;/p&gt;

&lt;p&gt;Now the trap. &lt;strong&gt;This is short volume, not short interest.&lt;/strong&gt; They get used interchangeably all the time and they measure different things. Short interest is a standing position, the number of shares currently sold short and not yet covered, and FINRA publishes it twice a month. Short volume is a flow measure for one session.&lt;/p&gt;

&lt;p&gt;A 79% reading does not mean 79% of the float is sold short. A large part of daily short volume comes from market makers who take the other side of a buy order and flatten out minutes later. The position never persists. If you build a signal on short volume while describing it as short interest, you are modelling intraday liquidity provision and calling it bearish conviction.&lt;/p&gt;

&lt;p&gt;Both numbers are useful. They are not substitutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  OSV vulnerability advisories
&lt;/h2&gt;

&lt;p&gt;OSV.dev aggregates security advisories across npm, PyPI, Go, Maven, crates.io and more, and serves them over a free API. Give it a package and a version, get back every advisory that matches.&lt;/p&gt;

&lt;p&gt;I ran three pinned versions of the kind that sit in a lockfile nobody has touched in two years:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="err"&gt;lodash&lt;/span&gt;  &lt;span class="err"&gt;4.17.15&lt;/span&gt;
&lt;span class="err"&gt;django&lt;/span&gt;  &lt;span class="err"&gt;3.2.0&lt;/span&gt;
&lt;span class="err"&gt;express&lt;/span&gt; &lt;span class="err"&gt;4.17.1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That returned 70 published advisories, 24 of them rated High or Critical. Django 3.2.0 on its own accounted for 6 Critical and 15 High, including a SQL injection.&lt;/p&gt;

&lt;p&gt;Two traps here.&lt;/p&gt;

&lt;p&gt;First, roughly a third of the advisories carried no severity rating at all. Not "low", but absent. If your code does &lt;code&gt;if (severity === 'HIGH')&lt;/code&gt; you silently drop those rows, and if you coerce a missing severity to zero you will report a clean scan that is not clean. Keep them null and count them separately.&lt;/p&gt;

&lt;p&gt;Second, an advisory matching your version does not prove your code reaches the vulnerable function. A CVE in a parser you never call is real but not urgent. Version matching gives you a triage list, not a verdict, and treating it as a verdict is how teams end up ignoring the whole report.&lt;/p&gt;

&lt;p&gt;The field worth building on is &lt;code&gt;firstPatchedVersion&lt;/code&gt;. It turns a wall of CVE ids into the one upgrade that clears them, which is the difference between a report and a task.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;Both of these are official sources, both are free, both are one request away, and both have a headline number that means something narrower than it looks. The work is not in the fetch. It is in the footnote.&lt;/p&gt;

&lt;p&gt;I package these as pay per row actors on Apify if you would rather not maintain the plumbing: &lt;a href="https://apify.com/scrapemint/short-selling-data-tracker" rel="noopener noreferrer"&gt;Short Selling Data Tracker&lt;/a&gt; for the FINRA file and &lt;a href="https://apify.com/scrapemint/dependency-vulnerability-scanner" rel="noopener noreferrer"&gt;Open Source Dependency Vulnerability Scanner&lt;/a&gt; for OSV. I ship a new one every few days, so the catalog is bigger by the time you read this.&lt;/p&gt;

&lt;p&gt;What is a dataset you have seen confidently misread in production?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>showdev</category>
    </item>
    <item>
      <title>"Two Markets Disagree About the Fed. Reading Both Without an API Key"</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Thu, 30 Jul 2026 10:51:15 +0000</pubDate>
      <link>https://dev.to/scrapemint/two-markets-disagree-about-the-fed-reading-both-without-an-api-key-33p6</link>
      <guid>https://dev.to/scrapemint/two-markets-disagree-about-the-fed-reading-both-without-an-api-key-33p6</guid>
      <description>&lt;p&gt;There are two independent ways to ask what the Federal Reserve will do at its next meeting, and today they give different answers. Neither of them needs an API key, which makes the disagreement easy to watch in code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first source: a prediction market
&lt;/h2&gt;

&lt;p&gt;Polymarket runs real money markets on the September Fed decision. Pulled this morning, the market on a 25 basis point hike sits at 56.5%, the market on no change at 38.5%, and roughly $1.25M changed hands on that second market in 24 hours.&lt;/p&gt;

&lt;p&gt;The useful part is that each market is a plain JSON object once you find it:&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="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"question"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Will the Fed increase interest rates by 25 bps after the September 2026 meeting?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"outcomes"&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;"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;"Yes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.565&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;"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;"No"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.435&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;"volume24hr"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;422177.19&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"liquidity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;118432.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bestBid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.562&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bestAsk"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.568&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"endDate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-09-17T00:00:00Z"&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;Prices are probabilities. A price of 0.565 is the market saying 56.5%. Bid and ask matter more than they look: a wide spread means the quoted probability is softer than it appears, and volume tells you whether anyone is actually backing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The second source: interest rate futures
&lt;/h2&gt;

&lt;p&gt;The other answer comes from 30 Day Federal Funds futures, which the exchange publishes as a daily settlement file. A contract settles against the average effective rate over its month, so the price carries a rate: subtract it from 100.&lt;/p&gt;

&lt;p&gt;That average is the trap. A month holding an FOMC meeting is a blend of the old rate for the days before the decision and the new one after, so you cannot read it as a single number. If the decision lands on the 28th of a 30 day month, only two days sit at the new rate, and solving for that rate divides by those two days. Any error in your inputs gets multiplied about fifteen times, and chaining meetings compounds it. My first version produced a policy rate of negative 1.47%, which is a good sign your arithmetic has left reality.&lt;/p&gt;

&lt;p&gt;The fix is to stop dividing where you do not have to. A month with no meeting in it prices one constant rate for the whole month, so when the month after a decision is clean, its implied rate simply is the post meeting rate. No division, nothing to amplify. Only fall back to solving the blend when the calendar gives you no clean month, and refuse it when too few days remain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the gap is the interesting part
&lt;/h2&gt;

&lt;p&gt;Run both and you get two probabilities for the same event from two unrelated crowds: one betting cash on an outcome, one hedging rate exposure. Today they are several points apart on a September hike.&lt;/p&gt;

&lt;p&gt;That gap is the signal. It is not a trade recommendation, it is a question worth asking: which crowd is better informed about this particular event, and does the gap close as the meeting approaches? You can only ask it if you are sampling both on a schedule, because both move constantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on expressing the answer
&lt;/h2&gt;

&lt;p&gt;One habit worth copying from the futures side. An implied change of 7.5 basis points is not a "7.5 basis point hike", because no such decision exists. Rate moves come in 25 basis point steps. That number is roughly a 30% chance of one 25 point move and a 70% chance of nothing at all. Convert to the units the decision actually comes in, or your output quietly implies something that cannot happen.&lt;/p&gt;

&lt;p&gt;Both sources are public HTTP endpoints returning JSON or CSV. No keys, no accounts, no browser. If you want the prediction market side already normalised into rows, I keep one running here: &lt;a href="https://apify.com/scrapemint/polymarket-market-monitor" rel="noopener noreferrer"&gt;Polymarket Prediction Market Tracker&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When two markets disagree about the same event, which one do you trust more, and why?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>api</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Two public directories that are quietly great B2B lead sources</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Wed, 15 Jul 2026 19:41:43 +0000</pubDate>
      <link>https://dev.to/scrapemint/two-public-directories-that-are-quietly-great-b2b-lead-sources-5d1m</link>
      <guid>https://dev.to/scrapemint/two-public-directories-that-are-quietly-great-b2b-lead-sources-5d1m</guid>
      <description>&lt;p&gt;Most teams buy lead lists. The lists are stale, half the emails bounce, and everyone in your niche bought the same file. Meanwhile some of the best lead sources sit in plain sight: public directories that publish structure, freshness signals and even contact routes, free to read for anyone willing to parse them.&lt;/p&gt;

&lt;p&gt;I run a fleet of scrapers on Apify (a new one ships every few days, so whatever count I write here is already wrong) and the two directory actors I promoted this week are a good case study in what public data can do for outreach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source one: the Y Combinator startup directory.&lt;/strong&gt; YC publishes every funded company with batch, industry, region, team size and hiring status. That is a prefiltered universe of funded buyers: each company passed a selective screen, raised money recently and is usually growing. The directory itself does not list emails, but almost every startup site does, so the actor filters the directory first and then visits each company website to scrape a contact address. One run returns rows like company, pitch, website, team size, batch and the email it found, with the rows that lack an email flagged honestly. Recruiters filter by hiring status, sellers filter by industry, investors watch specific batches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source two: podcast RSS feeds.&lt;/strong&gt; Every podcast feed carries an owner field, and that field usually holds the exact email the host wants business mail sent to. Search the public podcast directory for a keyword, pull each show feed, read the owner email plus episode count and last episode date, and you have a list of active shows in a niche with reachable hosts. The freshness signal matters as much as the email: a show that has not published in two years wastes your pitch, so the actor surfaces the last episode date and lets you skip dead shows before writing to anyone.&lt;/p&gt;

&lt;p&gt;The pattern behind both is the same and it generalizes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find a directory that curates for you. Curation is the expensive part of lead generation, and YC (funded companies) or a podcast index (shows by topic) already did it.&lt;/li&gt;
&lt;li&gt;Look for the freshness field. Hiring status, last episode date, latest batch: recency separates a lead from a museum piece.&lt;/li&gt;
&lt;li&gt;Follow the entity to its own property for contact data. Company sites and RSS feeds publish contact routes on purpose, which makes them fair and reliable in a way harvested emails are not.&lt;/li&gt;
&lt;li&gt;Return misses honestly. A row that says no email found is information, not failure, and it keeps your input list reconciled one to one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Everything here is keyless HTTP against public endpoints, no browser automation and no login walls, which keeps runs fast and costs tiny. On pay per event pricing that matters: a lead costs a few cents only when the row actually delivers.&lt;/p&gt;

&lt;p&gt;Both actors are live on Apify under the Scrapemint account as YC Startup Leads and Podcast Host Leads, priced per result with the first rows of every run free, and they sit alongside the rest of the fleet: an email checker, a phone checker, a VAT checker and more list hygiene tools that clean whatever the lead sources produce.&lt;/p&gt;

&lt;p&gt;The bigger takeaway is that directories are underrated infrastructure. Everyone scrapes search results and social feeds, which are hostile and noisy, while directories are structured, consented and refreshed by their owners. What public directory in your niche is sitting there unparsed?&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>api</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>"Turning Google Maps Into a Clean Local Lead List, With Emails"</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Sun, 12 Jul 2026 20:37:39 +0000</pubDate>
      <link>https://dev.to/scrapemint/turning-google-maps-into-a-clean-local-lead-list-with-emails-2la</link>
      <guid>https://dev.to/scrapemint/turning-google-maps-into-a-clean-local-lead-list-with-emails-2la</guid>
      <description>&lt;p&gt;Every local sales motion starts with the same question: who are all the businesses of type X in city Y, and how do I reach them. Google Maps already knows the answer. The trick is getting it out as structured rows instead of a page you scroll forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  What one place actually contains
&lt;/h2&gt;

&lt;p&gt;A single Google Maps place is far richer than the pin suggests. For each business you can pull:&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="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"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;"Bright Smile Dental"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"address"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"123 Main St, Austin, TX 78701"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"phone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"+1 512 555 0100"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"website"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://brightsmileaustin.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rating"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;4.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"reviews"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;312&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hours"&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;"mon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9-5"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"tue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9-5"&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;"priceRange"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&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;Two things make this a lead list rather than a directory dump. First, the phone and website are on almost every business, so the rows are actually reachable. Second, the rating and review count let you rank by traction, so you call the busy, established places first.&lt;/p&gt;

&lt;h2&gt;
  
  
  The missing piece: email
&lt;/h2&gt;

&lt;p&gt;Maps gives you a website but not an email, and email is what most outreach tools want. So the last step is a light enrichment pass: take the website from each place, fetch the home and contact pages, and pull the first address plus any obvious contact name.&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="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;place&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;website&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-z0-9._%+-&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+@&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-z0-9.-&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.[&lt;/span&gt;&lt;span class="sr"&gt;a-z&lt;/span&gt;&lt;span class="se"&gt;]{2,}&lt;/span&gt;&lt;span class="sr"&gt;/i&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="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run that only for places that have a website and you convert a map of pins into a spreadsheet of name, phone, website, email, rating, and reviews, ready to import.&lt;/p&gt;

&lt;h2&gt;
  
  
  Query or URL in, rows out
&lt;/h2&gt;

&lt;p&gt;You drive it two ways: a search string like "dentists in Austin" to sweep a whole category in a city, or a specific place URL when you already know the business. Either way you get one clean row per place, and the enrichment is optional so you only pay for emails when you want them.&lt;/p&gt;

&lt;p&gt;I packaged the whole flow, Maps parsing plus the website email enrichment, here: &lt;a href="https://apify.com/scrapemint/google-maps-scraper" rel="noopener noreferrer"&gt;https://apify.com/scrapemint/google-maps-scraper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And counting. It is one of a set of lead tools I have been writing up one at a time.&lt;/p&gt;

</description>
      <category>node</category>
      <category>webdev</category>
      <category>showdev</category>
      <category>api</category>
    </item>
    <item>
      <title>"The Shopify App Store Hands You a B2B Lead List, for Free"</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Sun, 12 Jul 2026 20:37:02 +0000</pubDate>
      <link>https://dev.to/scrapemint/the-shopify-app-store-hands-you-a-b2b-lead-list-for-free-fl</link>
      <guid>https://dev.to/scrapemint/the-shopify-app-store-hands-you-a-b2b-lead-list-for-free-fl</guid>
      <description>&lt;p&gt;Shopify app developers are a captive market: agencies, tooling makers, and app store optimization services all want to reach them. It turns out the Shopify App Store publishes everything you need to build that lead list, no login and no API key, if you know where to look.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: the sitemap gives you every app handle
&lt;/h2&gt;

&lt;p&gt;The App Store ships an XML sitemap. Fetch it and you get the canonical handle for every listed app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET https://apps.shopify.com/sitemap.xml
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It points at child sitemaps, each of which lists app URLs like &lt;code&gt;https://apps.shopify.com/klaviyo-email-marketing&lt;/code&gt;. Pull the last path segment and you have a stable id for every app on the platform. No pagination games, no scrolling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: each listing embeds the developer contact
&lt;/h2&gt;

&lt;p&gt;Open any app detail page and the developer contact is right there in the HTML, in a data attribute the page uses for its own "contact" button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data-developer-support-email="support@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every Shopify app is required to publish a support email, so coverage is effectively total. Alongside it you get the developer name, the partner page, the company website, the rating, the review count, and the pricing tiers, all in the server rendered markup.&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="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://apps.shopify.com/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;handle&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;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/data-developer-support-email="&lt;/span&gt;&lt;span class="se"&gt;([^&lt;/span&gt;&lt;span class="sr"&gt;"&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&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="o"&gt;??&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: rank by traction
&lt;/h2&gt;

&lt;p&gt;Because you also get rating and review counts, you can sort the whole list by how much traction each app has, so outreach starts with the developers who are clearly making money and reinvesting in tooling.&lt;/p&gt;

&lt;p&gt;That is the whole recipe: one sitemap for the universe of apps, one regex per detail page for the reachable contact, and a sort by reviews. No keys, no proxy, no browser.&lt;/p&gt;

&lt;p&gt;I packaged it as a keyword search so you can pull, say, every email marketing or upsell app maker with a public support email in one run. It lives here: &lt;a href="https://apify.com/scrapemint/shopify-app-developer-leads" rel="noopener noreferrer"&gt;https://apify.com/scrapemint/shopify-app-developer-leads&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And counting. This is one of a batch of keyless lead sources I have been documenting one at a time.&lt;/p&gt;

</description>
      <category>api</category>
      <category>node</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>"Every Federal Contract Award Is a Free JSON Row (GovCon Tools Charge $500/mo for This)"</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Fri, 10 Jul 2026 14:12:16 +0000</pubDate>
      <link>https://dev.to/scrapemint/every-federal-contract-award-is-a-free-json-row-govcon-tools-charge-500mo-for-this-21kk</link>
      <guid>https://dev.to/scrapemint/every-federal-contract-award-is-a-free-json-row-govcon-tools-charge-500mo-for-this-21kk</guid>
      <description>&lt;p&gt;GovCon market intelligence is one of the priciest alert categories in B2B SaaS: GovWin, HigherGov and friends run from hundreds to thousands per month. The primary source under all of them is USAspending.gov, and its API is public JSON with no key, no registration, and no meaningful rate limits. Here is the part that matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Search is one POST
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST https://api.usaspending.gov/api/v2/search/spending_by_award/
Content-Type: application/json

{
  "filters": {
    "time_period": [{
      "start_date": "2026-07-03",
      "end_date": "2026-07-10",
      "date_type": "date_signed"
    }],
    "award_type_codes": ["A", "B", "C", "D"],
    "keywords": ["software"],
    "award_amounts": [{ "lower_bound": 250000 }]
  },
  "fields": ["Award ID", "Recipient Name", "Award Amount", "Description",
             "Awarding Agency", "NAICS", "PSC", "recipient_id"],
  "limit": 100, "page": 1,
  "sort": "Award Amount", "order": "desc"
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Filters compose: &lt;code&gt;naics_codes&lt;/code&gt; (prefixes work, 54 = all professional services), &lt;code&gt;agencies&lt;/code&gt; by name, &lt;code&gt;recipient_type_names&lt;/code&gt; (small_business, veteran owned...). Two gotchas: the &lt;code&gt;sort&lt;/code&gt; field must appear in &lt;code&gt;fields&lt;/code&gt; or you get a 400, and keyword search can take 30+ seconds cold, so set your timeout accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  date_signed is the whole product
&lt;/h2&gt;

&lt;p&gt;The default date filter, &lt;code&gt;action_date&lt;/code&gt;, matches every modification to every old contract: option years, funding bumps, admin changes. Alert products built on it are noise. &lt;code&gt;date_type: "date_signed"&lt;/code&gt; returns contracts that were actually signed in the window, which is the event people pay to hear about. A company that signed a $5M federal contract this week is hiring against a start date, buying equipment, and looking for subcontractors right now.&lt;/p&gt;

&lt;h2&gt;
  
  
  The recipient profile is the lead
&lt;/h2&gt;

&lt;p&gt;Each result carries a &lt;code&gt;recipient_id&lt;/code&gt;. One more GET turns the award into an addressable company:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET https://api.usaspending.gov/api/v2/recipient/{recipient_id}/
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That returns the registered street address, UEI, business type flags (small business, veteran owned, minority owned, ...) and lifetime prime award totals. The lifetime number is a free qualifier: a first time winner with a big award is setting up everything at once, while a $1B incumbent is a different sales conversation entirely. The endpoint is transiently flaky under concurrency, so retry once before giving up.&lt;/p&gt;

&lt;h2&gt;
  
  
  What registries this beats
&lt;/h2&gt;

&lt;p&gt;SAM.gov has the richer entity data but requires an API key and an account. The FPDS ATOM feed is XML from 2007. USAspending is the only corner of the federal procurement stack that is modern JSON with zero signup, and it updates within days of signing.&lt;/p&gt;

&lt;p&gt;I packaged the whole flow (keyword/NAICS/agency filters, date_signed windows, recipient enrichment, retry logic) into a pay per row actor: &lt;a href="https://apify.com/scrapemint/government-contract-winner-leads" rel="noopener noreferrer"&gt;Government Contract Winner Leads&lt;/a&gt;. It is free to try until July 24. And if you would rather build your own alert, the two requests above are the entire pipeline.&lt;/p&gt;

</description>
      <category>api</category>
      <category>node</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
    <item>
      <title>"Stop Scraping WHOIS. The Registries Serve JSON Now"</title>
      <dc:creator>Ken-Mutisya</dc:creator>
      <pubDate>Fri, 10 Jul 2026 13:46:50 +0000</pubDate>
      <link>https://dev.to/scrapemint/stop-scraping-whois-the-registries-serve-json-now-4e59</link>
      <guid>https://dev.to/scrapemint/stop-scraping-whois-the-registries-serve-json-now-4e59</guid>
      <description>&lt;p&gt;Every few months someone asks how to scrape WHOIS at scale, and the answers are always the same: port 43 sockets, regex soup for 200 registrar formats, and rate limits that ban you by lunchtime. Almost nobody mentions that the registries replaced the whole thing years ago with a JSON protocol called RDAP, and it is open, keyless, and standardized.&lt;/p&gt;

&lt;h2&gt;
  
  
  One GET, structured JSON
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET https://rdap.verisign.com/com/v1/domain/stripe.com
Accept: application/rdap+json
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get events (registration, expiration, last changed), status locks, nameservers, DNSSEC delegation, and the registrar as a structured entity. No text parsing. The dates are ISO 8601. The response for a .com domain comes straight from Verisign, the registry itself, not a reseller or a cached mirror.&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="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"events"&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"eventAction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"registration"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"eventDate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1995-09-12T04:00:00Z"&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;"eventAction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"expiration"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"eventDate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2027-09-11T04:00:00Z"&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;"status"&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="s2"&gt;"client delete prohibited"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"client transfer prohibited"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"nameservers"&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;"ldhName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"NS1.STRIPE.COM"&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;h2&gt;
  
  
  Routing: the IANA bootstrap file
&lt;/h2&gt;

&lt;p&gt;Different TLDs live at different registries, and IANA publishes the routing table as plain JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET https://data.iana.org/rdap/dns.json
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It maps about 1,200 TLDs to their RDAP base URLs. Fetch it once, build a &lt;code&gt;Map&lt;/code&gt; of TLD to endpoint, and query each domain at its own registry. Concurrency 8 with a 15 second timeout checks 2,000 domains in a couple of minutes, and nobody rate walls you, because you are spreading standard queries across the services built to answer them.&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="nx"&gt;boot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://data.iana.org/rdap/dns.json&lt;/span&gt;&lt;span class="dl"&gt;'&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;map&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;tlds&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;boot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;services&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tld&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;tlds&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tld&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;base&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;h2&gt;
  
  
  The 404 is a feature
&lt;/h2&gt;

&lt;p&gt;An RDAP 404 from the authoritative registry means the domain is not registered. That turns a registration data checker into a bulk availability checker for free. But only trust the 404 when it comes from the TLD's own registry. Aggregators like rdap.org return 404 both for "domain not found" and "TLD not supported", which will happily tell you github.io is available.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gaps are ccTLDs
&lt;/h2&gt;

&lt;p&gt;ICANN requires RDAP for every gTLD, so .com, .net, .org and the hundreds of new TLDs have full coverage. Country TLDs are voluntary: .ai, .tv, .cc and .uk are in the bootstrap, while .io and .sh are missing from it but quietly served by the registry operator at &lt;code&gt;rdap.identitydigital.services/rdap/&lt;/code&gt;. Others (.de, .co, .me) still have nothing public. Handle the miss case explicitly instead of guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Parsing the registrar
&lt;/h2&gt;

&lt;p&gt;The registrar hides inside a jCard, which is vCard reimagined as nested JSON arrays. The name is the &lt;code&gt;fn&lt;/code&gt; entry, and the IANA registrar ID is in &lt;code&gt;publicIds&lt;/code&gt;:&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="nx"&gt;reg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entities&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;roles&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;registrar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;reg&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;vcardArray&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="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;i&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fn&lt;/span&gt;&lt;span class="dl"&gt;'&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One postscript on privacy: registrant name and email are redacted nearly everywhere since GDPR, in RDAP and WHOIS alike. What registries still publish for every domain is the part that matters for most workflows anyway: dates, registrar, locks, nameservers. Domain age alone sorts a lead list by business credibility, flags a phishing lookalike registered last Tuesday, and prices an expired domain hunt.&lt;/p&gt;

&lt;p&gt;I packaged this whole flow (bootstrap routing, ccTLD supplements, jCard parsing, availability detection) into a pay per row actor: &lt;a href="https://apify.com/scrapemint/domain-whois-checker" rel="noopener noreferrer"&gt;Domain WHOIS &amp;amp; Age Checker&lt;/a&gt;. Paste domains, get rows. It is free to try until July 24. But if you would rather build it yourself, everything above is the entire recipe.&lt;/p&gt;

</description>
      <category>api</category>
      <category>node</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
