---
title: "Query Parameters Reference | DreamFactory Docs"
source: "https://docs.dreamfactory.com/api-reference/query-parameters"
canonical_url: "https://docs.dreamfactory.com/api-reference/query-parameters"
converted_at: "2026-04-22T15:53:43.975Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
Common query parameters for filtering, sorting, and paginating DreamFactory API responses.

---

## filter[​](#filter)

Filter records using SQL-like expressions.

**Syntax:** `filter={field}{operator}{value}`

### Operators[​](#operators)

OperatorDescriptionExample`=`Equal`filter=status='active'``!=`Not equal`filter=status!='deleted'``>`Greater than`filter=age>21``>=`Greater or equal`filter=created_at>='2024-01-01'``<`Less than`filter=price<100``<=`Less or equal`filter=quantity<=10``like`Pattern match`filter=name like 'John%'``in`Value in list`filter=status in ('active','pending')``is null`Null check`filter=deleted_at is null``is not null`Not null check`filter=email is not null`

### Combining Filters[​](#combining-filters)

Use `and` / `or` for compound conditions:

```
filter=(status='active') and (created_at>='2024-01-01')filter=(type='admin') or (type='superuser')filter=((status='active') and (age>=18)) or (verified=true)
```

### Examples[​](#examples)

**Find active users:**

```
curl "https://example.com/api/v2/db/_table/users?filter=status%3D'active'"
```

**Find orders over $100 from 2024:**

```
curl "https://example.com/api/v2/db/_table/orders?filter=(total>100)%20and%20(order_date>%3D'2024-01-01')"
```

**Search by name pattern:**

```
curl "https://example.com/api/v2/db/_table/contacts?filter=name%20like%20'%25smith%25'"
```

**Note:** URL-encode special characters (`=` as `%3D`, space as `%20`, `%` as `%25`).

---

## limit[​](#limit)

Maximum number of records to return.

**Syntax:** `limit={integer}`

**Default:** Configured per-service (typically 1000)

**Examples:**

```
# Get first 10 recordscurl "https://example.com/api/v2/db/_table/products?limit=10"# Get first 50 matching filtercurl "https://example.com/api/v2/db/_table/orders?filter=status='pending'&limit=50"
```

---

## offset[​](#offset)

Number of records to skip before returning results.

**Syntax:** `offset={integer}`

**Default:** 0

**Use with `limit` for pagination:**

```
# Page 1 (records 1-10)curl "https://example.com/api/v2/db/_table/products?limit=10&offset=0"# Page 2 (records 11-20)curl "https://example.com/api/v2/db/_table/products?limit=10&offset=10"# Page 3 (records 21-30)curl "https://example.com/api/v2/db/_table/products?limit=10&offset=20"
```

**Pagination formula:** `offset = (page - 1) * limit`

---

## order[​](#order)

Sort results by one or more fields.

**Syntax:** `order={field} {direction}` or `order={field1} {dir},{field2} {dir}`

**Directions:** `ASC` (ascending), `DESC` (descending)

**Examples:**

```
# Sort by name ascendingcurl "https://example.com/api/v2/db/_table/contacts?order=name%20ASC"# Sort by date descending (newest first)curl "https://example.com/api/v2/db/_table/orders?order=created_at%20DESC"# Multi-column sortcurl "https://example.com/api/v2/db/_table/products?order=category%20ASC,price%20DESC"
```

---

## fields[​](#fields)

Select specific fields to return (reduces payload size).

**Syntax:** `fields={field1},{field2},{field3}`

**Examples:**

```
# Return only id, name, emailcurl "https://example.com/api/v2/db/_table/users?fields=id,name,email"# Combine with filtercurl "https://example.com/api/v2/db/_table/orders?filter=status='pending'&fields=id,total,customer_id"
```

**Default:** All fields returned if not specified.

---

## related[​](#related)

Include related records from foreign key relationships.

**Syntax:** `related={table_name}` or `related={table1},{table2}`

**Examples:**

