Getting seam vertices

Hello, I’m a Blender scripting newbie. I want to extract seam vertices of the two selected objects (and then process them somehow). How can I get that data?