For Shimano derailers, you may be able to find interchangeability information online on Shimano's website, but it's not easy to find. < has "exploded views" of their products which have a handy "interchangeability chart". These seem to be really badly edited though, as I have found quite a few where the interchangeability is mentioned for one derailer but not vice-versa. I think the best way to get a more exhaustive interchangeability list is to just google the "SHIMANO CODE NO." for the part you're looking for, which can be found on the chart in the exploded view of your product. This comes up with a nice list of all the other exploded view PDFs on Shimano's website that include the same part. You can than order the part that goes with any of the products in that list.
This helped me find the exact same pulley wheel I was looking for, however there may be other sources for parts that will work just as well, though they may not be an exact match.