Chimney swifts (Chaetura pelagica) are highly manoeuvrable birds notable for roosting overnight in chimneys, in groups of hundreds or thousands of birds, before and during their autumn migration. At dusk, birds gather in large numbers from surrounding areas near a roost site. The whole flock then employs an orderly, but dynamic, circling approach pattern before rapidly entering a small aperture en masse. We recorded the three-dimensional trajectories of ≈1 800 individual birds during a 30 min period encompassing flock formation, circling, and landing, and used these trajectories to test several hypotheses relating to flock or group behaviour. Specifically, we investigated whether the swifts use local interaction rules based on topological distance (e.g. the n nearest neighbours, regardless of their distance) rather than physical distance (e.g. neighbours within x m, regardless of number) to guide interactions, whether the chimney entry zone is more or less cooperative than the surrounding flock, and whether the characteristic subgroup size is constant or varies with flock density. We found that the swift flock is structured around local rules based on physical distance, that subgroup size increases with density, and that there exist regions of the flock that are less cooperative than others, in particular the chimney entry zone.