Where can i find the id-item mapping?
Actually you can’t search item by name from API directly, but you can get all data from API:2/items and work with it locally.
I don’t know what do you have to do with it but the whole API:2/items data is over 30MB so maybe you can make a list of items with only name and id and then you get all the missing data when needed.
If you are ok using a 3rd party API, you could also check the GW2 shinies API: https://www.gw2shinies.com/doc-api, notably the idbyname entry.