OpenStreetMap has an editing API for fetching and saving raw geodata from/to the OpenStreetMap database — this is the entry page for the documentation. If you just want to embed a map into a webpage, you don't want this API. Use a web map library instead. Alternatively, consider the Overpass API which provides read-only API access. REST specifications for the editing API API v0.6 - (currently used