> This page is for version 2025-09-18 (default).
> For other versions, use one of these documentation indexes:
> - 2025-09-18 (default): https://apidocs.polytomic.com/2025-09-18/llms.txt
> - 2024-02-08: https://apidocs.polytomic.com/2024-02-08/llms.txt
> - 2023-04-25: https://apidocs.polytomic.com/2023-04-25/llms.txt
> - 2022-12-12: https://apidocs.polytomic.com/2022-12-12/llms.txt
> - 2021-05-23: https://apidocs.polytomic.com/2021-05-23/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Search

GET https://app.polytomic.com/api/entities/search

Searches models, model fields, model syncs, bulk syncs, and connections in the caller's organization.

Supply a nonblank `search` term to search all five result categories. Unlike
[entity lookup](../../../api-reference/entities/get), this endpoint does not search
Organizations, users, executions, Harbors, or Harbor contexts. Model fields are
searchable but have no standalone lookup endpoint.

## Searchable resources

- Models: ID, name, and source Connection type.
- Model fields: ID, technical name, and label.
- Model Syncs: ID, name, source and target Connection types, and saved field and
  identity mappings. Mappings include source field names and labels, target
  field IDs, and available target field names.
- Bulk Syncs: ID, name, source and target Connection names and types, and enabled
  schema IDs, display names, and configured output names. Disabled schemas are
  excluded; enabled schemas remain searchable when the sync is inactive.
- Connections: ID and name.

Search uses cached metadata and does not refresh schemas. Names absent from
that metadata are not searchable. Bulk Sync fields, execution state,
expressions, filters, and constant values are not searched.

## Matching and evidence

Matching is case-insensitive and uses word prefixes, not fuzzy matching. Every
query word must match somewhere within a result. Spaces and punctuation split
words: `other emails` matches `other_emails`, but `mail` does not match `email`.
Some Model Sync source-type matches require a leading `~`.

Each resource appears once. Its `matches` explain which attributes matched and
which query terms contributed. Mapping and schema attributes carry their
respective `mapping` or `schema` context; resource metadata has neither. A name
or Connection type match alone does not establish mapping or schema use.
Results include canonical `links`, not complete configurations or schema lists.

## Limits and completeness

Results are ordered by category, then name or field label, then ID, not by
relevance. `limit` defaults to 50 and accepts 1–100. It limits resource hits,
not match evidence. When `metadata.truncated` is `true`, narrow your search or
increase the limit. There is no cursor pagination.

> ⚠️ Incomplete model-field coverage
>
> Above 40,000 published model fields, `metadata.model_fields_complete` is
> `false`: standalone field results cover a subset, not every published field.
> Model Sync mapping search is unaffected. Incomplete or truncated results
> cannot establish that no other matches exist.

Reference: https://apidocs.polytomic.com/api-reference/entities/search

## Authentication

- `Authorization` header (bearer token, required) — Bearer user API key
- `Authorization` header (basic auth, required) — Basic organization-scoped API key

## Request

### Query parameters

- `search` (string, required) — Search term matched, by word prefix, against models, model fields, model syncs, bulk syncs, and connections in the caller's organization.
- `limit` (integer, optional, default: 50) — Maximum number of results to return across all result types. Defaults to 50 and cannot exceed 100.

## Response

### 200

OK

