Who it is for
Reading a reply before your pipeline trusts it
Reading a reply is the step that is easiest to skip. Every response carries ok, and an authenticated one adds _credits with the cost and the balance left. Parse both first. A script that writes data from a failed reply fills your log with empty rows.
A reply can also be valid and still useless, such as an empty list for a domain you know has links. Compare the count with last month before you call the result good.
Check the status before the body
Treat HTTP 401 and 402 as two different stops. A 401 means the key is missing or wrong, so fix the secret. A 402 means the credit has run out, and retrying will not help until you top up. Both need a person, not a retry loop.
Keep the credit line
Log the _credits field from every authenticated call, with the date and the action name. Over a month that log answers the question most teams ask too late: which job spent the credit. Free actions do not bill, so they add nothing to that line.