API version: 0.3.0

---

# Find tagged elements

This example finds all `Plant` nodes tagged `blue`, by matching the path `(:Plant)-[:HAS_TAG]->(:Tag {name: "blue"})`
against the graph in Neo4j.\
Results are then [hydrated](/reference/search/element-hydration.md), i.e. transformed into a collection response - since a
`Cypher Path` step returns full paths, the tag node itself is part of the result too, not just the tagged plants.

```bash
curl -X POST \
  -H 'Authorization: Bearer secret-token:PIPeJGUt7c00ENn8a5uDlc' \
  -H 'Content-Type: application/json' \
  -d '{
        "debug": true,
        "steps": [
          {
            "type": "cypher-path-subset",
            "query": "MATCH path=((:Plant)-[:HAS_TAG]->(:Tag {name: \"blue\"})) RETURN path"
          },
          {
            "type": "element-hydration"
          }
        ]
      }' \
  https://api.example.com/search
```

##### Response Body

```json
{
  "type": "_SearchResultResponse",
  "results": [
    {
      "type": "Plant",
      "id": "02IiNr0GOoKiPMM3n6dNmfvWddQqpN1iow5gs",
      "data": {
        "images": [
          {
            "description": "Strelitzia reginae or Bird of Paradise",
            "imageLinkFull": "https://upload.wikimedia.org/wikipedia/commons/5/55/Bird_of_Paradise_flower.JPG",
            "imageLinkThumbnail": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Bird_of_Paradise_flower.JPG/960px-Bird_of_...",
            "link": "https://en.wikipedia.org/wiki/File:Bird_of_Paradise_flower.JPG"
          },
          {
            "description": "Portugal, Madeira, Botanical garden in Funchal",
            "imageLinkFull": "https://upload.wikimedia.org/wikipedia/commons/6/68/2010-03-05_13_16_21_Portugal-Jardim_Bot%C3%A2nic...",
            "imageLinkThumbnail": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/68/2010-03-05_13_16_21_Portugal-Jardim_Bot%C3...",
            "link": "https://en.wikipedia.org/wiki/File:2010-03-05_13_16_21_Portugal-Jardim_Bot%C3%A2nico_da_Madeira.jpg"
          }
        ],
        "hasFile": true,
        "name": "Bird of Paradise",
        "scientificName": "S. reginae",
        "scenario": "general.botanicExample",
        "link": "https://en.wikipedia.org/wiki/Strelitzia_reginae",
        "description": "Strelitzia reginae, commonly known as the crane flower, bird of paradise, or isigude in Nguni, is a ...",
        "createdAt": "2026-12-03T12:05:26+00:00",
        "updatedAt": "2026-12-03T12:05:26+00:00"
      },
      "file": {
        "contentLength": 63663,
        "extension": "jpg",
        "mimeType": "image/jpeg",
        "hash": {
          "sha256": "b2a4e02335603478ee1c5e9d551708e3d2f41cfc1e27059bf891409ca4e771df"
        }
      }
    },
    {
      "type": "Tag",
      "id": "02IiNr0GOoKiPMM4FOCWJ7N93GB5Ih1r74WAy",
      "data": {
        "description": "Blue is one of the three primary colours in the RGB (additive) colour model, as well as in the RYB c...",
        "name": "blue",
        "color": "#4363d8",
        "scenario": "general.botanicExample",
        "link": "https://en.wikipedia.org/wiki/Blue",
        "createdAt": "2026-12-03T12:05:24+00:00",
        "updatedAt": "2026-12-03T12:05:24+00:00"
      }
    },
    {
      "type": "HAS_TAG",
      "id": "02IiNr0GOoKiPMMG3SzbryY0vVeLSnkspLiXL",
      "start": "02IiNr0GOoKiPMM3n6dNmfvWddQqpN1iow5gs",
      "end": "02IiNr0GOoKiPMM4FOCWJ7N93GB5Ih1r74WAy",
      "data": {
        "scenario": "general.botanicExample",
        "createdAt": "2026-12-03T12:05:46+00:00",
        "updatedAt": "2026-12-03T12:05:46+00:00"
      }
    },
    "... 10 more items omitted (shapes seen: type:Plant, type:Tag, type:HAS_TAG) ..."
  ],
  "debug": [
    {
      "input": {
        "type": "cypher-path-subset",
        "query": "MATCH path=((:Plant)-[:HAS_TAG]->(:Tag {name: \"blue\"})) RETURN path",
        "parameters": {
          "stepResults": []
        }
      },
      "step-handler": "cypher-path-subset (App\\EventSystem\\SearchStep\\EventListener\\CypherPathSearchStepEventListener)",
      "start": 1796299631.328836,
      "end": 1796299631.884167,
      "duration": 0.5553309917449951
    },
    {
      "input": {
        "type": "element-hydration",
        "query": null,
        "parameters": {
          "stepResults": [
            {
              "paths": [
                {
                  "nodeIds": [
                    "02IiNr0GOoKiPMM95MrKH8ljX349BOQ3hyMlZ",
                    "02IiNr0GOoKiPMM4FOCWJ7N93GB5Ih1r74WAy"
                  ],
                  "relationIds": [
                    "02IiNr0GOoKiPMN47a7PS9E1TURHXXo8QecAr"
                  ]
                },
                {
                  "nodeIds": [
                    "02IiNr0GOoKiPMM3n6dNmfvWddQqpN1iow5gs",
                    "02IiNr0GOoKiPMM4FOCWJ7N93GB5Ih1r74WAy"
                  ],
                  "relationIds": [
                    "02IiNr0GOoKiPMMG3SzbryY0vVeLSnkspLiXL"
                  ]
                },
                {
                  "nodeIds": [
                    "02IiNr0GOoKiPMMnmHcecC7H3P3IOipWs3wbB",
                    "02IiNr0GOoKiPMM4FOCWJ7N93GB5Ih1r74WAy"
                  ],
                  "relationIds": [
                    "02IiNr0GOoKiPMMhkeCRqYdTBgjPGeL9kWAtJ"
                  ]
                },
                "... 3 more items omitted (shapes seen: nodeIds,relationIds) ..."
              ]
            }
          ]
        }
      },
      "step-handler": "element-hydration (App\\EventSystem\\SearchStep\\EventListener\\ElementHydrationSearchStepEventListener)",
      "start": 1796299631.884474,
      "element-hydration:redundantElementIds": {
        "message": "Removed 5 redundant elementIds.",
        "removedElementIds": [
          "02IiNr0GOoKiPMM4FOCWJ7N93GB5Ih1r74WAy"
        ]
      },
      "accessibleElementIds": [
        "02IiNr0GOoKiPMM3n6dNmfvWddQqpN1iow5gs",
        "02IiNr0GOoKiPMM4FOCWJ7N93GB5Ih1r74WAy",
        "02IiNr0GOoKiPMM95MrKH8ljX349BOQ3hyMlZ",
        "... 10 more items omitted (shapes seen: string) ..."
      ],
      "end": 1796299631.933164,
      "duration": 0.04869
    }
  ]
}
```

##### Response Headers

```http
Access-Control-Allow-Headers: Authorization, Content-Type, Prefer
Access-Control-Allow-Methods: OPTIONS, POST
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Preference-Applied
Allow: OPTIONS, POST
Cache-Control: no-cache, private
Content-Type: application/json; charset=utf-8
Date: Thu, 03 Dec 2026 12:24:48 GMT
Transfer-Encoding: chunked
Vary: Prefer, Accept-Encoding
X-Powered-By: Ember Nexus API
```

The graph view shows every plant tagged `blue`, all connected through the shared `blue` tag node - the relations
themselves (`HAS_TAG`) are part of the response as well, since a path always includes its nodes and relations.

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Cypher path query](/reference/search/cypher-path-subset.md)

Next: [Find nested elements](/reference/search/cypher-path-subset/find-nested-elements.md)
