Skip to main content
Solved

API Request


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?

Best answer by MattK_Censys

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.

View original
Did this topic help you find an answer to your question?

  • Very Frequent Contributor
  • April 22, 2025

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


  • Very Frequent Contributor
  • April 22, 2025

Who can help me query Censys Search to check domain?


  • Very Frequent Contributor
  • April 22, 2025

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?


MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • April 22, 2025

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.


  • Very Frequent Contributor
  • April 23, 2025

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? 


  • Very Frequent Contributor
  • April 23, 2025

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.


MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • April 23, 2025

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings