There are many reasons you might need to access the item ID for content items within ArcGIS Online. The item ID is the basis for many automation and mapping techniques used within the ArcGIS REST API, the ArcGIS JavaScript API, and ArcGIS API for Python. The item ID is also a great way to search for items within the ArcGIS platform, because it will always bring you to the exact item you need.
But where can you easily find this item ID?
The easiest and fastest way to access the ID is from the ArcGIS Online content item details page. For example, here is the item details page for a web map named "Population Not in the Labor Force"
The item ID may not be immediately apparent, but its actually in a very easy place to find. If you look at the URL, you can see the ID at the end after ?id=
The above example shows a web map item in ArcGIS Online. However, if you wanted to find the item ID for one of the layers in the map, you can also do that from the item details page. Find the Layers section, click on the layer of interest, and view the item ID in the address bar.
Easy tip: if you double click the ID within the URL, it will highlight just the ID (as seen in the gif above)