{
 "kind": "api",
 "slug": "supabase-pgvector",
 "path": "apis/supabase-pgvector/",
 "name": "Supabase (pgvector)",
 "logo": "https://agentgid.com/media/avatars/supabase.png",
 "maker": "Supabase",
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Vector databases",
   "apis/vector-db/"
  ]
 ],
 "lead": "One database that also searches by meaning.",
 "chips": [
  {
   "label": "Vector databases",
   "path": "apis/vector-db/"
  },
  {
   "label": "Up · live status",
   "live": true
  },
  {
   "label": "Official MCP server"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Add meaning-based search with Supabase pgvector: a migration that enables the vector extension, adds embedding vector(1536) to documents, an HNSW index and a match_documents SQL function with a category filter; call it with supabase.rpc using the publishable key and Row Level Security on."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://supabase.com"
  },
  {
   "label": "Pricing",
   "href": "https://supabase.com/pricing"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/supabase/supabase"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Open source",
   "status": "yes",
   "sub": "Run it yourself for free",
   "quote": null,
   "note": "Free tier: Free: 500 MB database, shared CPU, 2 active projects (paused after 1 week inactivity). As reported on the official pricing page, checked Nov 1, 2026.",
   "src": "https://supabase.com/pricing"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "With conditions",
   "status": "cond",
   "sub": "Does not train on your data",
   "quote": "Supabase acknowledges that, as between Supabase and Customer, Customer owns all right, title, and interest, including all intellectual property rights, in and to the Customer Data.",
   "note": "Paid apps are fine on any plan; you own your data, and you must follow the terms, which forbid reselling or passing on access to the service itself.",
   "src": "https://supabase.com/terms"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key",
   "status": "info",
   "sub": "Env var NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY (Next.js quickstart); keep the secret key in a server-only variable",
   "quote": "Safe to expose online: web page, mobile or desktop app, GitHub actions, CLIs, source code.",
   "note": "Project URL plus a publishable key (sb_publishable_...) in browser or app code, protected by Row Level Security; a secret key (sb_secret_...) only on servers; SQL clients use the database connection string with its password",
   "src": "https://supabase.com/docs/guides/api/api-keys.md"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Official MCP server",
   "status": "yes",
   "sub": "llms.txt · OpenAPI · SDK",
   "quote": "The hosted Supabase MCP server is available at https://mcp.supabase.com/mcp.",
   "note": " Our agent check: 6 of 6 (Nov 13, 2026).",
   "src": "https://supabase.com/docs/guides/getting-started/mcp.md"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Nov 1, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Supabase (pgvector) does",
   "parts": [
    {
     "t": "prose",
     "text": "Supabase is a hosted Postgres database with sign-in, file storage and a ready web API around it. Its pgvector add-on lets the same database store embeddings, the number lists that capture what a text means, and find the closest ones. Your products, users and search data stay in one place instead of a separate search service. Supabase is open source, so it can also run on your own server."
    },
    {
     "t": "list",
     "items": [
      "Supabase (pgvector) is one of 24 APIs in the Vector databases category on AgentGid.",
      "Its cheapest paid plan ($25 a month) is the 5th cheapest of the 12 here with a monthly plan.",
      "It is one of 19 that can be started for free.",
      "It ships an official MCP server, like 12 others here.",
      "Its official SDK is the 1st most downloaded in the category (75.9M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Help center search by meaning",
       "text": "Visitors type a question in their own words and get the help articles that answer it, even when the wording differs.",
       "idea": false
      },
      {
       "title": "A document chat that respects access",
       "text": "An assistant answers from company files, and each user only gets passages from documents they are allowed to open.",
       "idea": false
      },
      {
       "title": "Similar products in your shop",
       "text": "Show items that are close in meaning to the one on screen, from the same table that holds prices and stock.",
       "idea": false
      },
      {
       "title": "Search inside one category",
       "text": "Look for the closest matches only among blog posts, or only among one customer's records, without losing results.",
       "idea": false
      },
      {
       "title": "Keywords and meaning together",
       "text": "A recipe search finds \"pasta with tomato sauce\" by exact words and also dishes that match the idea, then mixes both lists.",
       "idea": false
      },
      {
       "title": "Catch duplicate listings",
       "text": "When someone posts a new listing or ticket, warn them if a very similar one already exists.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Supabase (pgvector) popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "78.7M",
       "l": "SDK downloads a week",
       "d": "+75.3% on the 4-week average",
       "up": true
      },
      {
       "n": "115K",
       "l": "GitHub stars, supabase/supabase"
      }
     ]
    },
    {
     "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": "Free: 500 MB database, shared CPU, 2 active projects (paused after 1 week inactivity)"
      },
      {
       "l": "Cheapest plan",
       "v": "$25 a month"
      },
      {
       "l": "Usage price",
       "v": "Pro: 8 GB disk per project then $0.125/GB; compute from $10/month (Micro; first instance covered by $10 credits)"
      },
      {
       "l": "Plans",
       "v": "Vector search is plain Postgres + pgvector, so cost is the database/compute plan; no per-vector pricing. Egress 250 GB then $0.09/GB on Pro. Hosted MCP also at https://mcp.supabase.com/mcp."
      }
     ]
    },
    {
     "t": "h3",
     "text": "What one action costs"
    },
    {
     "t": "table",
     "head": [
      "Action",
      "Price"
     ],
     "num": true,
     "rows": [
      [
       "Pro plan per month (includes $10 compute credits, one Micro database)",
       "$25"
      ],
      [
       "Each extra project on Micro compute, per month",
       "$10"
      ],
      [
       "1 GB of database disk above the included 8 GB (Pro)",
       "$0.125"
      ],
      [
       "1 GB of egress above the included 250 GB (Pro)",
       "$0.09"
      ]
     ]
    },
    {
     "t": "more",
     "items": [
      {
       "title": "Price history",
       "items": [
        "A year of the pricing page in the Internet Archive (10 months): the lowest monthly figure went from $10 (2025-10) to $10 (2026-09)."
       ]
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Nov 1, 2026. Prices change: confirm before you buy.",
     "link": "supabase.com/pricing",
     "href": "https://supabase.com/pricing"
    }
   ]
  },
  {
   "id": "limits",
   "nav": null,
   "spy_as": "pricing",
   "h2": "Limits",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free",
       "v": "500 MB database per project, 2 active projects, paused after 1 week of inactivity, 5 GB egress",
       "src": "https://supabase.com/pricing.md"
      },
      {
       "l": "Pro",
       "v": "8 GB disk per project included, then $0.125 per GB; 250 GB egress, then $0.09 per GB",
       "src": "https://supabase.com/pricing.md"
      },
      {
       "l": "Micro compute (included in Pro)",
       "v": "Shared CPU, 1 GB RAM, 60 direct and 200 pooled connections",
       "src": "https://supabase.com/pricing.md"
      },
      {
       "l": "All plans (pgvector 0.7.0+)",
       "v": "HNSW index up to 2,000 dimensions for vector, 4,000 for halfvec",
       "src": "https://supabase.com/docs/guides/ai/vector-indexes/hnsw-indexes.md"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official docs.",
     "link": "supabase.com/pricing.md",
     "href": "https://supabase.com/pricing.md"
    }
   ]
  },
  {
   "id": "status",
   "nav": "Status",
   "h2": "Status and incidents",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Right now",
       "v": "Up",
       "status": "yes",
       "sub": "All Systems Operational"
      },
      {
       "l": "Last 30 days",
       "v": "13 incidents, 0 of them major"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official status page, checked Nov 23, 2026.",
     "link": "status.supabase.com",
     "href": "https://status.supabase.com"
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "Project URL plus a publishable key (sb_publishable_...) in browser or app code, protected by Row Level Security; a secret key (sb_secret_...) only on servers; SQL clients use the database connection string with its password"
      },
      {
       "l": "Environment variable",
       "v": "NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY (Next.js quickstart); keep the secret key in a server-only variable",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "Yes",
       "status": "yes"
      },
      {
       "l": "Card at sign-up",
       "v": "Not stated on the pages we read"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Steps only a person can do"
    },
    {
     "t": "list",
     "items": [
      "Create a Supabase account and a project, choosing its region and a database password. Put the project URL and publishable key in .env.local; keep the secret key and database password in server-only variables.",
      "Upgrade to the Pro plan before launch so the project is never paused, and check the spend cap. No code change.",
      "If you want your AI assistant to manage the project, sign in to the Supabase MCP server through OAuth. Use it with project_ref and read_only=true for checks, and approve each tool call."
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "The hosted service is paid by plan, with a free plan, and you own the data you store. Supabase itself is open source under the Apache 2.0 license, so you may also run it yourself. You may not resell access to the hosted service itself."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "With conditions",
       "status": "cond",
       "sub": "Paid apps are fine on any plan; you own your data, and you must follow the terms, which forbid reselling or passing on access to the service itself.",
       "quote": "Supabase acknowledges that, as between Supabase and Customer, Customer owns all right, title, and interest, including all intellectual property rights, in and to the Customer Data.",
       "src": "https://supabase.com/terms"
      },
      {
       "l": "client-work",
       "v": "With conditions",
       "status": "cond",
       "sub": "Build on a project in your client's own organization or yours; giving clients the MCP server or your developer access is advised against.",
       "quote": "The MCP server operates under the context of your developer permissions, so you should not give it to your customers or end users.",
       "src": "https://supabase.com/docs/guides/getting-started/mcp.md"
      },
      {
       "l": "redistribute-files",
       "v": "Yes",
       "status": "yes",
       "sub": "The Supabase code is Apache 2.0, so you may self-host or ship it with its license notice.",
       "quote": "Apache License Version 2.0, January 2004",
       "src": "https://github.com/supabase/supabase/blob/master/LICENSE"
      },
      {
       "l": "Trains on what you send",
       "v": "“Supabase will not use, nor allow any third-party to use, Customer Data, Customer's AI Input, or any AI Output to train, fine-tune, or otherwise improve any artificial intelligence or machine learning model, without Customer's prior written consent.”",
       "quote": null,
       "src": "https://supabase.com/terms"
      },
      {
       "l": "Keeps your data",
       "v": "Your data stays until you delete it; Pro keeps daily backups for 7 days; API and database logs are kept 1 day on Free and 7 days on Pro.",
       "quote": "Log retention (API & Database) 1 day 7 days 28 days 90 days",
       "src": "https://supabase.com/pricing.md"
      },
      {
       "l": "Where data is stored",
       "v": "One primary AWS region per project; choose a specific region (for example eu-central-1 Frankfurt) for data residency.",
       "quote": "The region you choose also determines where your primary project data is stored.",
       "src": "https://supabase.com/docs/guides/platform/regions.md"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "540 project paused",
       "v": "The Free project was paused for inactivity, on request or for abuse.",
       "sub": "The owner resumes it in the dashboard (possible for up to a year); upgrade to Pro to stop pausing."
      },
      {
       "l": "PGRST202 (404)",
       "v": "The function called with rpc() was not found, or its argument names changed.",
       "sub": "Check the function name and that the rpc() argument names match the SQL parameters exactly."
      },
      {
       "l": "42501 insufficient privileges (401 or 403)",
       "v": "Row Level Security or grants block this user or key.",
       "sub": "Add or fix the RLS policy for the role; never switch to the secret key in browser code to get around it."
      },
      {
       "l": "402 service restriction",
       "v": "The organization went over its quota or has an overdue bill.",
       "sub": "Reduce usage, raise the spend cap or pay the bill in the dashboard; data stays readable there."
      },
      {
       "l": "544 project API gateway timeout",
       "v": "The query ran longer than the time limit, often a vector search without an index.",
       "sub": "Add an HNSW index, lower match_count, or move to a bigger compute size; retry after fixing."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "6 of 6: llms.txt yes, OpenAPI yes, SDK yes, MCP yes, status page yes, AI assistants allowed yes",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "Supabase MCP server (hosted, OAuth sign-in)",
       "sub": "claude mcp add --scope project --transport http supabase \"https://mcp.supabase.com/mcp\""
      },
      {
       "l": "npm",
       "v": "npm install @supabase/supabase-js",
       "code": true
      },
      {
       "l": "PyPI",
       "v": "pip install supabase",
       "code": true
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Supabase (pgvector)",
       "me": true,
       "facts": [
        "Free (open source)",
        "Free tier",
        "Official MCP"
       ]
      },
      {
       "name": "pgvector",
       "why": "Pick plain pgvector when you already run your own Postgres and only need the vector extension, with no hosted platform.",
       "path": "apis/pgvector/",
       "facts": [
        "Free (open source)",
        "No free tier"
       ]
      },
      {
       "name": "Qdrant Cloud",
       "why": "Pick Qdrant Cloud when you want a dedicated vector search engine on managed clusters, separate from your app database.",
       "path": "apis/qdrant-cloud/",
       "facts": [
        "Free (open source)",
        "Free tier",
        "Official MCP"
       ]
      },
      {
       "name": "Elasticsearch (Elastic Cloud)",
       "why": "Pick Elastic Cloud when large full-text search with vector and hybrid ranking over many indexed documents is the main job.",
       "path": "apis/elastic-cloud/",
       "facts": [
        "Free (open source)",
        "No free tier",
        "Official MCP"
       ]
      }
     ],
     "more": "All vector databases APIs",
     "more_path": "apis/vector-db/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add meaning-based search with Supabase pgvector: a migration that enables the vector extension, adds embedding vector(1536) to documents, an HNSW index and a match_documents SQL function with a category filter; call it with supabase.rpc using the publishable key and Row Level Security on."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Create a Supabase project in the dashboard and copy its URL and publishable key into your app's environment.",
       "code": "NEXT_PUBLIC_SUPABASE_URL=<SUBSTITUTE_SUPABASE_URL>\nNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=<SUBSTITUTE_SUPABASE_PUBLISHABLE_KEY>",
       "src": "https://supabase.com/docs/guides/getting-started/quickstarts/nextjs.md"
      },
      {
       "text": "Turn on the vector extension and add a vector column sized to your embedding model (384 here; 1536 for OpenAI text-embedding-3-small).",
       "code": "create extension vector\nwith\n  schema extensions;\n\ncreate table documents (\n  id serial primary key,\n  title text not null,\n  body text not null,\n  embedding extensions.vector(384)\n);\n",
       "src": "https://supabase.com/docs/guides/ai/vector-columns.md"
      },
      {
       "text": "Create the match_documents function from the semantic search guide, add an HNSW index, and call it with rpc() from your app.",
       "code": "create index on documents using hnsw (embedding vector_cosine_ops);",
       "src": "https://supabase.com/docs/guides/ai/semantic-search.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "import vecs\nDB_CONNECTION = \"postgresql://<user>:<password>@<host>:<port>/<db_name>\"\nvx = vecs.create_client(DB_CONNECTION)\ndocs = vx.get_or_create_collection(name=\"docs\", dimension=3)\ndocs.upsert(\n    records=[\n        (\"vec0\", [0.1, 0.2, 0.3], {\"year\": 1973}),\n        (\"vec1\", [0.7, 0.8, 0.9], {\"year\": 2012})\n    ]\n)\ndocs.query(\n    data=[0.4,0.5,0.6],              # required\n    limit=1,                         # number of records to return\n    filters={\"year\": {\"$eq\": 2012}}, # metadata filters\n)\n",
       "intro": null
      },
      {
       "tab": "Response",
       "code": "# Returns: [\"vec1\"]"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "createClient(url, SUPABASE_SECRET_KEY) in browser code so that vector search \"just works\"",
       "fix": "Use the publishable key in the browser and write Row Level Security policies; keep the secret key on the server",
       "why": "The secret key skips every security rule, so anyone who reads the page gets full access."
      },
      {
       "dont": "supabase.rpc('match_documents', {...}).eq('category', 'blog')",
       "fix": "Add a filter_category parameter to the SQL function and pass it inside rpc()",
       "why": "A filter chained after rpc() runs after ranking and the limit, so it can return fewer rows than asked."
      },
      {
       "dont": "embedding vector(3072) from text-embedding-3-large with a plain HNSW index",
       "fix": "Ask the embedding model for 1536 or fewer dimensions, or index (embedding::halfvec(3072)) with halfvec_cosine_ops",
       "why": "Plain vector indexes stop at 2,000 dimensions."
      },
      {
       "dont": "order by similarity desc in the match function",
       "fix": "order by embedding <=> query_embedding asc, so the index is used",
       "why": "Sorting by a computed similarity column can make Postgres skip the index and scan everything."
      },
      {
       "dont": "vecs.get_or_create_collection(...) and docs.upsert(vectors=...), as on the Supabase vecs docs page",
       "fix": "vx = vecs.create_client(DB_CONNECTION); docs = vx.get_or_create_collection(...); docs.upsert(records=[...])",
       "why": "Our check of vecs 0.4.5 found no module-level get_or_create_collection and a TypeError for vectors=; the vecs README uses records."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Is there a free plan?",
       "a": "Yes, $0 a month with a 500 MB database, up to 2 active projects, paused after a week without activity.",
       "evidence": {
        "url": "https://supabase.com/pricing.md",
        "quote": "Free: $0/month, including 500 MB database size."
       }
      },
      {
       "q": "What does a small production setup cost?",
       "a": "The Pro plan is from $25 a month and includes $10 of compute credits, which cover one Micro database; extra disk is $0.125 per GB.",
       "evidence": {
        "url": "https://supabase.com/pricing.md",
        "quote": "Pro: from $25/month, including 8 GB disk size per project and $10/month in compute credits that cover one project on Micro compute."
       }
      },
      {
       "q": "How big can a vector be?",
       "a": "An HNSW index takes vectors up to 2,000 numbers; larger ones, like 3072 from OpenAI's large model, need the halfvec type.",
       "evidence": {
        "url": "https://supabase.com/docs/guides/ai/vector-indexes/hnsw-indexes.md",
        "quote": "For vectors with more than 2,000 dimensions, you can use the halfvec type to create indexes."
       }
      },
      {
       "q": "Does Supabase train AI on my data?",
       "a": "No. The terms say Supabase will not use your data, AI inputs or outputs to train models without written consent.",
       "evidence": {
        "url": "https://supabase.com/terms",
        "quote": "Supabase will not use, nor allow any third-party to use, Customer Data, Customer's AI Input, or any AI Output to train, fine-tune, or otherwise improve any artificial intelligence or machine learning model, without Customer's prior written consent."
       }
      },
      {
       "q": "Can I keep my data in the EU?",
       "a": "Yes. Pick a specific region such as Frankfurt or Paris when creating the project; the region decides where the data is stored.",
       "evidence": {
        "url": "https://supabase.com/docs/guides/platform/regions.md",
        "quote": "The region you choose also determines where your primary project data is stored."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Supabase"
  ],
  [
   "Category",
   "Vector databases"
  ],
  [
   "Status",
   "Up · 13 incidents in 30 days"
  ],
  [
   "Price",
   "Free (open source)"
  ],
  [
   "Plans from",
   "$25/mo"
  ],
  [
   "Official SDK",
   "npm @supabase/supabase-js, PyPI supabase"
  ],
  [
   "Latest SDK",
   "2.119.0 on npm"
  ],
  [
   "Agent check",
   "6 of 6"
  ],
  [
   "Pricing checked",
   "Nov 1, 2026"
  ]
 ],
 "good": [
  "The Free plan gives 500 MB of database per project and 2 active projects, and pauses a project after a week of low activity.",
  "Vector search has no separate price; you pay for the database plan, its computer size and disk, like any other data.",
  "The publishable key may sit in a web page only when Row Level Security rules protect your tables; the secret key stays on servers."
 ],
 "checked_line": "Read by AgentGid from 36 official pages, card checked Nov 10, 2026; usage numbers update daily."
}