Narrative:

While doing takeoff and landings at ZZZ; I had just turned crosswind climbing off of runway xx; reaching pattern altitude I pushed the nose to level out and saw 4 aircraft coming at me head on. I pitched and turned left since the other aircraft were approaching from the right. They had departed from ZZZ1 which is 2 miles east and also has left traffic to runway xx because of the close proximity. I was making normal radio position reports in the pattern; I did not hear any radio reports from that formation until after the incident someone said 172 in the pattern say your intentions; I replayed I was staying in the pattern at ZZZ and they should announce their intentions to enter the pattern. I landed and parked the aircraft. I talked to ZZZ1 tower later and he said he was watching as it happened though he has no control.

Google
 

Original NASA ASRS Text

Title: C172 pilot reported an NMAC during departure with and aircraft departing an airport in close proximity.

Narrative: While doing takeoff and landings at ZZZ; I had just turned crosswind climbing off of Runway XX; reaching pattern altitude I pushed the nose to level out and saw 4 aircraft coming at me head on. I pitched and turned left since the other aircraft were approaching from the right. They had departed from ZZZ1 which is 2 miles east and also has left traffic to Runway XX because of the close proximity. I was making normal radio position reports in the pattern; I did not hear any radio reports from that formation until after the incident someone said 172 in the pattern say your intentions; I replayed I was staying in the pattern at ZZZ and they should announce their intentions to enter the pattern. I landed and parked the aircraft. I talked to ZZZ1 Tower later and he said he was watching as it happened though he has no control.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.