Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Prido's avatar
Level 2

fetching data from API the right way

How to fetch huge amounts of data from an external API. My laravel app has to fetch huge amounts of data in form of json from an external API, how can i do this and not suffer the limits and memory errors or timeouts

0 likes
2 replies
tykus's avatar

It depends on how the data should be consumed by your application and users.

Perhaps a background task is necessary to regularly pull the data from the API; aggregate/filter/tranform it, and then store it locally to your application so it is immediately available to your users.

Please or to participate in this conversation.