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

# Query Records

> Filter and sort the records of an object type on any of its attributes. To fetch what changed since a
date, filter on `updated_at` with `$gte`.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/crm/objects/{type_key}/records/query
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/crm/objects/{type_key}/records/query:
    post:
      tags:
        - CRM objects
      summary: Query Records
      description: >-
        Filter and sort the records of an object type on any of its attributes.
        To fetch what changed since a

        date, filter on `updated_at` with `$gte`.
      operationId: query_crm_records
      parameters:
        - in: path
          name: type_key
          schema:
            title: Type Key
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordQueryIn'
        required: true
      responses:
        '200':
          description: OK
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    RecordQueryIn:
      properties:
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Conditions by attribute key, e.g. {"plan": "pro", "seats": {"$gte":
            10}}. Combine with $and, $or, $not; {"$linked": {"link_type": key,
            "record_id": id}} keeps the records linked to one.
          title: Filter
        sort:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: '[{"attribute": key, "direction": "asc" | "desc"}]'
          title: Sort
        page:
          default: 1
          title: Page
          type: integer
        page_size:
          default: 50
          title: Page Size
          type: integer
      title: RecordQueryIn
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.