Skip to main content
Version: Latest

Overview

Once you've created the schemas, you can manipulate the data or invoke actions using the REST APIs. We provide several types of APIs for different usages. Refer to the following links for more details:

You will need an API key and endpoint to use the API. The endpoint URL for hosted instances of NocoDB is in the format https://app.nocodb.com/api/v2/tables/TABLEID/records and https://app.nocodb.com/api/v2/meta/bases/BASEID/info.

  • You can find a TABLEID by going to any table in NocoDB > Details > API Snippets.
  • You can find your BASEID by clicking the menu icon next to any database, rest APIs > and seeing the BASEID in the url.

Additional information on the REST APIs is provided below.

Query params

NameAliasUse caseDefault valueExample value
wherewComplicated where conditions(colName,eq,colValue)~or(colName2,gt,colValue2)
Usage: Comparison operators
Usage: Logical operators
limitlNumber of rows to get (SQL limit value)1020
offsetoOffset for pagination (SQL offset value)020
sortsSort by column name, Use - as a prefix for descending sortcolumn_name
fieldsfRequired column names in result*column_name1,column_name2
shufflerShuffle the result for pagination01 (Only allow 0 or 1. Other values would see it as 0)

Comparison Operators

OperationMeaningExample
eqequal(colName,eq,colValue)
neqnot equal(colName,neq,colValue)
notnot equal (alias of neq)(colName,not,colValue)
gtgreater than(colName,gt,colValue)
gegreater or equal(colName,ge,colValue)
ltless than(colName,lt,colValue)
leless or equal(colName,le,colValue)
isis(colName,is,true/false/null)
isnotis not(colName,isnot,true/false/null)
inin(colName,in,val1,val2,val3,val4)
btwbetween(colName,btw,val1,val2)
nbtwnot between(colName,nbtw,val1,val2)
likelike(colName,like,%name)
nlikenot like(colName,nlike,%name)
isWithinis Within (Available in Date and DateTime only)(colName,isWithin,sub_op)
allofincludes all of(colName,allof,val1,val2,...)
anyofincludes any of(colName,anyof,val1,val2,...)
nallofdoes not include all of (includes none or some, but not all of)(colName,nallof,val1,val2,...)
nanyofdoes not include any of (includes none of)(colName,nanyof,val1,val2,...)

Comparison Sub-Operators

The following sub-operators are available in the Date and DateTime columns.

OperationMeaningExample
todaytoday(colName,eq,today)
tomorrowtomorrow(colName,eq,tomorrow)
yesterdayyesterday(colName,eq,yesterday)
oneWeekAgoone week ago(colName,eq,oneWeekAgo)
oneWeekFromNowone week from now(colName,eq,oneWeekFromNow)
oneMonthAgoone month ago(colName,eq,oneMonthAgo)
oneMonthFromNowone month from now(colName,eq,oneMonthFromNow)
daysAgonumber of days ago(colName,eq,daysAgo,10)
daysFromNownumber of days from now(colName,eq,daysFromNow,10)
exactDateexact date(colName,eq,exactDate,2022-02-02)

For isWithin in Date and DateTime columns, the different set of sub-operators are used.

OperationMeaningExample
pastWeekthe past week(colName,isWithin,pastWeek)
pastMonththe past month(colName,isWithin,pastMonth)
pastYearthe past year(colName,isWithin,pastYear)
nextWeekthe next week(colName,isWithin,nextWeek)
nextMonththe next month(colName,isWithin,nextMonth)
nextYearthe next year(colName,isWithin,nextYear)
nextNumberOfDaysthe next number of days(colName,isWithin,nextNumberOfDays,10)
pastNumberOfDaysthe past number of days(colName,isWithin,pastNumberOfDays,10)

Logical Operators

OperationExample
~or(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,2000))
~and(checkNumber,eq,JM555205)~and((amount,gt,200)~and(amount,lt,2000))
~not~not(checkNumber,eq,JM555205)