retrieve async ads insights results from FB ads API with pagination

ε祈祈猫儿з 提交于 2019-12-04 07:27:33

I am posting the answer so it can help other developers that had the same issue.

modify:

return job.get_result()

to:

return job.get_result(params={"limit": 1000})

This will paginate over the results in jumps of 1000 and not the default which is 25.

The above change saved us 30 minutes of run.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!