> ## Documentation Index
> Fetch the complete documentation index at: https://help.experro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Records

> Perform an advanced search on a content model’s records using structured filter groups, sorting, pagination, and localization. Ideal for UIs that need dynamic, multi-criteria record retrieval.

Before calling this endpoint, make sure you’ve generated an API token and picked the correct domain. See [Authentication & Base URLs](/api-reference/authbaseurl).


## OpenAPI

````yaml POST /content/v2/content-models/{modelInternalName}/records/search
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://apis.experro.app
    description: Admin Server
  - url: https://{base-address}
    description: Custom Server
    variables:
      base-address:
        default: ''
        description: Enter your custom domain or server address.
security:
  - bearerAuth: []
paths:
  /content/v2/content-models/{modelInternalName}/records/search:
    post:
      summary: Search Content Model Records with Complex Filters
      description: >-
        Perform an advanced search on a content model’s records using structured
        filter groups, sorting, pagination, and localization. Ideal for UIs that
        need dynamic, multi-criteria record retrieval.
      parameters:
        - $ref: '#/components/parameters/TenantIdHeader'
        - $ref: '#/components/parameters/WorkspaceIdHeader'
        - $ref: '#/components/parameters/EnvironmentIdHeader'
        - name: modelInternalName
          in: path
          required: true
          schema:
            type: string
          description: >-
            Internal identifier of the content model to search (e.g.
            `blogPost`).
          example: blogPost
        - $ref: '#/components/parameters/LocaleQryPrm'
        - name: include_fields_meta
          in: query
          schema:
            type: boolean
          description: >-
            Flag to include meta details of the specified fields. When `true`,
            includes metadata for each returned field.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sort_order:
                  type: string
                  description: >-
                    Sort direction for records: `asc`(ascending) or
                    `desc`(descending).
                sort_by:
                  type: string
                  description: Field name to sort results by (e.g. `created_at`).
                limit:
                  type: integer
                  description: Maximum number of records to return. Default is 20.
                offset:
                  type: integer
                  description: Skips the specified number of results from the beginning.
                fields:
                  type: string
                  description: >-
                    Comma-separated list of fields to include (e.g.
                    `title,slug`). Returns the specified fields in the result.
                parent_filter:
                  type: array
                  description: >-
                    Filter applied to child components. Must include
                    `component_name` to identify the relevant data.
                  items:
                    type: object
                    properties:
                      group:
                        type: object
                        properties:
                          operator:
                            type: string
                            enum:
                              - AND
                              - OR
                            description: Logical operator for combining rules
                          rules:
                            type: array
                            items:
                              type: object
                              properties:
                                action:
                                  type: string
                                  enum:
                                    - equal_to
                                    - 'not_equal_to '
                                    - contains
                                    - 'does_not_contains '
                                    - 'greater_than '
                                    - 'less_than '
                                    - 'greater_than_or_equal_to '
                                    - less_than_or_equal_to
                                  description: Comparison operation
                                field_name:
                                  type: string
                                  description: Name of the field to filter.
                                value:
                                  type: array
                                  items:
                                    type: string
                                  description: Values to compare against.
                              required:
                                - action
                                - field_name
                                - value
                        required:
                          - operator
                          - rules
                    required:
                      - group
                      - component_name
                child_filter:
                  type: array
                  description: >-
                    Filter applied to child components. Must include
                    `component_name` to identify the relevant data.
                  items:
                    type: object
                    properties:
                      group:
                        type: object
                        properties:
                          operator:
                            type: string
                            enum:
                              - AND
                              - OR
                            description: Logical operator for combining rules
                          rules:
                            type: array
                            items:
                              type: object
                              properties:
                                action:
                                  type: string
                                  enum:
                                    - equal_to
                                    - 'not_equal_to '
                                    - contains
                                    - 'does_not_contains '
                                    - 'greater_than '
                                    - 'less_than '
                                    - 'greater_than_or_equal_to '
                                    - less_than_or_equal_to
                                  description: Comparison operation
                                field_name:
                                  type: string
                                  description: Child component field to filter.
                                value:
                                  type: array
                                  items:
                                    type: string
                                  description: Values used in the comparison
                              required:
                                - action
                                - field_name
                                - value
                        required:
                          - operator
                          - rules
                      component_name:
                        type: string
                        description: Identifies the relevant child component
                    required:
                      - group
                      - component_name
                filter_operator:
                  type: string
                  enum:
                    - AND
                    - OR
                  description: >-
                    Defines the logical connection i.e., (AND/OR) between parent
                    and child filters. Defaults to 'AND'.
                field_type:
                  type: string
                  enum:
                    - parent
                    - child
                  description: >-
                    Determines which filter group (`parent` or `child`) takes
                    priority. Defaults to parent.
                relation_field:
                  type: string
                  description: >-
                    Specifies the name of the related field used for joining
                    models.
                relation_field_data_to_query:
                  type: string
                  description: >-
                    Comma-separated fields to include for related models in the
                    result.
                status:
                  type: string
                  enum:
                    - PUBLISHED
                    - DRAFT
                  description: >-
                    Lifecycle state ('PUBLISHED'/'DRAFT') of records to
                    retrieve. Defaults to `PUBLISHED`.
      responses:
        '200':
          description: Paginated list of records matching the query.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    example: success
                    description: Indicates overall request outcome.
                  Data:
                    type: object
                    properties:
                      records:
                        type: array
                        items:
                          $ref: '#/components/schemas/Record'
                        description: Matching record objects.
                      _meta_:
                        $ref: '#/components/schemas/MetaResponse'
                        description: Pagination and execution details.
                      total_rows:
                        type: integer
                        description: Total matches across all pages.
                      limit:
                        type: integer
                        description: Page size returned.
                      offset:
                        type: integer
                        description: Offset used for this page.
        '400':
          description: Bad Request — invalid filter syntax or missing required fields.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    example: failure
                  Data:
                    $ref: '#/components/schemas/Error404'
        '401':
          description: Unauthorized – Missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    example: failure
                  Data:
                    $ref: '#/components/schemas/Error401'
        '500':
          description: Internal Server Error – an unexpected error on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    example: failure
                  Data:
                    $ref: '#/components/schemas/Error500'
      servers:
        - url: https://apis.experro.app
          description: Admin Server
