KasarKasar Docs
API Reference

Search

Global full-text search across all CRM objects with optional filtering.

The Search endpoint performs a cross-object text search across your CRM data. It searches TEXT, EMAIL, URL, PHONE, and TEXTAREA fields on every object the authenticated user has access to.

GET /api/v1/search

Query parameters

ParameterTypeDefaultDescription
querystring--Required. The search term. Minimum 1 character.
limitnumber5Maximum results per object. Range: 1--50.
offsetnumber0Number of results to skip per object (for pagination).
objectstring--Restrict search to a single object (e.g., contacts).

Behavior

  • The search is case-insensitive and uses ILIKE matching.
  • Only fields marked as isSearchable in the schema are included. By default, this covers TEXT, EMAIL, URL, PHONE, and TEXTAREA fields.
  • RBAC rules are applied: the user only sees results from objects they have permission to read.
  • Results are grouped by object. Each group contains up to limit matching records.
  • When object is specified, only that object is searched. Otherwise, all accessible objects are searched in parallel.

Response

{
  "query": "alice",
  "results": [
    {
      "objectName": "contacts",
      "objectLabel": "Contacts",
      "records": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "first_name": "Alice",
          "last_name": "Martin",
          "email": "alice@example.com"
        },
        {
          "id": "660f9511-f3ac-52e5-b827-557766551111",
          "first_name": "Alice",
          "last_name": "Dupont",
          "email": "alice.dupont@company.com"
        }
      ]
    },
    {
      "objectName": "companies",
      "objectLabel": "Companies",
      "records": [
        {
          "id": "770a0622-a4bd-63f6-c938-668877662222",
          "name": "Alice Technologies"
        }
      ]
    }
  ],
  "total": 3
}

Response fields

FieldTypeDescription
querystringThe search term that was used
resultsarrayArray of result groups, one per matching object
results[].objectNamestringInternal object name
results[].objectLabelstringDisplay label for the object
results[].recordsarrayMatching records with their searchable fields
totalnumberTotal number of matching records across all objects

Errors

StatusCodeDescription
400VALIDATION_ERRORMissing or empty query parameter
400INVALID_OBJECTThe object filter references a non-existent object

Examples

Search across all objects:

curl -X GET "https://kasar.app/api/v1/search?query=alice" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Search within a specific object with pagination:

curl -X GET "https://kasar.app/api/v1/search?query=martin&object=contacts&limit=10&offset=0" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Search with a higher result limit:

curl -X GET "https://kasar.app/api/v1/search?query=tech&limit=20" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

On this page