🏯 Tiktok Scraper (Pay Per Result) avatar

🏯 Tiktok Scraper (Pay Per Result)

Try for free

Pay $0.30 for 1,000 posts

Go to Store
🏯 Tiktok Scraper (Pay Per Result)

🏯 Tiktok Scraper (Pay Per Result)

apidojo/tiktok-scraper
Try for free

Pay $0.30 for 1,000 posts

The most complete and effective solution for extracting data from TikTok.com. User, Profile, Hashtag, Music, Location, Tag, and many other support is just the beginning. The intelligent algorithm allows TikTok Scraper to retrieve any posts/videos around the platform in the blink of an eye!

OR

Setting maxItems when searching multiple "Search Keywords" doesn't work well

Closed

orenc opened this issue
14 days ago

Using the following input, I expect to get 3 results for each of the search queries, instead I get 9 results only on one of them:

{ "keywords": [ "realtor tel aviv penthouse", "superman spiderman", "baking cooking" ], "maxItems": 9 }

apidojo avatar

Hello,

This is how it works, the maxItems limits the whole run to 9 and it stops when it reaches 9 so in your case, probably it fetches 9 from the first keyword and then stops. If you want to control this, you need to create separate runs for each of your keyword.

Cheers

OR

orenc

13 days ago

I tested it further, it seems that the way you run it is in batches of 20. So if maxItems is 90, and I provide 3 keywords, it fetches: 20 of keyword #1, then 20 of keyword #2, then 20 of keyword #3, then 20 of keyword #1, then 10 of keyword #2.

I'm ok with such logic and can plan my code according to it. Can you verify that this is how it works? And if so - I suggest to add it to the documentation.

apidojo avatar

Hello,

Yes this is the current internal logic but you shouldn't rely on it. There can be several stuff affecting this including a simple race condition. The actor will try to fetch in parallel and it will stop when it reaches the limit.

If you want to limit per keyword, you need to have separate runs for each.

Cheers

Developer
Maintained by Community

Actor Metrics

  • 208 monthly users

  • 46 stars

  • >99% runs succeeded

  • 8.2 hours response time

  • Created in Dec 2023

  • Modified an hour ago