# Search data

> This is a subset of the full specification, limited to the `search_request` schema.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `search_request` schema.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
paths: {}
components:
  schemas:
    multiple_filter_search_request:
      title: Multiple Filter Search Request
      description: Search using Intercoms Search APIs with more than one filter.
      type: object
      properties:
        operator:
          type: string
          enum:
            - AND
            - OR
          description: An operator to allow boolean inspection between multiple fields.
          example: AND
        value:
          oneOf:
            - type: array
              description: Add mutiple filters.
              title: multiple filter search request
              items:
                $ref: '#/components/schemas/multiple_filter_search_request'
            - type: array
              description: Add a single filter field.
              title: single filter search request
              items:
                $ref: '#/components/schemas/single_filter_search_request'
    search_request:
      description: Search using Intercoms Search APIs.
      type: object
      title: Search data
      properties:
        query:
          oneOf:
            - $ref: '#/components/schemas/single_filter_search_request'
              title: Single filter search request
            - $ref: '#/components/schemas/multiple_filter_search_request'
              title: multiple filter search request
        pagination:
          $ref: '#/components/schemas/starting_after_paging'
      required:
        - query
    single_filter_search_request:
      title: Single Filter Search Request
      description: Search using Intercoms Search APIs with a single filter.
      type: object
      properties:
        field:
          type: string
          description: The accepted field that you want to search on.
          example: created_at
        operator:
          type: string
          enum:
            - '='
            - '!='
            - IN
            - NIN
            - <
            - <=
            - '>'
            - '>='
            - '~'
            - '!~'
            - ^
            - $
          description: |-
            The accepted operators you can use to define how you want to search for the value. Operator support depends on the field's data type. The breakdown below is for Contacts search; the other search endpoints that share this schema accept a different set per field:
            - `string` fields: `=`, `!=`, `IN`, `NIN`, `~`, `!~`, `^`, `$`
            - `tag_id`: `=` and `!=` only. Every other operator returns an error.
            - `boolean` fields: `=`, `!=`, `IN`, `NIN`
            - `integer` fields: `=`, `!=`, `IN`, `NIN`, `<`, `>`, `<=`, `>=`
            - `date` fields (all standard timestamp attributes and date custom attributes): `=`, `<`, `>` only. `!=`, `<=`, `>=`, `IN`, and `NIN` are not supported and return an error.
          example: '>'
        value:
          oneOf:
            - type: string
            - type: integer
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: integer
          description: The value that you want to search on.
          example: '73732934'
          nullable: true
    starting_after_paging:
      title: 'Pagination: Starting After'
      type: object
      nullable: true
      properties:
        per_page:
          type: integer
          description: The number of results to fetch per page.
          example: 2
        starting_after:
          type: string
          description: The cursor to use in the next request to get the next page of results.
          nullable: true
          example: your-cursor-from-response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
