The search API now support a "source" URL parameter to differentiate between traffic source. This parameter might be required to be in the query string, not a post body, but I haven't verified that yet. It should be set to something short, but descriptive, like "python-client".