Allow API to include top 5 countries
complete
Yuri Yeromenko
complete
Yuri Yeromenko
Hi Marta Zaloha, you can use the "Metrics by country" endpoint for that: https://docs.ahrefs.com/docs/api/site-explorer/operations/get-a-metrics-by-country
M
Marta Zaloha
Yuri Yeromenko This way I need to spend all my credits to figure out which country the largest portion of traffic is coming from for a target domain...
Yuri Yeromenko
Marta Zaloha, countries in the response are sorted by traffic, so if you make a request with
limit=5
parameter, you will get top-5 countries by traffic. You can experiment with this endpoint using free test queries: https://docs.ahrefs.com/docs/api/reference/free-test-queries. If it does not work that way for you, please contact our support team.M
Marta Zaloha
Yuri Yeromenko Thank you very much!
You are more helpful than the support team, who sent me here.