# Find path between multiple nodes and contain particular node label atleast one time

**URL:** <https://community.neo4j.com/t/find-path-between-multiple-nodes-and-contain-particular-node-label-atleast-one-time/20243>\
**Category:** Procedures & APOC\
**Tags:** apoc, cypher, knowledge-base\
**Created:** [June 18, 2020, 5:02pm UTC](https://community.neo4j.com/t/find-path-between-multiple-nodes-and-contain-particular-node-label-atleast-one-time/20243 "2020-06-18T17:02:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoshada](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/kadoshada/32/10876_2.png) [@kadoshada](https://community.neo4j.com/u/kadoshada)\
**Post date:** [June 18, 2020, 5:02pm UTC](https://community.neo4j.com/t/find-path-between-multiple-nodes-and-contain-particular-node-label-atleast-one-time/20243/1 "2020-06-18T17:02:29Z")

</div>

I need to find paths between multiple nodes where each path should contain a particular node label atleast one time.  
i checked "apoc.path.expand.config" procedure with labelFilter parameter but there i couldn't find a way to do this.

example:  
let's say there are 4 nodes labels called 'LabelA', 'LabelB', 'LabelC', 'LabelD'  
aa1, aa2, aa3 are of 'LabelA' node Label  
bb1, bb2, bb3, bb4 are of 'LabelB' node Label  
cc1, cc2 are of 'LabelC' node Label  
dd1, dd2, dd3 are of 'LabelD' node Label

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/2X/d/d2ba1c0162bfe81477c427f465e510772453b805.png)

need to find paths between aa1,dd1, dd3 which should contain 'LabelC' node labels atleast one time.  
paths which sould be given as(without considering relation directions and one nodes should not traverse twice) :

- aa1--bb4--cc2--dd1
- aa1--bb4--cc1--bb2--dd1
- aa1--bb4--cc1--bb3--dd3
- aa1--bb4--aa2--bb3--cc1--bb2--dd1  
resulting subgraph looks like below.  
 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/2X/1/1fd6f127730ca80b5d8a6280c24efb40d8c948ef.png)

highly appreciate your valuable inputs on this.
