ReversoApiClient 1.0.0

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

ReversoAPI

Unofficial Reverso Context client for .NET.

Quick Start

using ReversoApi;
using ReversoApi.Models;
using ReversoApi.Models.Requests;

using var client = new ReversoClient();

var result = await client.TranslateAsync(new TranslateRequest
{
    Word = "influence",
    Sentence = "They all wanted to influence the decision.",
    From = Language.En,
    To = Language.Ru
});

Public API

TranslateAsync(TranslateRequest)

This method automatically chooses which Reverso API to call:

  • If input is 1 word: uses word translation API.
  • If input is a short segment (2-3 words): uses segment translation API.
  • If input is more than 3 words: uses text translation API.

Input selection:

  • If Word is provided, decision is based on Word.
  • If Word is empty, decision is based on Sentence.
  • In word mode, Sentence is used as context.

Response shape depends on translation type:

  • Word/segment translations return data in Sources.
  • Text translations return data in Translation.

TranslateSegmentAsync(TranslateRequest)

Experimental feature.

This method uses another Reverso API variant and is usually better for words and short segments.

Requirements:

  • Word is required
  • Sentence is required
  • WordPos defaults to "0"

Example:

using var client = new ReversoClient();

var segment = await client.TranslateSegmentAsync(new TranslateRequest
{
    Word = "translation",
    Sentence = "Enjoy cutting-edge AI-powered translation from Reverso in 25+ languages",
    WordPos = "30",
    From = Language.En,
    To = Language.Ru
});

Request Model

TranslateRequest:

  • Word (optional)
  • Sentence (optional)
  • WordPos (optional, default "0")
  • From (required)
  • To (required)

Validation:

  • at least one of Word or Sentence must be provided
  • WordPos cannot be empty

Response Model

TranslateResponse:

  • Kind (Word, Segment, Sentence)
  • Input
  • Translation (text mode)
  • Sources (word/segment modes)
  • DirectionFrom, DirectionTo, IsDirectionChanged (text mode)
  • Success, Error, Message

Tests

Run all tests:

dotnet test

Current tests include:

  • unit tests for request validation and direction formatting
  • integration tests for:
    • TranslateAsync word mode
    • TranslateAsync segment mode
    • TranslateAsync sentence/text mode
    • TranslateSegmentAsync

Disclaimer

This code is completely free to use. Its operation is provided as-is and is not guaranteed.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

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.0.0 40 3/3/2026