FAQ
Frequently asked questions about using the API
How do I get a Meta advertiser's page_id?
You can search by keyword using the page_name field in the search endpoint — the response will include the corresponding page_id. Alternatively, you can find the view_all_page_id parameter in the URL on the Meta Ad Library website.
How long are TikTok video download URLs valid?
Download URLs are typically valid for a few hours. We recommend downloading promptly after retrieval. Do not store direct links for long-term use.
What should I do when I get 413/414 errors while paginating the Meta Ad Library API?
When the pagination token (next_page_token) is too long, switch to the POST method and send all parameters (including the token) in the JSON request body instead of appending them to the URL.
How do I handle rate limiting?
When you receive an HTTP 429 response, wait before retrying. We recommend implementing an exponential backoff strategy in your code to handle rate limits gracefully.
How do I search products on Amazon China?
Pass domain=amazon.cn in the request to switch to the Amazon China marketplace. We also recommend setting language to zh_CN and delivery_country to CN for the most accurate localized results.
How do I get a product's ASIN?
You can call the /amazon/search endpoint first — each product in the organic_results array includes an asin field. You can also extract it directly from an Amazon product page URL, e.g. B0CM5JV26D in https://www.amazon.com/dp/B0CM5JV26D.
APIMUX Docs