Indexers with API Limits

The Problem
Free indexers typically have strict API call limits. For example, I have one paid indexer, and a half dozen or so free ones. The paid indexer has unlimited calls, however this always depletes the various free indexers API limits. There are various ways to control this, and I’m sure they’ve been discussed however I did not see anything in Trello so here I am.

Primary/Secondary Indexers
If the requested indexer has more calls available than daily requests, it would be considered a primary indexer. This is how Sonarr already behaves by default. Secondary indexers would only be used when there are no shows in the last 24 hours to be fetched.

Automatically Limiting Calls
Using an example where a free indexer has a 100 API call limit and the user requests 144 requests per day (144 calls = every 10 minutes), that indexer would only be called 69% of the time.

Assigning API Limits
Indexers would need individual API call limits assigned to them in their advanced setup. In the basic setup, the user could specify paid or free as toggled options where paid would be considered unlimited calls and free would be some average value that free servers typically limit to.

Dynamic API Calls
Lets say a user only want to use free indexers and they have 3 indexers set up. Sonarr could easily calculate when a user has less API calls available than what they’re requesting. With 3 indexers each limited to 50 API calls, and 144 requests per day, each indexer would take its turn in 30 minute intervals so daily API calls are not exhausted.

Conclusion
The idea here is lets be a bit friendlier to the free servers out there, and lets also lower the costs for users willing to set themselves up with only a set of free indexers. That money saved could then be used a sales point for why you should donate to Sonarr.

We do plan on making some improvements the the API calls Sonarr makes, backing off when API limits are hit and allowing indexers to be used for manually searching only.

We do not have plans at this time to manage API calls in this fashion, it ultimately increases load on free indexers because people can avoid paying and without good indexers the whole system falls apart. I personally don’t find the suggestion that people that don’t pay for indexers will donate to Sonarr compelling or something we want to suggest. $10/year for most indexers is well worth it, it keeps them operating, servers aren’t free.

From the technical side, it also adds a degree of uncertainty to the the calls being made, making it unclear if the indexer will be hit during that RSS sync or not. It also makes Sonarr much more complex in terms of tracking each call and calculating whether it should be used.

If someone wants to manage their free indexers themselves they certainly can via Sonarr’s API, it wouldn’t be terribly difficult to toggle them on/off on a schedule.