<?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>Forem: Siya @ Business</title>
    <description>The latest articles on Forem by Siya @ Business (@siyabuilt).</description>
    <link>https://forem.com/siyabuilt</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1792983%2Fcb127595-1029-45c2-9e9b-a509bd4d1ccb.png</url>
      <title>Forem: Siya @ Business</title>
      <link>https://forem.com/siyabuilt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/siyabuilt"/>
    <language>en</language>
    <item>
      <title>YouTube's API Quota Is 10,000 Units/Day. Here's How I Track 100K Videos Without Hitting It.</title>
      <dc:creator>Siya @ Business</dc:creator>
      <pubDate>Fri, 20 Feb 2026 11:23:50 +0000</pubDate>
      <link>https://forem.com/siyabuilt/youtubes-api-quota-is-10000-unitsday-heres-how-i-track-100k-videos-without-hitting-it-5d8h</link>
      <guid>https://forem.com/siyabuilt/youtubes-api-quota-is-10000-unitsday-heres-how-i-track-100k-videos-without-hitting-it-5d8h</guid>
      <description>&lt;p&gt;If you've ever built anything with the YouTube Data API v3, you've hit the wall.&lt;/p&gt;

&lt;p&gt;Google gives you &lt;strong&gt;10,000 quota units per day&lt;/strong&gt;. Sounds generous until you realize a single &lt;code&gt;search.list&lt;/code&gt; call costs &lt;strong&gt;100 units&lt;/strong&gt;. That's 100 searches per day. For a hobby project, maybe fine. For a production app tracking thousands of videos? Dead on arrival.&lt;/p&gt;

&lt;p&gt;I ran into this exact problem building &lt;a href="https://www.contentstats.io" rel="noopener noreferrer"&gt;ContentStats&lt;/a&gt; — a video analytics API that tracks views, likes, comments, and shares across YouTube, TikTok, and Instagram. I needed to fetch stats for tens of thousands of videos, multiple times per day.&lt;/p&gt;

&lt;p&gt;Here's how every endpoint actually costs you, and what I did to solve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Cost of Every YouTube API Call
&lt;/h2&gt;

&lt;p&gt;Most developers don't realize how wildly different the quota costs are across endpoints:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;th&gt;Cost per Call&lt;/th&gt;
&lt;th&gt;Calls per Day (10K quota)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;search.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100 units&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;videos.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 unit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;channels.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 unit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;commentThreads.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 unit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;playlists.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 unit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;playlistItems.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 unit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;videos.insert&lt;/code&gt; (upload)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1,600 units&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thumbnails.set&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;50 units&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The problem is obvious: &lt;code&gt;search.list&lt;/code&gt; is 100x more expensive than &lt;code&gt;videos.list&lt;/code&gt;. If you're using &lt;code&gt;search.list&lt;/code&gt; to find videos and then &lt;code&gt;videos.list&lt;/code&gt; to get their stats, you're burning 101 units per video. With 10,000 units/day, that's &lt;strong&gt;99 videos maximum&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Optimization That Saved My Quota
&lt;/h2&gt;

&lt;p&gt;The first thing I learned: &lt;strong&gt;never use &lt;code&gt;search.list&lt;/code&gt; if you already have video IDs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;videos.list&lt;/code&gt; accepts up to &lt;strong&gt;50 video IDs per request&lt;/strong&gt; and only costs 1 unit. That means you can fetch stats for &lt;strong&gt;500,000 videos per day&lt;/strong&gt; if you batch them correctly:&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;// Bad: 1 video = 1 unit&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&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;youtube&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;videos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;part&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;statistics,snippet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dQw4w9WgXcQ&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Good: 50 videos = 1 unit&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&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;youtube&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;videos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;part&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;statistics,snippet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;videoIds&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;50&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;,&lt;/span&gt;&lt;span class="dl"&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;With batching, 10,000 units gets you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;10,000 calls × 50 videos per call = 500,000 video stat lookups per day&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's a massive difference from the 99 videos you'd get using &lt;code&gt;search.list&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  But There's a Bigger Problem
&lt;/h2&gt;

