Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
How do you perform a full text search via the Supabase Rest API?

Please can someone help provide the correct syntax for the request when making the full-text search query when making a REST API request?

I've been looking at the Supabase docs, and I'm sure you can perform full-text searches generally: https://supabase.com/docs/guides/database/full-text-search https://supabase.com/docs/reference/javascript/textsearch

However I'd like to perform the search by using the REST API. Here are a few examples of things I've tried so far:

  1. https://apikey.supabase.co/rest/v1/table?field=textSearch.%28"query"%29
  2. https://apikey.supabase.co/rest/v1/table?field=to_tsquery.%28"query"%29
  3. https://apikey.supabase.co/rest/v1/table?select=*&to_tsquery=field.query
  4. https://apikey.supabase.co/rest/v1/table?select=*&to_tsquery=field.query

P.S. I also attempted to use this type of format: https://github.com/supabase/supabase/discussions/1069

Any help would be much appreciated, thanks!

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Supabase uses postgREST for their REST API. You can check the postgREST documentation for this feature.

The fts filter has a number of options to support flexible textual queries, namely the choice of plain vs phrase search and the language used for stemming. Suppose that tsearch is a table with column my_tsv, of type tsvector. The following examples illustrate some possibilities:

GET /tsearch?my_tsv=fts(french).amusant HTTP/1.1

GET /tsearch?my_tsv=plfts.The%20Fat%20Cats HTTP/1.1

GET /tsearch?my_tsv=not.phfts(english).The%20Fat%20Cats HTTP/1.1
Operator Meaning
fts Full-Text Search using to_tsquery
plfts Full-Text Search using plainto_tsquery
phfts Full-Text Search using phraseto_tsquery
wfts Full-Text Search using websearch_to_tsquery
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!