CybersecurityForDemocracy / tiktok-library

A library for interacting and large-scale data acquisition from the TikTok Research API
https://pypi.org/project/tiktok_research_api_helper/
4 stars 0 forks source link

Invalid search id mid-acquisition - Our end or TikTok? #89

Open BrunoGomesCoelho opened 2 weeks ago

BrunoGomesCoelho commented 2 weeks ago

Obtained error

{"error":{"code":"invalid_params","message":"Invalid count or cursor","log_id":"20241009180101BDD8B4B0A88D600D1801"}}'

while running

hatch run tiktok-lib run --include-any-hashtags war 20231108 20231108 --debug --raw-responses-output-dir debugging-folder --db-file debugging.db --region US

Unsure if really an issue on our end or just TikTok not properly keeping track of their cursos

macpd commented 2 weeks ago

I ran into this a lot, and looked into it. AFAIK it’s a big in the API.

On Wed, Oct 9, 2024 at 2:35 PM Bruno Gomes Coelho @.***> wrote:

Obtained error

{"error":{"code":"invalid_params","message":"Invalid count or cursor","log_id":"20241009180101BDD8B4B0A88D600D1801"}}'

while running

hatch run tiktok-lib run --include-any-hashtags war 20231108 20231108 --debug --raw-responses-output-dir debugging-folder --db-file debugging.db --region US

Unsure if really an issue on our end or just TikTok not properly keeping track of their cursos

— Reply to this email directly, view it on GitHub https://github.com/CybersecurityForDemocracy/tiktok-library/issues/89, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU2TVDYU7UYQDZPVX7ZA2TZ2VZQHAVCNFSM6AAAAABPVEQKZWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TMNRUGQ3DSOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

BrunoGomesCoelho commented 2 weeks ago

Thanks! Also just saw the comment about Often the API gets overloaded and returns 500 (which still consumes request quota) if the query returns lots of videos and the date range is large.

Did you find using any longer (like minutes to hours) waits before time-out helped or unsure?

macpd commented 2 weeks ago

I didn’t do an in depth investigation. Just decided to use smaller time frames when I realized it worked better

On Wed, Oct 9, 2024 at 4:27 PM Bruno Gomes Coelho @.***> wrote:

Thanks! Also just saw the comment about Often the API gets overloaded and returns 500 (which still consumes request quota) if the query returns lots of videos and the date range is large.

Did you find using any longer (like minutes to hours) waits before time-out helped or unsure?

— Reply to this email directly, view it on GitHub https://github.com/CybersecurityForDemocracy/tiktok-library/issues/89#issuecomment-2403368241, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU2TVCPHVZ2LCGCE4VDLELZ2WGR3AVCNFSM6AAAAABPVEQKZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBTGM3DQMRUGE . You are receiving this because you commented.Message ID: @.***>

BrunoGomesCoelho commented 2 weeks ago

Got it, thanks!

We'll investigate some longer times, we're getting 500s even with single-day, single-unpopular hashtags queries.