&lt;p&gt;Even with optimizations, the YouTube API has fundamental limitations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The quota resets at midnight Pacific Time&lt;/strong&gt; — not midnight in your timezone. If your users are in Europe or Asia, you'll burn through quota during their peak hours and have nothing left.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;There's no webhook or streaming API.&lt;/strong&gt; You have to poll. If you want hourly updates, you're making 24 API calls per video per day. For 1,000 videos, that's 480 batched requests — 480 units just for one metric.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Requesting a quota increase requires a compliance audit.&lt;/strong&gt; Google's &lt;a href="https://support.google.com/youtube/contact/yt_api_form" rel="noopener noreferrer"&gt;quota extension form&lt;/a&gt; asks for a detailed review of your app, including privacy policy, terms of service, and a video walkthrough. Approval can take weeks to months, and many requests are denied.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rate limits exist on top of quota limits.&lt;/strong&gt; Even if you had unlimited quota, you'd still hit per-second rate limits that slow down bulk operations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Ended Up Building
&lt;/h2&gt;

&lt;p&gt;After months of fighting with quota limits, I built &lt;a href="https://www.contentstats.io" rel="noopener noreferrer"&gt;ContentStats&lt;/a&gt; as a dedicated video analytics layer that handles all of this complexity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No quota limits&lt;/strong&gt; — track as many videos as you need&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hourly snapshots&lt;/strong&gt; — automatic polling so you don't have to manage cron jobs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-platform&lt;/strong&gt; — same API for YouTube, TikTok, Instagram, and X&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple REST API&lt;/strong&gt; — one endpoint, one API key, no OAuth flows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's what fetching video stats looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://api.contentstats.io/v1/videos/dQw4w9WgXcQ &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer YOUR_API_KEY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"video_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dQw4w9WgXcQ"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"platform"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"youtube"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"current_stats"&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;"views"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1500000000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"likes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;22000000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"comments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3200000&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;"tracked_since"&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-01-15T00:00:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"snapshots_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;720&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;No quota to manage. No OAuth token refreshing. No batching logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Tips If You Stick With YouTube's API
&lt;/h2&gt;

&lt;p&gt;If you need to use the official API directly, here are the optimizations that matter most:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Cache aggressively
&lt;/h3&gt;

&lt;p&gt;YouTube stats don't change every second. Cache responses for at least 5-15 minutes. Use Redis or even in-memory caching:&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;CACHE_TTL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 15 minutes&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getVideoStats&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;videoId&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;cached&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;redis&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="s2"&gt;`yt:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;videoId&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cached&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;response&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;youtube&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;videos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;part&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;statistics&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;videoId&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;stats&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&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;items&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="nx"&gt;statistics&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`yt:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;videoId&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="nx"&gt;CACHE_TTL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stats&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;stats&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;h3&gt;
  
  
  2. Only request the &lt;code&gt;part&lt;/code&gt; you need
&lt;/h3&gt;

&lt;p&gt;Each &lt;code&gt;part&lt;/code&gt; parameter doesn't cost extra quota, but it does increase response size and latency. Only request &lt;code&gt;statistics&lt;/code&gt; if that's all you need — don't include &lt;code&gt;snippet&lt;/code&gt;, &lt;code&gt;contentDetails&lt;/code&gt;, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Use &lt;code&gt;fields&lt;/code&gt; parameter to reduce payload
&lt;/h3&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;response&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;youtube&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;videos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;part&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;statistics&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;videoIds&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;items(id,statistics(viewCount,likeCount))&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Monitor your quota usage
&lt;/h3&gt;

&lt;p&gt;Go to the &lt;a href="https://console.cloud.google.com/apis/api/youtube.googleapis.com/quotas" rel="noopener noreferrer"&gt;Google Cloud Console&lt;/a&gt; to see real-time quota consumption. Set up alerts at 80% usage so you don't get surprised by a &lt;code&gt;quotaExceeded&lt;/code&gt; error at 2 AM.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Use multiple API keys (carefully)
&lt;/h3&gt;

&lt;p&gt;Each Google Cloud project gets its own 10,000 unit quota. You can create multiple projects and rotate keys. Google doesn't explicitly prohibit this, but it's a gray area — don't abuse it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Quota Costs Cheat Sheet
&lt;/h2&gt;