components:
  parameters:
    TenantIdHeader:
      name: x-tenant-id
      in: header
      required: true
      schema:
        type: string
      description: Identifier for the tenant. Ensures data isolation per tenant.
    WorkspaceIdHeader:
      name: x-workspace-id
      in: header
      required: true
      schema:
        type: string
      description: >-
        Workspace identifier within the tenant. Scopes resources to a specific
        workspace.
    EnvironmentIdHeader:
      name: x-environment-id
      in: header
      required: true
      schema:
        type: string
        example: PRODUCTION-15a0f8c2-a5e8-4e40-ae74-cb1389d22f45-w49jkngj
      description: >-
        Unique identifier of the target environment. Used to scope the API call
        to a specific deployment environment.
    LocaleQryPrm:
      name: locale
      in: query
      description: Specifies the language or region for the response data
      required: true
      schema:
        type: string
  schemas:
    Record:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of this record.
        version_no:
          type: integer
          description: Sequential version number of the record.
        page_slug:
          type: string
          description: URL-friendly slug for this record (if it’s rendered as a page).
        page_title:
          type: string
          description: Human-readable title used when rendering as a web page.
        version_name:
          type: string
          description: Internal name or label for this version.
        seo:
          type: array
          description: SEO metadata entries (e.g. meta tags).
          items:
            type: object
            properties:
              id:
                type: string
                description: Identifier for an SEO metadata entry.
        thumbnail_image:
          type: array
          items:
            type: string
            description: Serialized image JSON object
        content_model_name:
          type: string
          description: Internal name of the content model this record belongs to.
        current_version_id:
          type: string
          description: UUID of the currently published version.
        title:
          type: string
          description: Primary title field of the record.
        version_id:
          type: string
          description: UUID representing this specific version.
        record_data_language:
          type: string
          description: Locale code for this record’s data.
        categories:
          type: array
          description: List of category internal names or IDs associated with this record.
          items:
            type: string
      required:
        - id
        - version_no
        - page_slug
        - page_title
    MetaResponse:
      type: object
      properties:
        tenant_id:
          type: string
        workspace_id:
          type: string
        env_type:
          type: string
        store_hash:
          type: string
        content_model_id:
          type: string
        _fields_:
          type: object
          additionalProperties:
            type: object
            properties:
              type:
                type: string
              sub_type:
                type: string
              is_array:
                type: boolean
              is_searchable:
                type: boolean
            required:
              - type
              - sub_type
              - is_array
              - is_searchable
    Error404:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
    Error401:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
    Error500:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````