WARNING: This page is about a different car, the 2002 Toyota Prius. However, it is still accessible from the selected car via links, so may be relevant.
The engine serial number is stamped on the engine block. See Fig 1.
The Motor serial number is stamped as shown in Fig 1.