&lt;p&gt;Here's the full reference I wish I had when I started. Bookmark this — you'll need it.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Quota Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Search videos&lt;/td&gt;
&lt;td&gt;&lt;code&gt;search.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get video details&lt;/td&gt;
&lt;td&gt;&lt;code&gt;videos.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get channel info&lt;/td&gt;
&lt;td&gt;&lt;code&gt;channels.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List comments&lt;/td&gt;
&lt;td&gt;&lt;code&gt;commentThreads.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List playlist items&lt;/td&gt;
&lt;td&gt;&lt;code&gt;playlistItems.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Post a comment&lt;/td&gt;
&lt;td&gt;&lt;code&gt;commentThreads.insert&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Upload a video&lt;/td&gt;
&lt;td&gt;&lt;code&gt;videos.insert&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1,600&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Update video metadata&lt;/td&gt;
&lt;td&gt;&lt;code&gt;videos.update&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Set thumbnail&lt;/td&gt;
&lt;td&gt;&lt;code&gt;thumbnails.set&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Create playlist&lt;/td&gt;
&lt;td&gt;&lt;code&gt;playlists.insert&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate a video&lt;/td&gt;
&lt;td&gt;&lt;code&gt;videos.rate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Live chat messages&lt;/td&gt;
&lt;td&gt;&lt;code&gt;liveChatMessages.list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The quota resets daily at &lt;strong&gt;midnight Pacific Time (PT)&lt;/strong&gt;. You can check your current usage in the &lt;a href="https://console.cloud.google.com/apis/api/youtube.googleapis.com/quotas" rel="noopener noreferrer"&gt;Google Cloud Console&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the full breakdown with more optimization strategies, I wrote a detailed guide on the &lt;a href="https://www.contentstats.io/blog/youtube-api-quota-tracking" rel="noopener noreferrer"&gt;ContentStats blog&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;YouTube API gives you 10,000 units/day&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;search.list&lt;/code&gt; costs 100 units (the trap most developers fall into)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;videos.list&lt;/code&gt; costs 1 unit and accepts 50 IDs per call — use this&lt;/li&gt;
&lt;li&gt;Batch requests, cache responses, only request fields you need&lt;/li&gt;
&lt;li&gt;If you need to track thousands of videos without quota headaches, check out &lt;a href="https://www.contentstats.io" rel="noopener noreferrer"&gt;ContentStats&lt;/a&gt; — it handles all the polling, batching, and multi-platform complexity for you&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;I'm building ContentStats — a video analytics API for developers who need to track video performance across YouTube, TikTok, Instagram, and X. &lt;a href="https://www.contentstats.io" rel="noopener noreferrer"&gt;Try it free&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>youtube</category>
      <category>api</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>EnvLock: The Ultimate Env Manager</title>
      <dc:creator>Siya @ Business</dc:creator>
      <pubDate>Tue, 16 Jul 2024 22:39:36 +0000</pubDate>
      <link>https://forem.com/siyabuilt/envlock-the-ultimate-env-manager-11ha</link>
      <guid>https://forem.com/siyabuilt/envlock-the-ultimate-env-manager-11ha</guid>
      <description>&lt;p&gt;As developers, we often juggle multiple projects with different environment configurations. Whether you're working with Python, Node.js, or Ruby, managing environment variables can be a hassle. Enter &lt;a href="https://envlock.com" rel="noopener noreferrer"&gt;EnvLock&lt;/a&gt;, a powerful and user-friendly SaaS solution that streamlines your environment variable management across various programming languages and projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why You Need an Env Manager
&lt;/h3&gt;

&lt;p&gt;Environment variables are crucial for keeping sensitive information secure and configuring your applications. However, managing these variables across different projects and team members can be challenging. An effective env manager solves these problems by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centralizing environment variable storage&lt;/li&gt;
&lt;li&gt;Ensuring consistency across development environments&lt;/li&gt;
&lt;li&gt;Enhancing security by separating sensitive data from code&lt;/li&gt;
&lt;li&gt;Simplifying the onboarding process for new team members&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Introducing EnvLock: Your All-in-One Env Manager Solution
&lt;/h3&gt;

&lt;p&gt;EnvLock is a web-based SaaS platform designed to simplify environment variable management for developers and teams. With its intuitive dashboard, EnvLock offers a centralized location to create, manage, and share environment configurations across various projects and programming languages.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features of EnvLock
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User-Friendly Dashboard&lt;/strong&gt;: EnvLock provides an easy-to-use web interface where you can manage all your environment variables in one place.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project-Based Organization&lt;/strong&gt;: Create and organize multiple projects within EnvLock, each with its own set of environment files and variables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexible Environment Files&lt;/strong&gt;: Within each project, you can create multiple env files to suit different environments (e.g., development, staging, production).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy Variable Management&lt;/strong&gt;: Add, edit, and delete variables with just a few clicks. EnvLock makes it simple to keep your configurations up-to-date.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sharing Capabilities&lt;/strong&gt;: Collaborate with team members by sharing projects or specific env files, ensuring everyone has access to the latest configurations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Export Functionality&lt;/strong&gt;: Easily export your environment variables in various formats compatible with different programming languages and frameworks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secure Storage&lt;/strong&gt;: EnvLock uses encryption to store your sensitive data, ensuring that your environment variables remain protected.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Getting Started with EnvLock
&lt;/h3&gt;

