> For the complete documentation index, see [llms.txt](https://docs.b2ihealthcare.com/snow-owl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2ihealthcare.com/snow-owl/9.x/quick-start/find-concepts-by-id-or-term.md).

# Find concepts by ID or term

## Search by identifier

Now that SNOMED CT content is present in the code system (identified by the unique id `SNOMEDCT`) it is time to take a deeper dive. A frequent interaction is to retrieve properties of a concept identified by its [SNOMED CT Identifier](https://confluence.ihtsdotools.org/display/DOCGLOSS/SNOMED+CT+identifier). To do so, execute the following command:

{% code fullWidth="false" %}

```bash
curl -u "test:test" 'http://localhost:8080/snowowl/snomedct/SNOMEDCT/concepts/138875005?expand=pt()&pretty'
```

{% endcode %}

The response should look something like this:

```json
{
  "id": "138875005",
  "released": true,
  "active": true,
  "effectiveTime": "20020131",
  "moduleId": "900000000000207008",
  "iconId": "snomed_rt_ctv3",
  "score": 0.0,
  "memberOf": [ "900000000000497000" ],
  "activeMemberOf": [ "900000000000497000" ],
  "definitionStatus": {
    "id": "900000000000074008"
  },
  "subclassDefinitionStatus": "NON_DISJOINT_SUBCLASSES",
  "pt": {
    "id": "220309016",
    "term": "SNOMED CT Concept",
    "concept": {
      "id": "138875005"
    },
    "type": {
      "id": "900000000000013009"
    },
    "typeId": "900000000000013009",
    "conceptId": "138875005",
    "acceptability": {
      "900000000000509007": "PREFERRED",
      "900000000000508004": "PREFERRED"
    }
  },
  "ancestorIds": [ ],
  "parentIds": [ "-1" ],
  "statedAncestorIds": [ ],
  "statedParentIds": [ "-1" ],
  "definitionStatusId": "900000000000074008"
}
```

We used the `expand` query parameter to include the concept's Preferred Term (PT) in the response. The concept in question is the root concept of the SNOMED CT hierarchy.

## Search by term

Snow Owl also allows users to retrieve concepts matching a specific search term or phrase. See what happens if we try to find the concepts associated with the condition "Méniere's disease":

```bash
curl -u "test:test" 'http://localhost:8080/snowowl/snomedct/SNOMEDCT/concepts?term=M%C3%A9niere%27s%20disease&expand=pt()&pretty'
```

This time more than one concept can be present in the response, so we receive a collection of items. Results are sorted by relevance, indicated by the field `score`:

```json5
{
  "items": [ {
    "id": "13445001",
    "released": true,
    "active": true,
    "effectiveTime": "20020131",
    "moduleId": "900000000000207008",
    "iconId": "disorder",
    "score": 3.9305625,
    "memberOf": [ "447562003", "733073007", "900000000000497000" ],
    "activeMemberOf": [ "447562003", "733073007", "900000000000497000" ],
    "definitionStatus": {
      "id": "900000000000074008"
    },
    "subclassDefinitionStatus": "NON_DISJOINT_SUBCLASSES",
    "pt": {
      "id": "178783019",
      "term" : "Ménière's disease",
      "concept": {
        "id": "13445001"
      },
      "type": {
        "id": "900000000000013009"
      },
      "typeId": "900000000000013009",
      "conceptId": "13445001",
      "acceptability": {
        "900000000000509007": "PREFERRED",
        "900000000000508004": "PREFERRED"
      }
    },
    "ancestorIds": [ "-1", "20425006", ..., "1279550006" ],
    "parentIds": [ "50438001" ],
    "statedAncestorIds": [ "-1", "64572001", "138875005", "404684003" ],
    "statedParentIds": [ "50438001" ],
    "definitionStatusId": "900000000000074008"
  }, {
    ...
  } ],
  "searchAfter": "AoIFQAd5LmITGo8wMTA4OTA5MTAwMDExOTEwNQ==",
  "limit": 50,
  "total": 27
}
```

The total number of matching concepts is shown in the property named `total`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.b2ihealthcare.com/snow-owl/9.x/quick-start/find-concepts-by-id-or-term.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