```
# Get orders with customer datacurl "https://example.com/api/v2/db/_table/orders?related=customers"# Get products with category and suppliercurl "https://example.com/api/v2/db/_table/products?related=categories,suppliers"
```

**Response includes nested related data:**

```
{  "resource": [    {      "id": 1,      "product_name": "Widget",      "category_id": 5,      "categories_by_category_id": {        "id": 5,        "name": "Electronics"      }    }  ]}
```

### Filtering Related Data[​](#filtering-related-data)

Use dot notation to filter on related fields:

```
curl "https://example.com/api/v2/db/_table/orders?related=customers&filter=customers.country='USA'"
```

---

## include_count[​](#include_count)

Include total record count in response (useful for pagination UI).

**Syntax:** `include_count=true`

**Response includes meta field:**

```
{  "resource": [...],  "meta": {    "count": 1523  }}
```

**Example with pagination:**

```
curl "https://example.com/api/v2/db/_table/products?limit=10&offset=0&include_count=true"
```

**Note:** May impact performance on large tables. Use sparingly.

---

## ids[​](#ids)

Filter by primary key values (alternative to filter for simple lookups).

**Syntax:** `ids={id1},{id2},{id3}`

**Examples:**

```
# Get specific records by IDcurl "https://example.com/api/v2/db/_table/users?ids=1,5,10,15"# Delete multiple recordscurl -X DELETE "https://example.com/api/v2/db/_table/temp_data?ids=100,101,102"
```

---

## id_field[​](#id_field)

Specify which field to use as the identifier (when not using default primary key).

**Syntax:** `id_field={field_name}`

**Example:**

```
curl "https://example.com/api/v2/db/_table/products?ids=SKU001,SKU002&id_field=sku"
```

---

## group[​](#group)

Group results by field values (for aggregate queries).

**Syntax:** `group={field}` or `group={field1},{field2}`

**Example:**

```
curl "https://example.com/api/v2/db/_table/orders?group=status&fields=status,count(*)"
```

---

## having[​](#having)

Filter grouped results (use with `group`).

**Syntax:** `having={condition}`

**Example:**

```
curl "https://example.com/api/v2/db/_table/orders?group=customer_id&fields=customer_id,sum(total)&having=sum(total)>1000"
```

---

## count_only[​](#count_only)

Return only the total record count, not the records themselves.

**Syntax:** `count_only=true`

**Example:**

```
curl "https://example.com/api/v2/db/_table/users?filter=status='active'&count_only=true"
```

**Response:**

```
{  "meta": {    "count": 1523  }}
```

---

## Parameter Aliases[​](#parameter-aliases)

Some parameters have alternative names for convenience:

ParameterAliases`fields``select``filter``where``limit``top``offset``skip``order``sort`, `order_by``group``group_by`

---

## Complete Examples[​](#complete-examples)

### Paginated List with Count[​](#paginated-list-with-count)

```
curl "https://example.com/api/v2/db/_table/products\?limit=20\&offset=40\&order=name%20ASC\&include_count=true\&fields=id,name,price,stock"
```

### Filtered Search with Related Data[​](#filtered-search-with-related-data)

```
curl "https://example.com/api/v2/db/_table/orders\?filter=(status='pending')%20and%20(total>100)\&related=customers\&order=created_at%20DESC\&limit=50"
```

### Minimal Payload for Dropdown[​](#minimal-payload-for-dropdown)

```
curl "https://example.com/api/v2/db/_table/categories\?fields=id,name\&order=name%20ASC\&filter=active=true"
```

---

## URL Encoding Reference[​](#url-encoding-reference)

CharacterEncodedSpace`%20` or `+``=``%3D``'``%27``%``%25``&``%26``(``%28``)``%29``,``%2C`

**Tip:** Use your HTTP client's built-in URL encoding rather than manual encoding.

---

## See Also[​](#see-also)

- [API Endpoints](/api-reference/api-endpoints) - Complete endpoint reference

- [Error Codes](/api-reference/error-codes) - HTTP status codes and error handling