Codepotatoes.Scraper.HowLongToBeat 1.3.2

dotnet add package Codepotatoes.Scraper.HowLongToBeat --version 1.3.2
                    
NuGet\Install-Package Codepotatoes.Scraper.HowLongToBeat -Version 1.3.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Codepotatoes.Scraper.HowLongToBeat" Version="1.3.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Codepotatoes.Scraper.HowLongToBeat" Version="1.3.2" />
                    
Directory.Packages.props
<PackageReference Include="Codepotatoes.Scraper.HowLongToBeat" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Codepotatoes.Scraper.HowLongToBeat --version 1.3.2
                    
#r "nuget: Codepotatoes.Scraper.HowLongToBeat, 1.3.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Codepotatoes.Scraper.HowLongToBeat@1.3.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Codepotatoes.Scraper.HowLongToBeat&version=1.3.2
                    
Install as a Cake Addin
#tool nuget:?package=Codepotatoes.Scraper.HowLongToBeat&version=1.3.2
                    
Install as a Cake Tool

HowLongToBeatScraper

NuGet Version nuget version

As we're still missing an api to fetch data from Howlongtobeat
this project aims to bridge the gap in the meantime.

Usage

Install the package:

dotnet add package Crashdummy.Scraper.HowLongToBeat


using var scraper = new HltbScraper();

// Simple search with works as in using the howlongtobeat.com page
IEnumerable<GameEntry> results = await scraper.Search("Borderlands 3");

// Advanced search
var query = new QueryBuilder().WithSearchType(SearchOptions.Type.Users)
                              .WithModifier(SearchOptions.Modifier.HideModsAndDlc);

IEnumerable<GameEntry> results = await scraper.Search(query);

Regarding the "authentication"

The main endpoint that is being used is /api/search.
This previously required a magic hash that could be found hardcoded somewhere in the depths of the _app*.js file.

They eventually decided to provide an /api/search/init?t=<time in ms since unix epoch> endpoint
which returns an base64 encoded authorization token that is added to the header x-auth-token.

The token contains your public ip address and some other encrypted values.

Dependencies

For some reason /api/price-checks/<gameid>, only returns the gogAppId. The SteamAppId has to be provided within the body which thus defeats the purpose. Until theres a better way we need to scrape it there

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.2 575 12/1/2025
1.3.1 193 10/13/2025
1.3.0 165 6/28/2025
1.2.0 149 6/1/2025
1.1.0 190 5/28/2025
1.0.0 190 5/28/2025