How to determine the nodes connected to a farther specific label

Hello,

According to the screenshot -

My query is -

 MATCH (n)-[*]-(find)  WHERE  find.name =~'(?i).*Success.*'  RETURN n,r,find

Here, we get all the nodes that are connected to Success, till 3 levels of Relationships. However, we want nodes connected to Success with Label "API" only .

How to obtain that ?

If you are only interested in nodes with the label API, then your query should be MATCH (n:API).... rather than MATCH (n)

Elaine