&lt;p&gt;To begin using EnvLock as your env manager, follow these simple steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sign Up&lt;/strong&gt;: Visit &lt;a href="https://envlock.com" rel="noopener noreferrer"&gt;https://envlock.com&lt;/a&gt; and create an account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a Project&lt;/strong&gt;: Once logged in, create a new project for your application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add Env Files&lt;/strong&gt;: Within your project, create one or more env files to organize your variables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add Variables&lt;/strong&gt;: Start adding your environment variables to the appropriate env files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Share and Collaborate&lt;/strong&gt;: Invite team members to collaborate on your projects or share specific env files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Export and Use&lt;/strong&gt;: Export your environment variables in the format that suits your development environment and integrate them into your projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  EnvLock for Different Programming Languages
&lt;/h3&gt;

&lt;p&gt;EnvLock is designed to be language-agnostic, making it an ideal choice for developers working with various programming languages. Here's how EnvLock can benefit developers using different languages:&lt;/p&gt;

&lt;h4&gt;
  
  
  Python Env Manager
&lt;/h4&gt;

&lt;p&gt;As a Python developer, you can use EnvLock to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store and manage environment variables for your Django, Flask, or any other Python projects.&lt;/li&gt;
&lt;li&gt;Export variables in a format compatible with Python's &lt;code&gt;os.environ&lt;/code&gt; or popular libraries like python-dotenv.&lt;/li&gt;
&lt;li&gt;Easily switch between different configurations for development, testing, and production environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Node Env Manager
&lt;/h4&gt;

&lt;p&gt;Node.js developers can leverage EnvLock to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centralize environment variable management for Express.js, Next.js, or any Node.js application.&lt;/li&gt;
&lt;li&gt;Export variables in a format that works seamlessly with &lt;code&gt;process.env&lt;/code&gt; or dotenv.&lt;/li&gt;
&lt;li&gt;Maintain separate configurations for different deployment environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Ruby Env Manager
&lt;/h4&gt;

&lt;p&gt;Ruby developers will find EnvLock useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Managing environment variables for Rails applications or other Ruby projects.&lt;/li&gt;
&lt;li&gt;Exporting variables in a format compatible with Ruby's &lt;code&gt;ENV&lt;/code&gt; or gems like dotenv.&lt;/li&gt;
&lt;li&gt;Organizing different sets of variables for various environments and deployment scenarios.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Best Practices for Using EnvLock
&lt;/h3&gt;

&lt;p&gt;To get the most out of EnvLock, consider the following best practices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Organize Projects Clearly&lt;/strong&gt;: Create separate projects for different applications or services to keep your variables organized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Descriptive Names&lt;/strong&gt;: Choose clear and descriptive names for your env files and variables to make them easily understandable by all team members.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Leverage Multiple Env Files&lt;/strong&gt;: Create separate env files for different environments (e.g., development, staging, production) within each project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Regular Reviews&lt;/strong&gt;: Periodically review your environment variables to ensure they are up-to-date and remove any that are no longer needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Utilize Sharing Features&lt;/strong&gt;: Take advantage of EnvLock's sharing capabilities to ensure all team members have access to the latest configurations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Maintain Security&lt;/strong&gt;: Use EnvLock's secure storage, but also be cautious about who you share your env files with.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Version Control Integration&lt;/strong&gt;: While EnvLock stores your variables securely, you can use its export feature to include non-sensitive configuration files in your version control system.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In today's complex development landscape, an efficient env manager is no longer a luxury—it's a necessity. EnvLock offers a robust, secure, and user-friendly solution for managing environment variables across various projects and programming languages. By centralizing your env management with EnvLock, you'll boost productivity, enhance security, and simplify collaboration within your development team.&lt;/p&gt;

&lt;p&gt;Don't let environment variable management slow you down. Try EnvLock today and experience the difference a well-designed, web-based env manager can make in your development workflow!&lt;/p&gt;

&lt;p&gt;Visit &lt;a href="https://envlock.com" rel="noopener noreferrer"&gt;https://envlock.com&lt;/a&gt; to get started and take control of your environment variables with ease. Simplify your development process, enhance team collaboration, and keep your sensitive data secure with EnvLock – your ultimate environment variable management solution.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
      <category>security</category>
    </item>
  </channel>
</rss>
