API re-introduced

Post general questions, ask for help or post proposals here.
User avatar
s3in!c
Administrator
Posts: 51
Joined: Thu 24. Sep 2015, 09:50
Location: Switzerland
Contact:

API re-introduced

Postby s3in!c » Fri 9. Oct 2015, 11:37

I added again the API interface on Hashes.org to do simple hash search requests. You can read here how to use it: https://hashes.org/api_howto.php

It is not the same API as before, some changes in requests structures were made and the output format is always JSON now.

UberStrike88
Posts: 15
Joined: Mon 5. Oct 2015, 17:29

Re: API re-introduced

Postby UberStrike88 » Sat 10. Oct 2015, 20:23

Looks really nice, but what if you request more then 25 every minute? will it like just give you a forbidden message or will it just ignore til the next minute?

User avatar
s3in!c
Administrator
Posts: 51
Joined: Thu 24. Sep 2015, 09:50
Location: Switzerland
Contact:

Re: API re-introduced

Postby s3in!c » Sat 10. Oct 2015, 21:33

Looks really nice, but what if you request more then 25 every minute? will it like just give you a forbidden message or will it just ignore til the next minute?
It will give you this reply when you reach the limit:

Code: Select all

{ "ERROR":"LIMIT REACHED!" }

denis
Posts: 9
Joined: Mon 5. Oct 2015, 19:42

Re: API re-introduced

Postby denis » Sat 10. Oct 2015, 23:10

Great job s3in!c as usual.

Thx a lot! ;)

UberStrike88
Posts: 15
Joined: Mon 5. Oct 2015, 17:29

Re: API re-introduced

Postby UberStrike88 » Wed 14. Oct 2015, 16:54

Looks really nice, but what if you request more then 25 every minute? will it like just give you a forbidden message or will it just ignore til the next minute?
It will give you this reply when you reach the limit:

Code: Select all

{ "ERROR":"LIMIT REACHED!" }
Ahh okay, but does the 1 minute counter stop when you keep hitting it with requests? Like I hitted my 25 max but I just keep hitting it til the minute is over, will it still count that minute or will it like start counting down when you stop hitting the api

User avatar
s3in!c
Administrator
Posts: 51
Joined: Thu 24. Sep 2015, 09:50
Location: Switzerland
Contact:

Re: API re-introduced

Postby s3in!c » Thu 15. Oct 2015, 09:03

Currently it is programmed to stop when the limit is reached and it doesn't count if you make requests which give you the limit message.

Theoretically you can just ask further and then when the minute is over it will again give results. But it would be really good, if your script (or whatever you use to ask the API) would recognize when the limit is reached and wait some time to try again then. Best solution would be to requesting 20 hashes, then wait until the minute is completed without any request and then send the next 20 requests.

EDIT: corrected limit per minute from 25 to 20

denis
Posts: 9
Joined: Mon 5. Oct 2015, 19:42

Re: API re-introduced

Postby denis » Thu 15. Oct 2015, 10:50

http://hashes.org/api_howto.php:
The usage is limited to 20 requests per minute and there is no guarantee that this speed can be privided at all time.

Why you are talking about 25 hashes/min?
What is real limits here? :)

User avatar
s3in!c
Administrator
Posts: 51
Joined: Thu 24. Sep 2015, 09:50
Location: Switzerland
Contact:

Re: API re-introduced

Postby s3in!c » Thu 15. Oct 2015, 11:34

http://hashes.org/api_howto.php:
The usage is limited to 20 requests per minute and there is no guarantee that this speed can be privided at all time.

Why you are talking about 25 hashes/min?
What is real limits here? :)
I'm sorry, I just used what UberStrike wrote since his first message, but of course the limit is 20 per minute

UberStrike88
Posts: 15
Joined: Mon 5. Oct 2015, 17:29

Re: API re-introduced

Postby UberStrike88 » Thu 15. Oct 2015, 13:46

Currently it is programmed to stop when the limit is reached and it doesn't count if you make requests which give you the limit message.

Theoretically you can just ask further and then when the minute is over it will again give results. But it would be really good, if your script (or whatever you use to ask the API) would recognize when the limit is reached and wait some time to try again then. Best solution would be to requesting 20 hashes, then wait until the minute is completed without any request and then send the next 20 requests.

EDIT: corrected limit per minute from 25 to 20
Well, I was planning on making a program for it and releasing it (with that it is made possible by hashes. Org) just a small python code nothing special :). Is that OK with you?

UberStrike88
Posts: 15
Joined: Mon 5. Oct 2015, 17:29

Re: API re-introduced

Postby UberStrike88 » Wed 21. Oct 2015, 17:20

Btw, I just checked, when you put in a invalid hash, then it doesn't count it towards the counter next to your api key, does that mean that you can request like more then 20 hashes per minute if they are all invalid?


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron