SummaryThis paper proposes a cooperative distributed extremum seeking control (ESC) approach for solving distributed optimization problems in static and dynamical multiagent systems, where the agents' coupled dynamics are unknown and only local cost values can be measured. The approach begins with each agent estimating the local gradient information of the unknown local cost function through recursive identification using measured local cost values. Subsequently, the distributed identification‐gradient tracking (DIGT) algorithm is employed to enable each agent to track the global gradient information of the global cost function, utilizing the estimated local gradient information from itself and its neighbors in the network. The proposed cooperative distributed ESC method enables the multiagent system to reach the extreme point of the global cost function under model‐free scenarios. Furthermore, the convergence properties of the approach are established for both static and dynamical multiagent systems. Finally, numerical examples are presented to demonstrate the effectiveness and stability of the proposed approach.