USer Location tracer in Openatreetmap

Hi,

I want to trace the user location using the ip adress or using the longitude and latitude,so is there any api available for openstreetmap,using which i can trace the user location in my openstreet map.

Thanks.