<?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: Shreyansh Parganiha </title>
    <description>The latest articles on DEV Community by Shreyansh Parganiha  (@sp2502).</description>
    <link>https://dev.to/sp2502</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%2F4254027%2F403f9d0b-2811-4796-92ed-a4f67ae7e63d.png</url>
      <title>DEV Community: Shreyansh Parganiha </title>
      <link>https://dev.to/sp2502</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sp2502"/>
    <language>en</language>
    <item>
      <title>I built a self-hosted Go gateway for weather APIs</title>
      <dc:creator>Shreyansh Parganiha </dc:creator>
      <pubDate>Thu, 19 Nov 2026 14:33:32 +0000</pubDate>
      <link>https://dev.to/sp2502/i-built-a-self-hosted-go-gateway-for-weather-apis-4fil</link>
      <guid>https://dev.to/sp2502/i-built-a-self-hosted-go-gateway-for-weather-apis-4fil</guid>
      <description>&lt;p&gt;Working with several weather providers means handling different response formats, credentials, limits, and coverage rules. I built &lt;strong&gt;Universal Weather API&lt;/strong&gt; to put those decisions behind one self-hosted Go API.&lt;/p&gt;

&lt;p&gt;A local client can request current weather like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -H &lt;span class="s2"&gt;"X-API-Key: $UAP_API_KEY"&lt;/span&gt; \
  &lt;span class="s2"&gt;"http://127.0.0.1:8080/v1/weather?lat=51.5074&amp;amp;lon=-0.1278"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The gateway checks the client’s scope, selects a provider allowed for that location and data type, validates the upstream response, and returns versioned JSON with source information. If an eligible source fails, it can try another within the configured limits.&lt;/p&gt;

&lt;p&gt;The API also has routes for forecasts, daily forecast summaries, location search, astronomy, and combined datasets. Optional experimental adapters cover air quality, history, marine data, and US weather alerts. Supported upstream services include OpenWeather, WeatherAPI, LocationIQ, Geoapify, Open-Meteo, MET Norway, Bright Sky, the US National Weather Service, and Sunrise-Sunset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A few limits matter:&lt;/strong&gt; you bring your own provider credentials where required, review each provider’s terms, and set policies and request budgets. This is a self-hosted project, not a public hosted weather endpoint. Open-Meteo’s hosted free API is for noncommercial use.&lt;/p&gt;

&lt;p&gt;The first public source preview is available now. Local tests and Windows/Linux CI passed, while production deployment checks are still in progress.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/SP2502/Universal-Weather-API" rel="noopener noreferrer"&gt;Source and setup guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/SP2502/Universal-Weather-API/releases/tag/v0.1.0-preview.1" rel="noopener noreferrer"&gt;Preview release&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/SP2502/Universal-Weather-API/blob/main/docs/api-reference.md" rel="noopener noreferrer"&gt;API reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you build weather apps or self-host APIs, I’d appreciate feedback: &lt;strong&gt;what would make the first setup easier for you?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>opensource</category>
      <category>api</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
