When you use Shodan your system is not directly contacting the target system, what you're doing is querying the database that Shodan has built up from their port scanning runs over various IP address ranges.
The API performs the same kind of queries as you can do from the main Shodan website.
In terms of your question of Active v Passive, it depends on perspective. From your perspective it's passive in that you don't send traffic to the target system. From shodans perspective it's active in that they do send traffic to the target system