For experimenting with the API, use the development server documented here. It uses a separate database with less data, allowing you to test without affecting the real database.
-
Create an account and application key on the development server.
-
Configure the library to use the development server:
OSM.configure({ apiUrl: "https://master.apis.dev.openstreetmap.org" });
Now you're ready to start making requests to the development server!