---
title: "Autocomplete"
method: GET
path: "/v3/api/semsim/autocomplete"
tags: ["semsim"]
---

# Autocomplete

`GET /v3/api/semsim/autocomplete`

Autocomplete for semantic similarity lookups, prioritizes entities which have direct phenotype associations.
Note: This API endpoint is experimental and may evolve or disappear over time.

Args:
    q (str): Query string to autocomplete against

Returns:
    SearchResults

## Query parameters

- `q` string

## Response `200`

Successful Response

- SearchResults
  - `limit` integer, required — number of items to return in a response
  - `offset` integer, required — offset into the total number of items
  - `total` integer, required — total number of items matching a query
  - `items` SearchResult[], required — A collection of items, with the type to be overriden by slot_usage
    - `id` string, required
    - `category` string, required
    - `name` string, required
    - `description` string, nullable
    - `xref` string[], nullable
    - `synonym` string[], nullable
    - `exact_synonym` string[], nullable — An exact synonym for the entity
    - `broad_synonym` string[], nullable — A broader synonym for the entity
    - `narrow_synonym` string[], nullable — A narrower synonym for the entity
    - `related_synonym` string[], nullable — A related synonym for the entity
    - `deprecated` boolean, nullable — A boolean flag indicating that an entity is no longer considered current or valid.
    - `in_taxon` string, nullable — The biolink taxon that the entity is in the closure of.
    - `in_taxon_label` string, nullable — The label of the biolink taxon that the entity is in the closure of.
    - `iri` string, nullable
    - `same_as` string[], nullable
    - `subsets` string[], nullable — A list of subsets that the entity belongs to
    - `file_source` string, nullable — Source file stem injected by koza at load time.
    - `provided_by` string, nullable
    - `full_name` string, nullable — The long form name of an entity
    - `symbol` string, nullable
    - `has_gene` string[], nullable
    - `type` string, nullable — The type of the entity (e.g. sequence onotology type for genes etc)
    - `has_attribute` string[], nullable
    - `has_biological_sex` string, nullable — The biological sex of an individual entity.
    - `synonyms` string, nullable
    - `namespace` string, nullable — The namespace/prefix portion of this entity's identifier
    - `has_phenotype` string[], nullable — A list of phenotype identifiers that are known to be associated with this entity
    - `has_phenotype_label` string[], nullable — A list of phenotype labels that are known to be associated with this entity
    - `has_phenotype_count` integer, nullable — A count of the number of phenotypes that are known to be associated with this entity
    - `has_phenotype_closure` string[], nullable — A list of phenotype identifiers that are known to be associated with this entity expanded to include all ancestors
    - `has_phenotype_closure_label` string[], nullable — A list of phenotype labels that are known to be associated with this entity expanded to include all ancestors
    - `has_descendant` string[], nullable — A list of entity identifiers that are known to be descendants of this entity
    - `has_descendant_label` string[], nullable — A list of entity labels that are known to be descendants of this entity
    - `has_descendant_count` integer, nullable — A count of the number of entities that are known to be descendants of this entity
    - `score` number, nullable
  - `facet_fields` FacetField[], nullable — Collection of facet field responses with the field values and counts
    - `label` string, required
    - `facet_values` FacetValue[], nullable — Collection of FacetValue label/value instances belonging to a FacetField
      - `label` string, required
      - `count` integer, nullable — count of documents
  - `facet_queries` FacetValue[], nullable — Collection of facet query responses with the query string values and counts
    - `label` string, required
    - `count` integer, nullable — count of documents

## Other responses

- `404` — Not Found
- `422` — Validation Error

---

[API](https://skmtc.dev/monarchinitiative/apis/fastapi.md) · [All operations](https://skmtc.dev/monarchinitiative/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/monarchinitiative/fastapi/revisions/2ceb106a8c03/schema)
