Skip to content

Add support for importing and exporting search history - #8237

Merged
FreeTubeBot merged 2 commits into
FreeTubeApp:developmentfrom
absidue:search-history-data
Nov 10, 2025
Merged

FreeTubeBot merged 2 commits into
FreeTubeApp:developmentfrom
absidue:search-history-data

Conversation

@absidue

@absidue absidue commented Nov 6, 2025

Copy link
Copy Markdown
Member

Pull Request Type

  • Feature Implementation

Related issue

Description

This pull request adds support for importing and exporting search history in both the FreeTube database format and YouTube's Google Takeout format. The import picks the newest/largest lastUpdatedAt timestamp for each query. Thankfully importing the YouTube format is easier for search history compared to watch history, as the URL includes the search query, so we don't have to do the common prefix detection that the watch history import does.

Testing

I tested this with a real export which also included advertisment entries, but I'm not going to upload that here, so I have created a small sample that you can use for testing, it doesn't include advertisements.

search-history.json

Desktop

  • OS: Windows
  • OS Version: 11

@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) November 6, 2025 17:33
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 6, 2025

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Receiving the same error in the following cases:

  • Importing freetube-search-history which contains other data then the files listed below doesnt add new entries
  • Importing youtube-search-history contain same data as file shared here
  • importing search history file again
VirtualBoxVM_1ivebYmj8h.mp4

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Nov 6, 2025
@absidue absidue added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Nov 6, 2025
@FreeTubeBot
FreeTubeBot merged commit 676cf13 into FreeTubeApp:development Nov 10, 2025
@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 10, 2025
@absidue
absidue deleted the search-history-data branch November 10, 2025 07:15
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Nov 11, 2025
* development: (41 commits)
  Translated using Weblate (Turkish)
  ! Fix top nav cannot search in new window (FreeTubeApp#8254)
  Bump vue from 3.5.22 to 3.5.24 (FreeTubeApp#8257)
  Translated using Weblate (Czech)
  Translated using Weblate (Italian)
  Translated using Weblate (Polish)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Norwegian Bokmål)
  Bump lefthook from 2.0.2 to 2.0.3 (FreeTubeApp#8258)
  Bump the eslint group with 2 updates (FreeTubeApp#8256)
  Bump marked from 16.4.1 to 17.0.0 (FreeTubeApp#8260)
  Translated using Weblate (Breton)
  Translated using Weblate (Estonian)
  Translated using Weblate (French)
  Translated using Weblate (Chinese (Simplified Han script))
  Add support for importing and exporting search history (FreeTubeApp#8237)
  Invidious API: Fix published dates on recommended videos (FreeTubeApp#8251)
  Translated using Weblate (Chinese (Simplified Han script))
  ! Fix playlist progress bar preview broken in IV API (FreeTubeApp#8245)
  Wrap interactive FontAwesomeIcons in actual buttons (FreeTubeApp#8206)
  ...

# Conflicts:
#	package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants