<?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: Ogn</title>
    <description>The latest articles on DEV Community by Ogn (@ogn).</description>
    <link>https://dev.to/ogn</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%2F4261237%2F1c48d6ed-956c-4ad4-a2cd-b34ce197b8b9.png</url>
      <title>DEV Community: Ogn</title>
      <link>https://dev.to/ogn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ogn"/>
    <language>en</language>
    <item>
      <title>From car CO2 to everything CO2: a free carbon calculator API built on official data</title>
      <dc:creator>Ogn</dc:creator>
      <pubDate>Mon, 23 Nov 2026 19:18:08 +0000</pubDate>
      <link>https://dev.to/ogn/from-car-co2-to-everything-co2-a-free-carbon-calculator-api-built-on-official-data-4h29</link>
      <guid>https://dev.to/ogn/from-car-co2-to-everything-co2-a-free-carbon-calculator-api-built-on-official-data-4h29</guid>
      <description>&lt;p&gt;Last time I wrote about &lt;a href="https://dev.toCAR_POST_URL"&gt;turning 10.7 million EU car registrations into a vehicle CO2 API&lt;/a&gt;. The most common question I got was: &lt;em&gt;"Nice, but what about flights, electricity, fuel and freight?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So I built that too: the &lt;strong&gt;&lt;a href="https://rapidapi.com/regains-regains-default/api/emission-factors-carbon-calculator-api" rel="noopener noreferrer"&gt;Emission Factors &amp;amp; Carbon Calculator API&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Every carbon footprint feature needs emission factors, the numbers that turn "500 km of diesel driving" or "1,000 kWh of electricity" into kilograms of CO2e.&lt;/p&gt;

&lt;p&gt;Governments publish these for free, but in raw form they're spreadsheets with hundreds of rows, mixed units and yearly format changes. Most developers end up hardcoding a few numbers they found online and hoping they're right.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the API does
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Official emission factors, searchable&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UK DESNZ greenhouse gas conversion factors&lt;/li&gt;
&lt;li&gt;US EPA GHG Emission Factors Hub&lt;/li&gt;
&lt;li&gt;Every result includes its source, year and licence, so you have an audit trail&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Ready-made calculators&lt;/strong&gt; that send in an activity and get back the CO2e:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⛽ Fuel: litres or kWh of diesel, petrol, gas and more&lt;/li&gt;
&lt;li&gt;⚡ Electricity: kWh consumed&lt;/li&gt;
&lt;li&gt;✈️ Flights: airport codes in, distance and emissions out&lt;/li&gt;
&lt;li&gt;🚚 Freight: tonne-km by road, rail, sea or air&lt;/li&gt;
&lt;li&gt;🚗 Vehicles: distance driven by car type&lt;/li&gt;
&lt;li&gt;📦 Batch: many calculations in one request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Airport utilities&lt;/strong&gt;: search airports and get the great-circle distance between any two.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you can build
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Carbon footprint features for travel, logistics or expense apps&lt;/li&gt;
&lt;li&gt;Scope 1–3 and ESG reporting tools&lt;/li&gt;
&lt;li&gt;"CO2 per order" or "CO2 per trip" badges for your product&lt;/li&gt;
&lt;li&gt;Internal sustainability dashboards&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why not just ask an AI?
&lt;/h2&gt;

&lt;p&gt;Because reporting needs &lt;strong&gt;traceable numbers&lt;/strong&gt;. A language model can give you a plausible guess. This API gives you the official published factor and tells you exactly where it came from.&lt;/p&gt;

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

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://rapidapi.com/regains-regains-default/api/emission-factors-carbon-calculator-api" rel="noopener noreferrer"&gt;Emission Factors &amp;amp; Carbon Calculator API on RapidAPI&lt;/a&gt;&lt;/strong&gt;: 300 free calls a month.&lt;/p&gt;

&lt;p&gt;And if you work with vehicles, the companion &lt;strong&gt;&lt;a href="https://rapidapi.com/regains-regains-default/api/vehicle-specs-co2-api2" rel="noopener noreferrer"&gt;Vehicle Specs &amp;amp; CO2 API&lt;/a&gt;&lt;/strong&gt; gives you WLTP CO2 for 137,000+ EU car versions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data: UK DESNZ (© Crown copyright, Open Government Licence v3.0), US EPA (public domain) and OurAirports (public domain).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What would you add next: hotels, food, or cloud computing emissions?&lt;/p&gt;

