In our API, a 404 is considered a successful query, despite being classified as an error code. You can check our API reference manual sections on credits and status codes for official documentation at any time, but here we will explain the why of this policy.
When a request comes in, we don't know if it will be a typical success (200) or missing (404). We have to do work on our servers to run a query, and only then can we return a status code to you. Assuming our query runs successfully and we determine if data exists or not, we'll forward that existence status, along with all available data (which may be nothing), and charge you accordingly.
Should your request fail for any reason, we will never bill you for a failure such as 503 (service unavailable), 429 (rate limited), etc. But 404 means a successful query that did work on our servers and successfully returned nothing.