Skip to main content

I have read all the documentation but nothing is clear, how do I and what is the right thing to use for the request, one page says need API ID and Secret, another page says Token and Organization ID, I need to submit a request to Censys Search and I have 500 credits, but how do I do submit the request?

What the fuck? Why can’t add organization ID to example request?


Who can help me query Censys Search to check domain?


I spent 50 credits to send the right request but still can't get the right result. How many more credits do I need to spend to get the right result? Did you make the API so complicated on purpose to make us spend more credits?


Hi Senior Shade, based on the error message you shared above, it seems like your organization ID may be missing from your request, though I cannot tell from the example cURL request in your screenshot.

Your organization ID is provided in the URL when you access the Censys Platform web UI.

So your cURL should look like this, with the organization ID and PAT in the appropriate sections:

curl --request POST \
--url 'https://api.platform.censys.io/v3/global/search/query?organization_id=1234567890' \
--header 'accept: application/json' \
--header 'authorization: Bearer ACBDEFGHIJK' \
--header 'content-type: application/json' \
--data '
{
"page_size": 5,
"query": "host.ip: 1.1.1.1/17"
}
'

Let me know if this helps.


I was already able to send the request, but thanks anyway, just a question about page size, what if I send the request without specifying page size? 


And is there any way to get back the credits spent while I was sorting out sending the request? For some reason, even when sending a request for the same domain, I still spent credits and it's a bit of a no bargain, considering that the 100 credits that are given at registration didn't count towards my purchased 500 credits.


Hey Senior Shade, the default page size is 100 results if you do not specify a value using the page_size parameter.

If you run an API or query and it errors out, then you should not be charged credits.

If you want help refining your queries ahead of time, I recommend asking here in the Community. We also are working on in-app tools to help users build more refined queries that will hopefully be released in the next several months.


> If you run an API or query and it errors out, then you should not be charged credits.

 

You’d think, but I wasted PLENTY of credits this way too. The use of credits to tune the _actual_ query is pretty annoying. If the personal credits could count toward the api quota or if the response were obfuscated in some way when debugging, literally anything would be super


Hey dovholuknf, were you being charged credits when your API calls errored out? Or were you running valid queries and not getting the results you wanted?


> Hey dovholuknf, were you being charged credits when your API calls errored out? 

The exact use case was we were using a regular expression, getting the regex wrong, and credits were subtracted. They burned up SO FAST it isn’t funny. They were actual errors due to getting the syntax incorrect but at that time I think they were 8 credits EACH (also good grief the new pricing scheme is punative)


Understood. I’m sorry that you churned through credits in an unexpected way. I understand that this isn’t always possible given time constraints, but I’m happy to help debug regex in the community (via posts or DMs). 


Reply