The solar wind escapes from the solar corona and is accelerated, over a short distance, to its terminal velocity. The energy balance associated with this acceleration remains poorly understood. To quantify the global electrostatic contribution to the solar wind dynamics, we empirically estimate the ambipolar electric field (E
∥) and potential (Φr,∞). We analyze electron velocity distribution functions (VDFs) measured in the near-Sun solar wind between 20.3 R
S
and 85.3 R
S
by the Parker Solar Probe. We test the predictions of two different solar wind models. Close to the Sun, the VDFs exhibit a suprathermal electron deficit in the sunward, magnetic-field-aligned part of phase space. We argue that the sunward deficit is a remnant of the electron cutoff predicted by collisionless exospheric models. This cutoff energy is directly linked to Φr,∞. Competing effects of E
∥ and Coulomb collisions in the solar wind are addressed by the Steady Electron Runaway Model (SERM). In this model, electron phase space is separated into collisionally overdamped and underdamped regions. We assume that this boundary velocity at small pitch angles coincides with the strahl break-point energy, which allows us to calculate E
∥. The obtained Φr,∞ and E
∥ agree well with theoretical expectations. They decrease with radial distance as power-law functions with indices α
Φ = −0.66 and α
E = −1.69. We finally estimate the velocity gained by protons from electrostatic acceleration, which equals 77% calculated from the exospheric models, and 44% from the SERM model.