You can use the query browser on DnD Beyond to filter these out.
Open up the browser and select "Advanced Filters", and in the box labeled "Source", select which source(s) you want items to appear from.
For example, limiting the source category to Mordenkainen's Tome of Foes gives two results:
- Greater Silver Sword
- Infernal tack
So just use that to select any/all books and ignore the adventures, and that should give you all book, non adventure magic items. This does presume that you know which are books and which are adventures, however. To get that information, also on DnD Beyond, you can select "sources-> Sourcebooks (View All), and that will give you the list. Once you have the list, you can click on the + sign on the right of the results and it will show you what sourcebook it is contained within.
Current sourcebook list (9.17.2019):
- Player's Handbook
- Dungeon Master's Guide
- Monster Manual
- Basic Rules
- Acquisitions Incorporated **
- Guildmaster's Guide to Ravnica **
- Mordenkainen's Tome of Foes **
- Xanathar's Guide to Everything **
- Volo's Guide to Monsters **
- Sword Coast Adventurer's Guide
- Wayfinder's Guide to Eberron **
- The Tortle Package
** - Has new magic items (I excluded DMG, PHB, Basic Rules and MM. How I got it was essentially searching all, and as I identified a book as having any magical item, I removed it from the list and requested a new filtered search. You can use this technique for spells, as well.)
This link will show the current list of magical items contained within all those books. You can unselect the ones you know of (Such as PHB, DMG, etc) to get whichever books you don't already have/know about.
Also note: The method will remain the same, but each new sourcebook added will need to be searched when it comes out for new magic items/spells/whatever.