Piwik API and ignore user

In the Piwik settings I excluded myself from tracking which works. But when I use the API for tracking, my visits are no longer excluded.

I use the API as follows:
$piwik = new PiwikTracker(1, ‘http://analytics.example.com/’);
$piwik->setTokenAuth(Configuration:: PIWIK_TOKEN_AUTH);
$piwik->doTrackSiteSearch($search, ‘’, 1);

How can I exclude my own visits when using the API?

use the IP address exclude tool

use the IP address exclude tool[/quote]
I do not have a static IP so that won’t help. Can I somehow force the PiwikTracker to read the cookies and check whether the current user should be excluded?