To get a listing of all the unique components used through a site you can use the component lister that comes with ACS Commons (or it's in a service pack - I don't recall). If you need to do it programmatically, then you can use QueryBuilder to query for all cq:Component instances starting at a roo...