But where can you easily find this item ID?
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)