> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/011_users_and_search/004__global_search_as_user.md).

# Global Search (User)

GraphQL endpoint: `/user`

Searches across users, companies, and groups in a single mixed list. Matches against display name and, when the query looks like an email or phone number, contact fields. Queries shorter than 3 characters return an empty list.

## Query

```graphql
query ($query: String!, $limit: Int, $showSensitiveData: Boolean) {
  globalSearch(query: $query, limit: $limit, showSensitiveData: $showSensitiveData) {
    id
    type
    label
    username
    image
    relation
    emails {
      id
      email
      visibility
    }
    telephoneNumbers {
      id
      number
      visibility
    }
    addresses {
      id
      street
      city
      state
      country
      zipCode
      visibility
    }
  }
}

```

## Variables

```json
{
  "query": "Acme"
}
```

## Response

```json
{
  "data": {
    "globalSearch": [
      {
        "addresses": [],
        "emails": [],
        "id": "00000000-0000-4000-8000-000000000001",
        "image": "http://localhost:4566/test_profile_image_url?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SOME_RANDOM_ACCESS_KEY%2F20260115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260115T090000Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000",
        "label": "Acmeperson Searchable",
        "relation": [],
        "telephoneNumbers": [],
        "type": "USER",
        "username": "username1"
      },
      {
        "addresses": [],
        "emails": [],
        "id": "00000000-0000-4000-8000-000000000002",
        "image": "http://localhost:4566/logo_url?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SOME_RANDOM_ACCESS_KEY%2F20260115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260115T090000Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000",
        "label": "Acmecorp Industries",
        "relation": [],
        "telephoneNumbers": [],
        "type": "COMPANY",
        "username": ""
      },
      {
        "addresses": [],
        "emails": [],
        "id": "00000000-0000-4000-8000-000000000003",
        "image": "http://localhost:4566/logo_url?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SOME_RANDOM_ACCESS_KEY%2F20260115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260115T090000Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000",
        "label": "Acmegroup Society",
        "relation": null,
        "telephoneNumbers": [],
        "type": "GROUP",
        "username": ""
      }
    ]
  },
  "errors": [
    {
      "locations": [
        {
          "column": 5,
          "line": 8
        }
      ],
      "message": "Cannot return null for non-nullable field",
      "path": [
        "globalSearch",
        2,
        "relation",
        0
      ]
    }
  ]
}
```
