Skip to content

tt_search_api returns 0 results #29

@junio-AC

Description

@junio-AC

Hi all,

I’m using traktok (Research API wrapper) on macOS and I’m running into an issue that started yesterday (2026-03-09): tt_user_videos_api() (profile download) still works, but tt_search_api() for keyword queries returns an empty result for every day in the time window, with no error.

This workflow was working up to last week with the same setup and script structure.

The idea of my script is that I run a weekly window (last 7–8 complete days,), but to reduce load I segment it by day and call tt_search_api() once per day:
• define start_date and end_date for the weekly span
• build date_seq <- seq(start_date, end_date, by="day")
• for each day d, run tt_search_api(query, start_date=d, end_date=d, ...)
• bind rows across days

Console output shows the usual “Making initial request” / “Parsing data” for each day, but results are always empty and nothing accumulates.

[ref_keyword] START giorno: 2026-03-01
✔ Making initial request [256ms]
✔ Parsing data [8ms]
[ref_keyword] START giorno: 2026-03-02
✔ Making initial request [275ms]
✔ Parsing data [8ms]
[ref_keyword] START giorno: 2026-03-03
✔ Making initial request [348ms]
✔ Parsing data [9ms]

Minimal reproducible example

library(traktok)
auth_research(client_key = "<redacted>", client_secret = "<redacted>")

q <- query() |>
  query_and(field_name = "keyword", operation = "EQ", field_values = "referendum")

res <- tt_search_api(
  query      = q,
  start_date = as.Date("2026-03-01"),
  end_date   = as.Date("2026-03-01"),
  fields     = "all",
  max_pages  = 95,
  verbose    = TRUE,
  cache      = FALSE
)

print(dim(res))
print(names(res))
  • I’ve tried multiple keywords (not just “referendum”), different date spans, and longer sleep between requests.
  • Profile downloads via tt_user_videos_api() still work, so auth seems OK.
  • I’m on the dev version traktok_0.1.1.9000.

Package session info
• R: 4.5.2 (2025-10-31)
• Platform: aarch64-apple-darwin20
• macOS: Tahoe 26.3.1
• Time zone: Europe/Rome
• traktok: 0.1.1.9000
• httr2: 1.2.2
• curl: 7.0.0
• jsonlite: 2.0.0
• dplyr: 1.2.0
• purrr: 1.2.1

Has anyone seen tt_search_api() suddenly returning empty results for keyword queries while other endpoints still work? Is there a known change in the search endpoint behavior or any recommended adjustment to query construction for keyword search?

Thanks a lot for maintaining traktok, it has been extremely useful for my project!

Best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions