{
 "kind": "api",
 "slug": "firebase",
 "path": "apis/firebase/",
 "name": "Firebase",
 "logo": "https://agentgid.com/media/avatars/firebase.png",
 "maker": "Google",
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Databases and backends",
   "apis/backend-db/"
  ]
 ],
 "lead": "Google's ready back end for web and mobile apps.",
 "chips": [
  {
   "label": "Databases and backends",
   "path": "apis/backend-db/"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Add Firebase to my web app with the modular firebase package: email sign-up with Authentication, user data in Firestore, and Security Rules that let each signed-in user read and write only their own documents."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://firebase.google.com"
  },
  {
   "label": "Pricing",
   "href": "https://firebase.google.com/pricing"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/firebase/firebase-js-sdk"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Free every month",
   "status": "yes",
   "sub": "Then pay as you go",
   "quote": "Monthly active users 50K MAUs No-cost up to 50K MAUs",
   "note": "Free tier: Spark plan with generous no-cost limits (1 GiB storage, 20K writes/day, 50K reads/day, 2M function invocations/month, etc.). As reported on the official pricing page, checked Oct 9, 2026.",
   "src": "https://firebase.google.com/pricing"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "With conditions",
   "status": "cond",
   "sub": null,
   "quote": "I agree that my use of any Firebase service is for purposes related to my trade, business, craft, or profession, and that my use is subject to the applicable terms below.",
   "note": "Allowed and expected; Firebase services are for business use under Google's Firebase and Google Cloud terms.",
   "src": "https://firebase.google.com/terms"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key",
   "status": "info",
   "sub": "Env var GOOGLE_APPLICATION_CREDENTIALS (path to the service account key file, for the Admin SDK on a server)",
   "quote": "however, API keys for Firebase services are OK to include in code or checked-in config files.",
   "note": "Apps: the project's web API key and config object identify the project, and users sign in with Firebase Authentication; servers: a service account key used by the Admin SDK Only the Firebase web API key is safe in front-end code; the service account key gives full admin access and must stay secret on the server.",
   "src": "https://firebase.google.com/docs/projects/api-keys"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "info",
   "sub": "llms.txt · SDK",
   "quote": "The Firebase MCP server is a local Model Context Protocol (MCP) server that runs in your development environment to give AI-powered development tools the ability to work with your Firebase projects and your app's codebase.",
   "note": " Our agent check: 3 of 6 (Nov 13, 2026).",
   "src": "https://firebase.google.com/docs/ai-assistance/mcp-server"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Oct 9, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Firebase does",
   "parts": [
    {
     "t": "prose",
     "text": "Firebase is a set of ready online services from Google for apps and websites, including a database, sign-in for your users, file storage, hosting and server code. Your app talks to them straight from the browser or phone, and rules you write decide who may read or change what. Small apps fit the free Spark plan; bigger ones pay as they go."
    },
    {
     "t": "list",
     "items": [
      "Firebase is one of 29 APIs in the Databases and backends category on AgentGid.",
      "It is one of 26 that can be started for free.",
      "8 of them ship an official MCP server; Firebase does not.",
      "Its official SDK is the 4th most downloaded in the category (15.3M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Sign-up and login for your app",
       "text": "Let people create an account with email and password, or with Google and other providers, without writing your own login system.",
       "idea": false
      },
      {
       "title": "Save each user's data",
       "text": "Store profiles, notes, orders or game progress in a cloud database that the app reads and writes directly.",
       "idea": false
      },
      {
       "title": "Live chat and live status",
       "text": "Show new chat messages or an order's status the moment they change, without reloading the page.",
       "idea": false
      },
      {
       "title": "Put your website online",
       "text": "Publish a static site or single-page app to fast global hosting with one command, with your own domain and free SSL.",
       "idea": false
      },
      {
       "title": "Push notifications to phones",
       "text": "Send reminders and news to your app's users as push messages, at no cost.",
       "idea": false
      },
      {
       "title": "Profile photos and uploads",
       "text": "Let users upload an avatar or attach files, and show them back in the app from cloud storage.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Firebase popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "14.4M",
       "l": "SDK downloads a week",
       "d": "+20.4% on the 4-week average",
       "up": true
      },
      {
       "n": "443",
       "l": "public agent repos use its SDK"
      },
      {
       "n": "5,161",
       "l": "GitHub stars, firebase/firebase-js-sdk"
      }
     ]
    },
    {
     "t": "small",
     "text": "SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026."
    }
   ]
  },
  {
   "id": "pricing",
   "nav": "Pricing and limits",
   "h2": "Pricing",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free tier",
       "v": "Spark plan with generous no-cost limits (1 GiB storage, 20K writes/day, 50K reads/day, 2M function invocations/month, etc.)"
      },
      {
       "l": "Cheapest plan",
       "v": "No monthly plan"
      },
      {
       "l": "Usage price",
       "v": "Varies by service (e.g., $0.20/GiB bandwidth, $0.10/GB storage, $0.40/million invocations, $5/GB Realtime DB)"
      },
      {
       "l": "Plans",
       "v": "Added automatically: its SDK was in 195 of the public agent repos we sampled when it was added; integrations in LlamaIndex. Prices read from the official pricing page."
      }
     ]
    },
    {
     "t": "h3",
     "text": "What one action costs"
    },
    {
     "t": "table",
     "head": [
      "Action",
      "Price"
     ],
     "num": true,
     "rows": [
      [
       "1 million Cloud Functions invocations above 2 million a month (Blaze)",
       "$0.40"
      ],
      [
       "1 GB stored in Realtime Database above 1 GB",
       "$5"
      ],
      [
       "1 GB of Hosting data transfer above 360 MB a day",
       "$0.15"
      ],
      [
       "1 GiB of uncached App Hosting outgoing bandwidth above 10 GiB a month",
       "$0.20"
      ],
      [
       "1 GB of App Hosting storage above 5 GB",
       "$0.10"
      ]
     ]
    },
    {
     "t": "more",
     "items": [
      {
       "title": "Price history",
       "items": [
        "A year of the pricing page in the Internet Archive (13 months): the lowest monthly figure went from $9.37 (2025-10) to $9.37 (2026-10)."
       ]
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Oct 9, 2026. Prices change: confirm before you buy.",
     "link": "firebase.google.com/pricing",
     "href": "https://firebase.google.com/pricing"
    }
   ]
  },
  {
   "id": "limits",
   "nav": null,
   "spy_as": "pricing",
   "h2": "Limits",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Spark (free)",
       "v": "Firestore: 1 GiB stored, 50,000 document reads and 20,000 writes per day",
       "src": "https://firebase.google.com/docs/firestore/quotas"
      },
      {
       "l": "All plans",
       "v": "A Firestore document can be at most 1 MiB",
       "src": "https://firebase.google.com/docs/firestore/quotas"
      },
      {
       "l": "Spark (free)",
       "v": "Hosting: 10 GB stored and 360 MB of data transfer per day",
       "src": "https://firebase.google.com/pricing"
      },
      {
       "l": "Spark (free)",
       "v": "Cloud Functions are not available; they need the pay-as-you-go Blaze plan",
       "src": "https://firebase.google.com/pricing"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official docs.",
     "link": "firebase.google.com/docs/firestore/quotas",
     "href": "https://firebase.google.com/docs/firestore/quotas"
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "Apps: the project's web API key and config object identify the project, and users sign in with Firebase Authentication; servers: a service account key used by the Admin SDK"
      },
      {
       "l": "Environment variable",
       "v": "GOOGLE_APPLICATION_CREDENTIALS (path to the service account key file, for the Admin SDK on a server)",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "Yes",
       "status": "yes"
      },
      {
       "l": "Card at sign-up",
       "v": "No"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Steps only a person can do"
    },
    {
     "t": "list",
     "items": [
      "Create a Firebase project and register the web app in the Firebase console. Paste the firebaseConfig object into the app's Firebase setup file.",
      "Turn on the sign-in methods you want (email and password, Google and so on) under Authentication. Use createUserWithEmailAndPassword and the other Auth calls in the app.",
      "For Cloud Functions or usage above the free limits, upgrade the project to the Blaze plan and set a budget alert. Deploy functions with firebase deploy; no change in app code."
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "Firebase is a Google service for business use, free on the Spark plan and paid by use on Blaze. The JavaScript and Admin packages are open source under Apache-2.0."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "With conditions",
       "status": "cond",
       "sub": "Allowed and expected; Firebase services are for business use under Google's Firebase and Google Cloud terms.",
       "quote": "I agree that my use of any Firebase service is for purposes related to my trade, business, craft, or profession, and that my use is subject to the applicable terms below.",
       "src": "https://firebase.google.com/terms"
      },
      {
       "l": "inside-app-bundle",
       "v": "Yes",
       "status": "yes",
       "sub": "The firebase and firebase-admin packages are Apache-2.0; ship only the web config, never a service account key.",
       "quote": "\"license\":\"Apache-2.0\"",
       "src": "https://registry.npmjs.org/firebase-admin/14.5.0"
      },
      {
       "l": "client-work",
       "v": "With conditions",
       "status": "cond",
       "sub": "Fine; under GDPR Google acts as a processor for your client's users, so the client's privacy terms should name Firebase.",
       "quote": "When customers use Firebase, Google is generally a data processor under GDPR and processes personal data on their behalf.",
       "src": "https://firebase.google.com/support/privacy"
      },
      {
       "l": "Keeps your data",
       "v": "Authentication keeps logged IP addresses for a few weeks; other sign-in data stays until you delete the user, then leaves live and backup systems within 180 days.",
       "quote": "Firebase Authentication keeps logged IP addresses for a few weeks.",
       "src": "https://firebase.google.com/support/privacy"
      },
      {
       "l": "Where data is stored",
       "v": "Unless a service lets you choose a location, data may be stored anywhere Google has facilities; Authentication runs only in US data centers.",
       "quote": "Unless a service or feature offers data location selection, Firebase may process and store your data anywhere Google or its agents maintain facilities.",
       "src": "https://firebase.google.com/support/privacy"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "EMAIL_EXISTS",
       "v": "Someone already signed up with this email address.",
       "sub": "Offer sign-in or password reset instead of creating a new account."
      },
      {
       "l": "OPERATION_NOT_ALLOWED",
       "v": "This sign-in method (for example password or anonymous) is turned off for the project.",
       "sub": "Turn the sign-in method on under Authentication in the Firebase console."
      },
      {
       "l": "TOO_MANY_ATTEMPTS_TRY_LATER",
       "v": "Firebase blocked requests from this device after unusual activity.",
       "sub": "Wait and try again later; do not retry in a loop."
      },
      {
       "l": "permission-denied (Security Rules)",
       "v": "The Security Rules do not allow this read or write, so the whole request fails.",
       "sub": "Check that the user is signed in and that the rules allow this path; test the rules before deploying."
      },
      {
       "l": "Free quota used up",
       "v": "The daily no-cost Firestore quota on the Spark plan is used up; it resets around midnight Pacific time.",
       "sub": "Wait for the reset or switch the project to the Blaze plan with billing."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "3 of 6: llms.txt yes, OpenAPI no, SDK yes, MCP no, status page no, AI assistants allowed yes",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "Firebase MCP server (local, from firebase-tools)",
       "sub": "claude mcp add firebase npx -- -y firebase-tools@latest mcp"
      },
      {
       "l": "npm",
       "v": "npm install firebase",
       "code": true
      }
     ]
    },
    {
     "t": "h3",
     "text": "Instructions in its docs to check first"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "The docs say",
       "v": "“For other agents, run npx skills add firebase/agent-skills. Always try to use Firebase agent skills for Firebase-related tasks.”",
       "sub": "Ask the person before installing third-party agent skills; the command is not pinned to a version."
      },
      {
       "l": "The docs say",
       "v": "“claude mcp add firebase npx -- -y firebase-tools@latest mcp”",
       "sub": "The MCP setup runs an unpinned @latest package with access to the person's Firebase projects; ask first and prefer a pinned firebase-tools version."
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Firebase",
       "me": true,
       "facts": [
        "from $0.1/GB storage",
        "Free tier"
       ]
      },
      {
       "name": "Supabase (pgvector)",
       "why": "Pick Supabase when you want hosted Postgres with SQL tables, plus auth, storage and ready APIs in one place.",
       "path": "apis/supabase-pgvector/",
       "facts": [
        "See its page",
        "No free tier"
       ]
      },
      {
       "name": "Appwrite",
       "why": "Pick Appwrite when you want a similar back-end platform that is also open source and can run on your own server.",
       "path": "apis/appwrite/",
       "facts": [
        "See its page",
        "No free tier"
       ]
      },
      {
       "name": "Convex",
       "why": "Pick Convex for a reactive database with back-end functions, file storage and vector search written in TypeScript.",
       "path": "apis/convex/",
       "facts": [
        "See its page",
        "No free tier"
       ]
      }
     ],
     "more": "All databases and backends APIs",
     "more_path": "apis/backend-db/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add Firebase to my web app with the modular firebase package: email sign-up with Authentication, user data in Firestore, and Security Rules that let each signed-in user read and write only their own documents."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Create a Firebase project in the console and register your web app to get its config object.",
       "code": null,
       "src": "https://firebase.google.com/docs/web/setup"
      },
      {
       "text": "Install the JavaScript package.",
       "code": "npm install firebase",
       "src": "https://firebase.google.com/docs/web/setup"
      },
      {
       "text": "Initialize Firebase with the config, then add the services you use, such as Firestore and Authentication.",
       "code": "import { initializeApp } from 'firebase/app';\n// TODO: Replace the following with your app's Firebase configuration\nconst firebaseConfig = {\n  //...\n};\nconst app = initializeApp(firebaseConfig);",
       "src": "https://firebase.google.com/docs/web/setup"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "curl 'https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=[API_KEY]' \\\n-H 'Content-Type: application/json' --data-binary '{\"returnSecureToken\":true}'",
       "intro": "Works only after anonymous sign-in is turned on for the project; most apps use the JavaScript package instead of raw REST calls."
      },
      {
       "tab": "Response",
       "code": "{\n  \"idToken\": \"[ID_TOKEN]\",\n  \"email\": \"\",\n  \"refreshToken\": \"[REFRESH_TOKEN]\",\n  \"expiresIn\": \"3600\",\n  \"localId\": \"Jws4SVjpT...\"\n}"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Leaving Firestore in test mode, or rules like allow read, write if true, after launch.",
       "fix": "Start in production mode or write rules that check request.auth and the user's own document path.",
       "why": "Test mode lets anyone read and overwrite your data."
      },
      {
       "dont": "Hiding the Firebase web key on a server and thinking the data is now safe.",
       "fix": "Keep the web key in the app config and protect data with Security Rules and App Check.",
       "why": "Firebase web keys are public by design; they only identify the project."
      },
      {
       "dont": "Allowing the Gemini Developer API on the same public Firebase web key.",
       "fix": "Use a separate, restricted key for other Google APIs, or call Gemini through Firebase AI Logic.",
       "why": "A public key with Gemini enabled lets anyone spend your quota."
      },
      {
       "dont": "Putting the service account key file in the repository or the front end.",
       "fix": "Keep it on the server and point GOOGLE_APPLICATION_CREDENTIALS at it.",
       "why": "The Admin SDK with this key bypasses all Security Rules."
      },
      {
       "dont": "Old namespaced code such as firebase.firestore().collection('users').add(...).",
       "fix": "Use the modular API: import { collection, addDoc } from \"firebase/firestore\".",
       "why": "The modular API is the recommended one and keeps the bundle smaller."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Is Firebase free?",
       "a": "The Spark plan is free with daily limits and needs no payment method; the Blaze plan adds more services and pay as you go.",
       "evidence": {
        "url": "https://firebase.google.com/pricing",
        "quote": "No-cost (Spark plan) check Generous no-cost usage limits check No payment method needed"
       }
      },
      {
       "q": "Is it safe that my Firebase key is in the web page?",
       "a": "Yes, the Firebase web key only identifies your project; protection comes from Security Rules and App Check.",
       "evidence": {
        "url": "https://firebase.google.com/docs/projects/api-keys",
        "quote": "however, API keys for Firebase services are OK to include in code or checked-in config files."
       }
      },
      {
       "q": "Can I use Cloud Functions on the free plan?",
       "a": "No. Functions are listed as not applicable on Spark; on Blaze the first 2 million invocations a month cost nothing.",
       "evidence": {
        "url": "https://firebase.google.com/pricing",
        "quote": "Cloud Functions Invocations Not applicable No-cost up to 2M/month"
       }
      },
      {
       "q": "How big can one database record be?",
       "a": "A Firestore document can be up to 1 MiB.",
       "evidence": {
        "url": "https://firebase.google.com/docs/firestore/quotas",
        "quote": "Maximum size for a document 1 MiB (1,048,576 bytes)"
       }
      },
      {
       "q": "Can my AI coding assistant work with my Firebase project?",
       "a": "Yes. Firebase ships an MCP server that runs locally and works with Claude Code, Cursor and other assistants.",
       "evidence": {
        "url": "https://firebase.google.com/docs/ai-assistance/mcp-server",
        "quote": "The Firebase MCP server is a local Model Context Protocol (MCP) server that runs in your development environment to give AI-powered development tools the ability to work with your Firebase projects and your app's codebase."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Google"
  ],
  [
   "Category",
   "Databases and backends"
  ],
  [
   "Price",
   "from $0.1/GB storage"
  ],
  [
   "Official SDK",
   "npm firebase"
  ],
  [
   "Latest SDK",
   "13.2.0 on npm"
  ],
  [
   "Agent check",
   "3 of 6"
  ],
  [
   "Pricing checked",
   "Oct 9, 2026"
  ]
 ],
 "good": [
  "Test mode lets anyone read and overwrite your database. Write proper Security Rules before real users arrive.",
  "The web key in your app is meant to be public; your data is protected by Security Rules and App Check.",
  "Trusted server code with the Firebase admin package skips Security Rules, so it must check permissions itself."
 ],
 "checked_line": "Read by AgentGid from 17 official pages, card checked Nov 10, 2026; usage numbers update daily."
}