Portal.queryItems(queryParams?)
can be used to query the portal for items. However, there doesn't appear to be a a way to query for items within a specific search geometry (such as within a map extent). The PortalItems that are returned can be examined to determine if their extents intersect the search geometry (requiring an additional call to the GeometryService).
This seems like something that should be possible, as evidenced by the fact that you can do it from within the ArcGIS Online map viewer. Is it possible?