Filter Object Data
curl --request POST \
--url https://app.superleap.com/api/v1/org/objects/{object_slug}/filter \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"query": {
"fields": [
"<string>"
],
"filters": {
"and": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [
{}
],
"or": [
{}
]
}
],
"or": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [
{}
],
"or": [
{}
]
}
]
},
"sort": [
{
"field": "<string>",
"direction": "<string>"
}
],
"pagination": {
"page": 123,
"page_size": 123
}
}
}
'import requests
url = "https://app.superleap.com/api/v1/org/objects/{object_slug}/filter"
payload = { "query": {
"fields": ["<string>"],
"filters": {
"and": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [{}],
"or": [{}]
}
],
"or": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [{}],
"or": [{}]
}
]
},
"sort": [
{
"field": "<string>",
"direction": "<string>"
}
],
"pagination": {
"page": 123,
"page_size": 123
}
} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
query: {
fields: ['<string>'],
filters: {
and: [{field: '<string>', operator: '<string>', value: '<any>', and: [{}], or: [{}]}],
or: [{field: '<string>', operator: '<string>', value: '<any>', and: [{}], or: [{}]}]
},
sort: [{field: '<string>', direction: '<string>'}],
pagination: {page: 123, page_size: 123}
}
})
};
fetch('https://app.superleap.com/api/v1/org/objects/{object_slug}/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.superleap.com/api/v1/org/objects/{object_slug}/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => [
'fields' => [
'<string>'
],
'filters' => [
'and' => [
[
'field' => '<string>',
'operator' => '<string>',
'value' => '<any>',
'and' => [
[
]
],
'or' => [
[
]
]
]
],
'or' => [
[
'field' => '<string>',
'operator' => '<string>',
'value' => '<any>',
'and' => [
[
]
],
'or' => [
[
]
]
]
]
],
'sort' => [
[
'field' => '<string>',
'direction' => '<string>'
]
],
'pagination' => [
'page' => 123,
'page_size' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.superleap.com/api/v1/org/objects/{object_slug}/filter"
payload := strings.NewReader("{\n \"query\": {\n \"fields\": [\n \"<string>\"\n ],\n \"filters\": {\n \"and\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ],\n \"or\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ]\n },\n \"sort\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"<string>\"\n }\n ],\n \"pagination\": {\n \"page\": 123,\n \"page_size\": 123\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.superleap.com/api/v1/org/objects/{object_slug}/filter")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"query\": {\n \"fields\": [\n \"<string>\"\n ],\n \"filters\": {\n \"and\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ],\n \"or\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ]\n },\n \"sort\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"<string>\"\n }\n ],\n \"pagination\": {\n \"page\": 123,\n \"page_size\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.superleap.com/api/v1/org/objects/{object_slug}/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"query\": {\n \"fields\": [\n \"<string>\"\n ],\n \"filters\": {\n \"and\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ],\n \"or\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ]\n },\n \"sort\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"<string>\"\n }\n ],\n \"pagination\": {\n \"page\": 123,\n \"page_size\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_bodyFetch Object Data APIs
Filter Object Data
POST
/
api
/
v1
/
org
/
objects
/
{object_slug}
/
filter
Filter Object Data
curl --request POST \
--url https://app.superleap.com/api/v1/org/objects/{object_slug}/filter \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"query": {
"fields": [
"<string>"
],
"filters": {
"and": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [
{}
],
"or": [
{}
]
}
],
"or": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [
{}
],
"or": [
{}
]
}
]
},
"sort": [
{
"field": "<string>",
"direction": "<string>"
}
],
"pagination": {
"page": 123,
"page_size": 123
}
}
}
'import requests
url = "https://app.superleap.com/api/v1/org/objects/{object_slug}/filter"
payload = { "query": {
"fields": ["<string>"],
"filters": {
"and": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [{}],
"or": [{}]
}
],
"or": [
{
"field": "<string>",
"operator": "<string>",
"value": "<any>",
"and": [{}],
"or": [{}]
}
]
},
"sort": [
{
"field": "<string>",
"direction": "<string>"
}
],
"pagination": {
"page": 123,
"page_size": 123
}
} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
query: {
fields: ['<string>'],
filters: {
and: [{field: '<string>', operator: '<string>', value: '<any>', and: [{}], or: [{}]}],
or: [{field: '<string>', operator: '<string>', value: '<any>', and: [{}], or: [{}]}]
},
sort: [{field: '<string>', direction: '<string>'}],
pagination: {page: 123, page_size: 123}
}
})
};
fetch('https://app.superleap.com/api/v1/org/objects/{object_slug}/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.superleap.com/api/v1/org/objects/{object_slug}/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => [
'fields' => [
'<string>'
],
'filters' => [
'and' => [
[
'field' => '<string>',
'operator' => '<string>',
'value' => '<any>',
'and' => [
[
]
],
'or' => [
[
]
]
]
],
'or' => [
[
'field' => '<string>',
'operator' => '<string>',
'value' => '<any>',
'and' => [
[
]
],
'or' => [
[
]
]
]
]
],
'sort' => [
[
'field' => '<string>',
'direction' => '<string>'
]
],
'pagination' => [
'page' => 123,
'page_size' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.superleap.com/api/v1/org/objects/{object_slug}/filter"
payload := strings.NewReader("{\n \"query\": {\n \"fields\": [\n \"<string>\"\n ],\n \"filters\": {\n \"and\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ],\n \"or\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ]\n },\n \"sort\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"<string>\"\n }\n ],\n \"pagination\": {\n \"page\": 123,\n \"page_size\": 123\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.superleap.com/api/v1/org/objects/{object_slug}/filter")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"query\": {\n \"fields\": [\n \"<string>\"\n ],\n \"filters\": {\n \"and\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ],\n \"or\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ]\n },\n \"sort\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"<string>\"\n }\n ],\n \"pagination\": {\n \"page\": 123,\n \"page_size\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.superleap.com/api/v1/org/objects/{object_slug}/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"query\": {\n \"fields\": [\n \"<string>\"\n ],\n \"filters\": {\n \"and\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ],\n \"or\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<any>\",\n \"and\": [\n {}\n ],\n \"or\": [\n {}\n ]\n }\n ]\n },\n \"sort\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"<string>\"\n }\n ],\n \"pagination\": {\n \"page\": 123,\n \"page_size\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_bodyGet filtered list of records for a requested object. This API is useful when you want to fetch a subset of records based on certain criteria.
Headers
string
required
Bearer token for authentication, click here to generate one
string
default:"application/json"
required
application/json
Path Parameters
string
required
The slug identifier for the object type you want to filter (e.g., “lead”, “user”, “opportunity”)
Body
object
required
Query object containing filter parameters
Show Properties
Show Properties
string[]
Specific fields to return in the response.
Show Example
Show Example
["name", "email", "phone", "created_at"]
object
Filter conditions to apply to the query
Show Properties
Show Properties
object[]
Array of conditions that must all be satisfied (AND logic)
Show Filter Condition
Show Filter Condition
object[]
Array of conditions where at least one must be satisfied (OR logic)
Show Filter Condition
Show Filter Condition
object[]
Example Request
curl --location 'https://app.superleap.com/api/v1/org/objects/lead/filter' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SUPERSECRETREDACTEDKEY' \
--data-raw '{
"query": {
"fields": ["created_at", "email", "external_id", "id", "name", "phone"],
"filters": {
"or": [
{
"and": [
{
"field": "email",
"operator": "contains",
"value": "ad"
}
]
},
{
"or": [
{
"field": "name",
"operator": "contains",
"value": "P"
},
{
"field": "name",
"operator": "starts_with",
"value": "C"
}
]
}
]
},
"sort": [
{
"field": "name",
"direction": "desc"
}
],
"pagination": {
"page": 1,
"page_size": 150
}
}
}'
Example Response
{
"success": true,
"data": {
"records": [
{
"created_at": 1741267307472,
"email": "cariappa2@gmail.com",
"external_id": "I am external",
"id": "cK2p5W_pL8b6BEh",
"name": "Cariappa 2",
"phone": "+91-9999999999"
},
{
"created_at": 1741614402286,
"email": null,
"external_id": null,
"id": "cK2p5W_mWCp7EHz",
"name": "Cariappa",
"phone": null
},
{
"created_at": 1741348841428,
"email": "asd2sadf@s.com",
"external_id": "we",
"id": "cK2p5W_rcZAmD55",
"name": "Cariappa",
"phone": null
},
{
"created_at": 1741266340544,
"email": "cariappa@gmail.com",
"external_id": "asdf",
"id": "cK2p5W_zz3t4dBH",
"name": "Cariappa",
"phone": "+91-9999999999"
},
{
"created_at": 1741616420041,
"email": null,
"external_id": "Sdfasdf",
"id": "cK2p5W_UssVtMdf",
"name": "Car",
"phone": null
}
]
}
}
Filter Operators
| Operator | Description | Example |
|---|---|---|
eq | Equal to | {"field": "status", "operator": "eq", "value": "active"} |
neq | Not equal to | {"field": "status", "operator": "neq", "value": "deleted"} |
gt | Greater than | {"field": "amount", "operator": "gt", "value": 1000} |
lt | Less than | {"field": "amount", "operator": "lt", "value": 5000} |
gte | Greater than or equal to | {"field": "amount", "operator": "gte", "value": 1000} |
lte | Less than or equal to | {"field": "amount", "operator": "lte", "value": 5000} |
in | Value is in array | {"field": "status", "operator": "in", "value": ["active", "pending"]} |
nin | Value is not in array | {"field": "status", "operator": "nin", "value": ["deleted", "archived"]} |
like | Pattern matching (case sensitive) | {"field": "name", "operator": "like", "value": "%Smith%"} |
ilike | Pattern matching (case insensitive) | {"field": "name", "operator": "ilike", "value": "%smith%"} |
starts_with | String starts with | {"field": "name", "operator": "starts_with", "value": "Car"} |
ends_with | String ends with | {"field": "email", "operator": "ends_with", "value": "@gmail.com"} |
contains | String contains | {"field": "name", "operator": "contains", "value": "John"} |
not_contains | String does not contain | {"field": "name", "operator": "not_contains", "value": "Deleted"} |
between | Value is between (inclusive) | {"field": "amount", "operator": "between", "value": [1000, 5000]} |
is_empty | Field is null or empty | {"field": "notes", "operator": "is_empty"} |
not_empty | Field is not null and not empty | {"field": "email", "operator": "not_empty"} |
exists | Field exists | {"field": "custom_field", "operator": "exists"} |
not_exists | Field does not exist | {"field": "custom_field", "operator": "not_exists"} |
global_search | Search across multiple fields | {"field": "", "operator": "global_search", "value": "search term"} |
leq | Lower or equal (legacy) | {"field": "priority", "operator": "leq", "value": 3} |
nleq | Not lower or equal (legacy) | {"field": "priority", "operator": "nleq", "value": 3} |
⌘I