XAPI offers the ability to query the map using complex predicates.
For example:
/api/0.6/node[amenity=hospital]
Queries the map for all nodes containing <tag k="amenity" v="hospital" />
/api/0.6/*[key1=value1][key2=value2]...
Queries the map for all elements matching the predicates (key1 == value1 && key2 == value2).
/api/0.6/relation[not(way)]
Retrieve relations that do not have way members.
/api/0.6/node[@user=name]
Retrieve nodes last change by a specific user name.
Investigate how best these queries could be implemented in the current architecture.