- `data` (list of SearchResultItem, optional, nullable)
- `metadata` (SearchResultMetadata, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 401 Unauthorized Error

Unauthorized

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 403 Forbidden Error

Forbidden

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 404 Not Found Error

Not Found

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 500 Internal Server Error

Internal Server Error

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

## Types

### SearchResultItem

### SearchResultMetadata

- `model_fields_complete` (boolean, optional) — False when the organization's published model-field count exceeds the hydration threshold (40,000). In that case model_field results cover a used-fields subset (unique fields and sync or relationship references), plus enrichment fields, rather than every published field. This flag does not limit saved Model Sync mapping search.
- `truncated` (boolean, optional) — True when more matches exist than were returned. Narrow the search term or increase limit (up to its maximum) to see more.

### ModelSearchHit

- `links` (SearchResultLinks, required)
- `matches` (list of SearchMatch, required, nullable) — Contributing attributes grouped by saved mapping context, with one group for resource metadata.
- `model_connection_id` (string, required)
- `model_connection_name` (string, required)
- `model_connection_type` (string, required)
- `model_id` (string, required)
- `model_name` (string, required)
- `type` (enum, required)
  - Allowed values: `model`

### ModelFieldSearchHit

- `field_id` (string, required)
- `field_label` (string, required)
- `field_name` (string, required) — Source or technical field name.
- `links` (SearchResultLinks, required)
- `matches` (list of SearchMatch, required, nullable) — Contributing attributes grouped by saved mapping context, with one group for resource metadata.
- `model_connection_id` (string, required)
- `model_connection_name` (string, required)
- `model_connection_type` (string, required)
- `model_id` (string, required)
- `model_name` (string, required)
- `type` (enum, required)
  - Allowed values: `model_field`

### ModelSyncSearchHit

- `links` (SearchResultLinks, required)
- `matches` (list of SearchMatch, required, nullable) — Contributing attributes grouped by saved mapping context, with one group for resource metadata.
- `source_connections` (list of ModelSyncSourceConnection, required)
- `sync_id` (string, required)
- `sync_name` (string, required)
- `target_connection_id` (string, required)
- `target_connection_name` (string, required)
- `target_connection_type` (string, required)
- `type` (enum, required)
  - Allowed values: `model_sync`

### BulkSyncSearchHit

- `bulk_sync_id` (string, required)
- `bulk_sync_name` (string, required)
- `links` (SearchResultLinks, required)
- `matches` (list of SearchMatch, required, nullable) — Contributing attributes grouped by saved mapping or schema context, with one group for resource metadata.
- `source_connection_id` (string, required)
- `source_connection_name` (string, required)
- `source_connection_type` (string, required)
- `target_connection_id` (string, required)
- `target_connection_name` (string, required)
- `target_connection_type` (string, required)
- `type` (enum, required)
  - Allowed values: `bulk_sync`

### ConnectionSearchHit

- `connection_id` (string, required)
- `connection_name` (string, required)
- `connection_type` (string, required)
- `links` (SearchResultLinks, required)
- `matches` (list of SearchMatch, required, nullable) — Contributing attributes grouped by saved mapping context, with one group for resource metadata.
- `type` (enum, required)
  - Allowed values: `connection`

### SearchResultLinks

- `bulk_sync` (string, optional)
- `connection` (string, optional)
- `model` (string, optional)
- `model_sync` (string, optional)
- `source_connection` (string, optional)
- `target_connection` (string, optional)

### SearchMatch

- `attributes` (list of SearchMatchAttribute, required, nullable) — Indexed attributes contributing to this result, with matching query terms.
- `mapping` (SearchMatchMapping, optional)
- `schema` (SearchMatchSchema, optional)

### ModelSyncSourceConnection

- `connection_id` (string, required)
- `connection_name` (string, required)
- `connection_type` (string, required)

### SearchMatchAttribute

- `attribute` (string, required) — Indexed attribute that matched a query term.
- `terms` (list of string, required, nullable) — Unique normalized query terms matching word prefixes in this value.
- `value` (string, required) — Original indexed string, before tokenization and case normalization.

### SearchMatchMapping

- `kind` (enum, required)
  - Allowed values: `field`, `primary_identity`, `secondary_identity`
- `target_field_id` (string, required)
- `source_field_id` (string, optional)
- `source_field_label` (string, optional)
- `source_field_name` (string, optional)
- `source_model_id` (string, optional)
- `source_model_name` (string, optional)
- `target_field_name` (string, optional) — Target field name from stored schema metadata, when available.

### SearchMatchSchema

- `schema_id` (string, required) — Saved source schema ID.
- `output_name` (string, optional) — Configured destination output name, when available.
- `schema_name` (string, optional) — Source schema display name from stored metadata, when available.

## Examples

**Response**

```json
{
  "data": [
    {
      "links": {
        "bulk_sync": "string",
        "connection": "string",
        "model": "string",
        "model_sync": "string",
        "source_connection": "string",
        "target_connection": "string"
      },
      "matches": [
        {
          "attributes": [
            {
              "attribute": "string",
              "terms": [
                "string"
              ],
              "value": "string"
            }
          ],
          "mapping": {
            "kind": "field",
            "source_field_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
            "source_field_label": "string",
            "source_field_name": "string",
            "source_model_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
            "source_model_name": "string",
            "target_field_id": "string",
            "target_field_name": "string"
          },
          "schema": {
            "output_name": "string",
            "schema_id": "string",
            "schema_name": "string"
          }
        }
      ],
      "model_connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "model_connection_name": "string",
      "model_connection_type": "string",
      "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "model_name": "string",
      "type": "model"
    }
  ],
  "metadata": {
    "model_fields_complete": true,
    "truncated": true
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.polytomic.com/api/entities/search"

querystring = {"search":"email"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://app.polytomic.com/api/entities/search?search=email';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.polytomic.com/api/entities/search?search=email"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.polytomic.com/api/entities/search?search=email")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.polytomic.com/api/entities/search?search=email")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.polytomic.com/api/entities/search?search=email', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.polytomic.com/api/entities/search?search=email");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/entities/search?search=email")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```