Hi there, for the people that don't know me (yet), I'm the creator of warerastats.io, which I believe to be the most popular statistics tool of the game.

Behind the scenes, warerastats.io does over 3000 function calls per minute to the War Era API, a thing that is impossible with the 200 requests per minute rate limit.
However, you can batch requests and do smart caching!
Some people have asked me how I was able to make War Era Stats so efficient to make ~40 requests per minute to the API while retrieving SO MUCH data.
For this reason, I've now created the War Era Gateway. A drop-in replacement for the official War Era API that anyone can use! It's open source, and re-uses technology used in the War Era Stats website.
It's simple. Take your existing API calls and replace the base URL:
OLD: https://api2.warera.io/trpc/
NEW: https://gateway.warerastats.io/trpc/
That's it. Your existing code works exactly the same.
The gateway sits between your tool and the War Era API and does three things:
Request batching
All separate requests that come in within a 400ms window are combined into a single batched request to the API. If you fire off 20 individual calls, the gateway merges them into one.
Identical requests (same endpoint + same input) are automatically deduplicated. So if 5 users request the same country at the same time, only 1 API call is made.
Smart caching
Responses are cached so repeated requests don't hit the API at all:
5 minutes: most endpoints
10 minutes: item prices
2 minutes: battle ranking
Local database storage
Four data types are continuously scraped and stored in our own database. This means these endpoints can return data instantly without ever hitting the API:
Articles (all daily/weekly/top/latest)
Events (all country events)
Work offers (searchable by region, energy, production)
Transactions (trades, wages, donations, loot, etc.)
Full documentation with all parameters, types, and enum values are available at gateway.warerastats.io.
No headaches with rate limits
Faster responses (for cached data)
Less load on game servers (helps Vatou)
Zero setup, just change the URL
100% open source
Gateway: gateway.warerastats.io
Source code: github.com/Hattorius/War-Era-Gateway
Discord (for updates & support): discord.gg/VFcpPDys4b
War Era Stats: warerastats.io