---
title: "Compare"
method: GET
path: "/v3/api/semsim/compare/{subjects}/{objects}"
tags: ["semsim"]
---

# Compare

`GET /v3/api/semsim/compare/{subjects}/{objects}`

## Request

- Base URL: `https://monarchinitiative.org` (the document declares no server; this is the origin it was published from)
- URL: `https://monarchinitiative.org/v3/api/semsim/compare/{subjects}/{objects}`
- Auth: none declared

Get pairwise similarity between two sets of terms

<b>Args:</b> <br>
    subjects (str, optional): List of subjects for comparison. Defaults to "". <br>
    objects (str, optional): List of objects for comparison. Defaults to "". <br>
    metric (str, optional): Similarity metric to use. Defaults to "ancestor_information_content".

<b>Returns:</b> <br>
    TermSetPairwiseSimilarity: Pairwise similarity between subjects and objects

## Path parameters

- `subjects` string, required
- `objects` string, required

## Query parameters

- `metric` 'ancestor_information_content' | 'jaccard_similarity' | 'phenodigm_score'

## Response `200`

Successful Response

- unknown

## Other responses

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

---

[API](https://skmtc.dev/monarchinitiative/apis/monarchinitiative-api.md) - [All operations](https://skmtc.dev/monarchinitiative/apis/monarchinitiative-api/llms.txt) - [OpenAPI document](https://skmtc.dev/monarchinitiative/apis/monarchinitiative-api/revisions/00871419e83e?raw)
