Skip to main content

Specifying Actor Memory in Apify API Calls

 When working with Apify actors and their API endpoints, you might need to control the memory allocation for optimal performance. If you're using the run-sync-get-dataset-items endpoint and encountering difficulties specifying the actor's memory, this blog post is for you.




Common Misconception

A common mistake is attempting to include runOptions with memoryMbytes or memory within the API request payload. While this might seem logical, it doesn't work with this particular endpoint.


The Solution

The correct approach is to append &memory=256 (or your desired memory value in megabytes) directly to the API endpoint URL. This simple adjustment ensures that your actor runs with the specified memory allocation.

Example

const APIFY_API_URL = `https://api.apify.com/v2/acts/novi~fast-tiktok-api/run-sync-get-dataset-items?token=***&memory=256`; 

Key Takeaway

Remember to consult the Apify documentation for specific API endpoint requirements. In this case, appending the &memory parameter to the URL is the key to successfully controlling actor memory allocation.

Keywords: Apify, actor memory, API, run-sync-get-dataset-items, memory allocation

Comments

Popular posts from this blog

Leveraging the Fast TikTok API on Apify for Efficient Data Scraping

Introduction: In the world of social media data analysis, TikTok has emerged as a popular platform with a vast amount of user-generated content. To extract valuable insights from TikTok, developers and researchers often resort to web scraping. One efficient way to accomplish this task is by utilizing the Fast TikTok API on the Apify platform. In this article, we will explore the benefits and capabilities of leveraging the Fast TikTok API for data scraping on TikTok. Check the API here:  https://apify.com/novi/fast-tiktok-api

Giải trí với video hài

Hy vọng video này sẽ giúp mọi người thư giãn và xả xì trét :D

FAQ là gì?

Trên một số website các bạn thường hay thấy menu FAQ hay FAQs , vậy FAQ là gì? FAQ là viết tắt của cụm từ Frequently Asked Questions dịch nôm na là các câu hỏi thường gặp, nó đưa ra những câu hỏi phổ biến nhất mà người dùng thường gặp sau đó có phần giải đáp cho các câu hỏi đó luôn bên dưới.