 <p>It's hard to tell without the complete stacktrace (please?), but I would guess that IN doesn't like being passed entities rather than keys. Try this:</p> <pre><code>users = [userA.key(), userB.key(), userC.key()] messages = Message.gql("WHERE user in :users", users=users).fetch(100 </code></pre>