Skip to main content
POST
/
content
/
v2
/
content-models
/
{modelInternalName}
/
records
/
search
Search Content Model Records with Complex Filters
curl --request POST \
  --url https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-environment-id: <x-environment-id>' \
  --header 'x-tenant-id: <x-tenant-id>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "sort_order": "<string>",
  "sort_by": "<string>",
  "limit": 123,
  "offset": 123,
  "fields": "<string>",
  "parent_filter": [
    {
      "group": {
        "operator": "AND",
        "rules": [
          {
            "action": "equal_to",
            "field_name": "<string>",
            "value": [
              "<string>"
            ]
          }
        ]
      }
    }
  ],
  "child_filter": [
    {
      "group": {
        "operator": "AND",
        "rules": [
          {
            "action": "equal_to",
            "field_name": "<string>",
            "value": [
              "<string>"
            ]
          }
        ]
      },
      "component_name": "<string>"
    }
  ],
  "filter_operator": "AND",
  "field_type": "parent",
  "relation_field": "<string>",
  "relation_field_data_to_query": "<string>",
  "status": "PUBLISHED"
}'
{
  "Status": "success",
  "Data": {
    "records": [
      {
        "id": "<string>",
        "version_no": 123,
        "page_slug": "<string>",
        "page_title": "<string>",
        "version_name": "<string>",
        "seo": [
          {
            "id": "<string>"
          }
        ],
        "thumbnail_image": [
          "<string>"
        ],
        "content_model_name": "<string>",
        "current_version_id": "<string>",
        "title": "<string>",
        "version_id": "<string>",
        "record_data_language": "<string>",
        "categories": [
          "<string>"
        ]
      }
    ],
    "_meta_": {
      "tenant_id": "<string>",
      "workspace_id": "<string>",
      "env_type": "<string>",
      "store_hash": "<string>",
      "content_model_id": "<string>",
      "_fields_": {}
    },
    "total_rows": 123,
    "limit": 123,
    "offset": 123
  }
}
Before calling this endpoint, make sure you’ve generated an API token and picked the correct domain. See Authentication & Base URLs.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-tenant-id
string
required

Identifier for the tenant. Ensures data isolation per tenant.

x-workspace-id
string
required

Workspace identifier within the tenant. Scopes resources to a specific workspace.

x-environment-id
string
required

Unique identifier of the target environment. Used to scope the API call to a specific deployment environment.

Example:

"PRODUCTION-15a0f8c2-a5e8-4e40-ae74-cb1389d22f45-w49jkngj"

Path Parameters

modelInternalName
string
required

Internal identifier of the content model to search (e.g. blogPost).

Query Parameters

locale
string
required

Specifies the language or region for the response data

include_fields_meta
boolean

Flag to include meta details of the specified fields. When true, includes metadata for each returned field.

Body

application/json
sort_order
string

Sort direction for records: asc(ascending) or desc(descending).

sort_by
string

Field name to sort results by (e.g. created_at).

limit
integer

Maximum number of records to return. Default is 20.

offset
integer

Skips the specified number of results from the beginning.

fields
string

Comma-separated list of fields to include (e.g. title,slug). Returns the specified fields in the result.

parent_filter
object[]

Filter applied to child components. Must include component_name to identify the relevant data.

child_filter
object[]

Filter applied to child components. Must include component_name to identify the relevant data.

filter_operator
enum<string>

Defines the logical connection i.e., (AND/OR) between parent and child filters. Defaults to 'AND'.

Available options:
AND,
OR
field_type
enum<string>

Determines which filter group (parent or child) takes priority. Defaults to parent.

Available options:
parent,
child
relation_field
string

Specifies the name of the related field used for joining models.

relation_field_data_to_query
string

Comma-separated fields to include for related models in the result.

status
enum<string>

Lifecycle state ('PUBLISHED'/'DRAFT') of records to retrieve. Defaults to PUBLISHED.

Available options:
PUBLISHED,
DRAFT

Response

Paginated list of records matching the query.

Status
string

Indicates overall request outcome.

Example:

"success"

Data
object