LiteroticaApi 2.1.0
dotnet add package LiteroticaApi --version 2.1.0
NuGet\Install-Package LiteroticaApi -Version 2.1.0
<PackageReference Include="LiteroticaApi" Version="2.1.0" />
<PackageVersion Include="LiteroticaApi" Version="2.1.0" />
<PackageReference Include="LiteroticaApi" />
paket add LiteroticaApi --version 2.1.0
#r "nuget: LiteroticaApi, 2.1.0"
#:package LiteroticaApi@2.1.0
#addin nuget:?package=LiteroticaApi&version=2.1.0
#tool nuget:?package=LiteroticaApi&version=2.1.0
๐ LiteroticaApi
A Modern, Fully Asynchronous .NET API for Accessing data from Literotica.com with EPUB Export Capabilities
โจ 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&EpubSeriesrecords โ Define the metadata and content structure of an EPUB.WriterUtilโ Generates internal EPUB XML structures liketoc.ncx,content.opf, andnav.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 | Versions 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. |
-
.NETStandard 2.0
- System.Net.Http.Json (>= 9.0.10)
- System.Text.Json (>= 9.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
* 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