REST API
For clients that don't support MCP (ChatGPT, custom apps, scripts), use the Supabase REST API directly.
Base URL & Authentication
Base URL: https://nlnbbquyqrbkgaitbbgk.supabase.coInclude these headers with every request:
http
apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M
Authorization: Bearer <same key as apikey>
Content-Type: application/jsonINFO
This is the public read-only anon key. It only grants SELECT access to the ab_tests table.
Endpoints
Keyword Search
http
POST /rest/v1/rpc/search_testsjson
{
"query_text": "social proof pricing",
"max_results": 15,
"section_filter": "hero", // optional
"result_filter": "winner", // optional
"principle_filter": "social_proof" // optional
}AI Semantic Search
http
POST /functions/v1/semantic-searchjson
{
"query": "how to build trust on a SaaS pricing page",
"max_results": 10,
"threshold": 0.35
}Browse & Filter Tests
http
GET /rest/v1/ab_tests?select=title,result,uplift_percent,key_insight,actionable_rule,element_tested,psychological_principle&website_section=eq.hero&result=eq.winner&limit=20Common filters (append as query params):
website_section=eq.heroresult=eq.winnerpage_type=eq.Landing Pageorder=uplift_percent.desc.nullslast
Get a Specific Test
http
GET /rest/v1/ab_tests?id=eq.{uuid}&select=*Get Patterns
http
POST /rest/v1/rpc/get_patternsjson
{
"section_name": "hero", // optional
"min_tests": 3 // optional
}Response Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Unique test identifier |
title | string | Test name |
result | string | winner, loser, or inconclusive |
uplift_percent | number | Conversion uplift (27 = +27%) |
website_section | string | Page section |
element_tested | string | What was changed |
key_insight | string | What we learned |
actionable_rule | string | What to do based on this |
psychological_principle | string | Why it works |
control_description | string | Version A details |
variation_description | string | Version B details |
brand | string | Company/brand tested |
industry | string | Industry vertical |
page_type | string | Type of page |
source_name | string | Data source |
source_url | string | Link to original test |
quality_grade | string | A, B, or C |
device | string | Device type tested |
sample_size | number | Test sample size |
curl Examples
Search for tests
bash
curl -X POST 'https://nlnbbquyqrbkgaitbbgk.supabase.co/rest/v1/rpc/search_tests' \
-H 'apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M' \
-H 'Content-Type: application/json' \
-d '{"query_text": "hero headline", "max_results": 5}'Browse winners in a section
bash
curl 'https://nlnbbquyqrbkgaitbbgk.supabase.co/rest/v1/ab_tests?select=title,result,uplift_percent,key_insight&website_section=eq.trust&result=eq.winner&limit=10' \
-H 'apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M'