You can use the Proximity Web Service to find all points of interest (POI) locations within a distance you define for a specified point or line (for example, find all POIs within five miles of x,y) or determine the nearest specified number of POI locations to a specified point or line (such as find nearest three POIs to x,y).
The Proximity Web Service offers the following capabilities:
http://arcweb.esri.com/services/v2/Proximity.wsdl
https://arcweb.esri.com/services/v2/Proximity.wsdl
Note: HTTPS is available if you need added security to call ArcWeb Services. The Authentication Web Service and other ArcWeb Services must be accessed with the same IP address for the authentication token to be valid.
Interact with a live sample of a Proximity Web Service client. For information on creating clients for ArcWeb Services, including downloadable code for JavaServer Pages (JSP) with Glue, C# ASP.NET, and VB ASP.NET, see Introducing client samples.