We study the effects of spatial dispersion or nonlocality in the calculation of the Hamaker coefficient. Using a hydrodynamic model to describe the dielectric function of the materials, we show that at small separations, less that 10 nm, the Hamaker coefficient decreases significantly when a nonlocal dielectric is used. As a case study we compute the van der Waals interaction between two Au nanospheres and between two Au parallel nanorods. In both cases, the interaction energy shows variations of up to 2 orders of magnitude between the local and nonlocal cases. We show that at the nanoscale the usual approach to the calculation of the Hamaker coefficients has to be modified to properly take into account the dielectric properties of the nanoparticles.