question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESMAtlas api access: Rate limit?

See original GitHub issue

Hi,

I would like to automatically retrieve structures from ESMAtlas. Basically I have a list of MGinfy IDs that I want to retrieve.

I do that using the following:

def get_esm_pdb_file(mgnify_id, out_dir):
    url = f'https://api.esmatlas.com/fetchPredictedStructure/{mgnify_id}.pdb'
    response = requests.get(url, stream=True)
    if response.status_code == 200:
        pdb_file = os.path.join(out_dir,f'{mgnify_id}.pdb')
        with open(pdb_file, 'w') as f:
            f.write(response.text)
    else:
        print(mgnify_id, response.status_code)
        print(response.text)

To speed it up, I parallelize it over my list using a ProcessPool. For some IDs I then get the following:

MGYP000547115894 403
{"message":"Forbidden"}
MGYP000526977164 403
{"message":"Forbidden"}
MGYP003555372774 403
{"message":"Forbidden"}

Could you provide some details if/what rate limiting is in place for querying ESMAtlas, or if there is another way to retrieve structure files?

Thanks!

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fteufelcommented, Dec 14, 2022

Nevermind, I ran a few more test cases and I’m sure it goes faster now.

1reaction
tomsercucommented, Nov 22, 2022

This makes a lot of sense, we’ll increase rate limits for all GET requests which just fetch data from the atlas.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rate limit - GitHub Docs
The REST API for searching items has a custom rate limit that is separate from the rate limit governing the other REST API...
Read more >
Understanding rate limits for APIs and Plans - IBM
In API Connect, rate limits can be defined as unlimited, or with a specified number of calls per second, minute, hour, day, or...
Read more >
What is API Rate Limiting and How to Implement It - DataDome
API rate limiting is, in a nutshell, limiting access for people (and bots) to access the API based on the rules/policies set by...
Read more >
API Rate Limit Summary - Zscaler Help
The following table summarizes the cloud service API resources and their rate limits for each method. Rate limits are subject to change.
Read more >
API Rate Limits - Okta Documentation
End-User Rate Limit​​ Okta limits the number of requests from the Okta user interface to 40 requests per user per 10 seconds per...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found