</description>
      <category>api</category>
      <category>sustainability</category>
      <category>opendata</category>
      <category>climate</category>
    </item>
    <item>
      <title>I turned 10.7 million EU car registrations into a free vehicle CO2 API</title>
      <dc:creator>Ogn</dc:creator>
      <pubDate>Mon, 23 Nov 2026 19:16:18 +0000</pubDate>
      <link>https://dev.to/ogn/i-turned-107-million-eu-car-registrations-into-a-free-vehicle-co2-api-o3j</link>
      <guid>https://dev.to/ogn/i-turned-107-million-eu-car-registrations-into-a-free-vehicle-co2-api-o3j</guid>
      <description>&lt;p&gt;Every year the European Environment Agency publishes a remarkable open dataset: &lt;strong&gt;every new car registered in the EU&lt;/strong&gt;, with its make, model, power, weight and official WLTP CO2 figure.&lt;/p&gt;

&lt;p&gt;It's a goldmine for anyone building with car data. In raw form, though, it's 10.7 million rows of inconsistent spellings, duplicates and provisional records. So I cleaned it up and turned it into a simple REST API: &lt;strong&gt;&lt;a href="https://rapidapi.com/regains-regains-default/api/vehicle-specs-co2-api2" rel="noopener noreferrer"&gt;Vehicle Specs &amp;amp; CO2 API&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's inside
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;137,010 unique EU vehicle versions&lt;/strong&gt; across 360 makes and 6,000+ models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;50,000+ US models&lt;/strong&gt; from the EPA's fueleconomy.gov&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Registration counts by country and year&lt;/strong&gt;, so you get market data, not just specs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typo-tolerant search&lt;/strong&gt;: &lt;code&gt;volkswagon&lt;/code&gt; and &lt;code&gt;corola&lt;/code&gt; still find what you meant&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;One request gets you the full spec sheet:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /v1/vehicles?q=golf&amp;amp;limit=1

{
  "make": "Volkswagen",
  "model": "GOLF",
  "fuel_type": "petrol",
  "power_kw": 85,
  "mass_kg": 1304,
  "wltp_co2_g_km": 126,
  "total_registrations": 3710
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can filter by make, model, year, fuel type, power, country or a CO2 range.&lt;/p&gt;

&lt;h2&gt;
  
  
  Market stats, too
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /v1/registrations?country=DE&amp;amp;year=2024
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This returns the most-registered new models in any EU country for that year, with their average CO2. It's handy for dashboards, market research, or just seeing what people actually buy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three data lessons I learned the hard way
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;WLTP and EPA CO2 numbers aren't comparable.&lt;/strong&gt; They come from different test cycles, so US values are returned separately and clearly labelled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One car, many names.&lt;/strong&gt; &lt;code&gt;TOYOTA COROLLA&lt;/code&gt;, &lt;code&gt;COROLLA&lt;/code&gt; and &lt;code&gt;Corolla&lt;/code&gt; are all the same car, so model names had to be normalised.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provisional and final data overlap.&lt;/strong&gt; When both exist for a country and year, the final data wins.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What you can build with it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Auto-filling specs and CO2 on car listings&lt;/li&gt;
&lt;li&gt;Fleet, leasing and company-car emissions calculators&lt;/li&gt;
&lt;li&gt;ESG and carbon reporting tools&lt;/li&gt;
&lt;li&gt;Insurance quote forms and automotive dashboards&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The free plan includes 250 calls a month, no credit card needed:&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://rapidapi.com/regains-regains-default/api/vehicle-specs-co2-api2" rel="noopener noreferrer"&gt;Vehicle Specs &amp;amp; CO2 API on RapidAPI&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data: European Environment Agency (CC BY 4.0) and US EPA fueleconomy.gov (public domain).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I'd love feedback. Which fields or countries would make this more useful for you?&lt;/p&gt;

</description>
      <category>api</category>
      <category>opendata</category>
      <category>javascript</category>
      <category>sustainability</category>
    </item>
  </channel>
</rss>
