LiteroticaApi 2.1.0

dotnet add package LiteroticaApi --version 2.1.0
                    
NuGet\Install-Package LiteroticaApi -Version 2.1.0
                    
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="LiteroticaApi" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiteroticaApi" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="LiteroticaApi" />
                    
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 LiteroticaApi --version 2.1.0
                    
#r "nuget: LiteroticaApi, 2.1.0"
                    
#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 LiteroticaApi@2.1.0
                    
#: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=LiteroticaApi&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=LiteroticaApi&version=2.1.0
                    
Install as a Cake Tool

๐Ÿ“š LiteroticaApi

A Modern, Fully Asynchronous .NET API for Accessing data from Literotica.com with EPUB Export Capabilities

C# Support Server GitHub Nuget All Releases


โœจ Overview

LiteroticaApi is a fully asynchronous, modern C# library that provides direct access to stories, authors, series, tags, and metadata from Literotica.com.
It enables developers to programmatically fetch, process, and even export stories or entire series into EPUB format.

This API is ideal for:

  • Power users who want to automate content export or generate offline EPUB versions.
  • Developers building applications that integrate Literotica content.
  • Anyone looking for a robust, easy-to-use .NET library to interact with Literotica's vast collection of stories.

๐Ÿš€ Features

  • โœ… Async-first design โ€“ All operations are async/await-friendly.
  • ๐Ÿ“– Story and series fetching โ€“ Retrieve stories, series, authors, and related metadata.
  • ๐Ÿท๏ธ Advanced tag and category search โ€“ Filter stories by tags, periods, and categories.
  • ๐Ÿง  Smart EPUB generation โ€“ Automatically generates valid EPUB 3.0 files from stories or entire series.
  • ๐Ÿงฉ Structured data models โ€“ Strongly typed responses for all API entities.
  • ๐ŸŒ Language and period filters โ€“ Easily query content by language and publication period.
  • โšก Zero dependencies on external binaries โ€“ Pure .NET and XML-based EPUB construction.

System.Text.Json, System.Net.Http.Json, and System.IO are the only dependencies.


๐Ÿ“ฆ Installation

Install via NuGet Package Manager:

dotnet add package LiteroticaApi

Or via Package Manager Console:

Install-Package LiteroticaApi

๐Ÿ’ก Quick Start

Below is a basic example showing how to download and export a Literotica story to EPUB.

using LiteroticaApi.EpubWriter;
using LiteroticaApi.Api;

public class Example
{
    public static async Task Main()
    {
        string storyUrl = "https://www.literotica.com/s/some-story-slug";
        string outputPath = Path.Combine(Environment.CurrentDirectory, "epubs");

        await StoryWriter.CreateEpubFromStory(storyUrl, outputPath);

        Console.WriteLine("EPUB created successfully!");
    }
}

To export an entire series instead:

string seriesUrl = "https://www.literotica.com/s/series-slug";
await StoryWriter.CreateEpubFromSeries(seriesUrl, outputPath);

๐Ÿงฑ Core Components

๐Ÿ—‚ API Modules

Class Description
StoryApi Fetches story content, info, top stories, and recommendations.
SeriesApi Retrieves series info, covers, and related works.
AuthorsApi Retrieves author profiles and their associated works.
TagsApi Provides tag-based search, filtering, and related tag lookups.
Comments Retrieves comment data using a variety of options.
Users Retrieves user data using a variety of options.

๐Ÿ“˜ EPUB Writer

The EpubWriter namespace contains everything needed to generate compliant EPUB 3.0 files. It includes:

  • StoryWriter โ€“ Handles EPUB structure creation, packaging, and cleanup.
  • EpubStory & EpubSeries records โ€“ Define the metadata and content structure of an EPUB.
  • WriterUtil โ€“ Generates internal EPUB XML structures like toc.ncx, content.opf, and nav.xhtml.

๐Ÿงฐ Example: Custom EPUB Creation

If you already have your story data and just want to generate an EPUB manually:

var story = new EpubStory(
    Title: "Custom Story",
    Language: "English",
    Author: "John Doe",
    Series: new EpubSeries("Sample Series", 1),
    Tags: new[] { "romance", "fiction" },
    Chapters: new[] { "chapter1.txt", "chapter2.txt" },
    CoverPath: "cover.jpg"
);

StoryWriter.CreateEpub(story, "./output");

โš™๏ธ Requirements

  • .NET Standard 2.0 applicable environment
  • Windows, Linux, or macOS
  • Internet access for API calls

๐Ÿงพ License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
2.1.0 309 11/13/2025
2.0.4 206 11/5/2025
2.0.3 207 11/2/2025
2.0.2 310 11/2/2025 2.0.2 is deprecated because it is no longer maintained and has critical bugs.
2.0.1 176 11/2/2025
2.0.0 208 10/30/2025
1.0.0 211 10/29/2025

* AuthClient introduction, check documentation for available systems
* Created Language enum that binds to lit's number scheme, update method params
* StoryWriter now has start indexes param for pages or chapters