Ivy.Exa
1.0.3
dotnet add package Ivy.Exa --version 1.0.3
NuGet\Install-Package Ivy.Exa -Version 1.0.3
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="Ivy.Exa" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ivy.Exa" Version="1.0.3" />
<PackageReference Include="Ivy.Exa" />
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 Ivy.Exa --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ivy.Exa, 1.0.3"
#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 Ivy.Exa@1.0.3
#: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=Ivy.Exa&version=1.0.3
#tool nuget:?package=Ivy.Exa&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ivy.Exa
A .NET SDK for the Exa.ai API - search, research, and web content retrieval.
Created by the team at Ivy - The ultimate framework for creating internal business app in pure C#.
Installation
dotnet add package Ivy.Exa
Quick Start
using Ivy.Exa;
using Ivy.Exa.Models;
// Initialize the client
var client = new ExaClient("your-api-key");
// Or use environment variable EXA_API_KEY
var client = new ExaClient();
// Perform a search
var results = await client.SearchAsync("artificial intelligence companies");
foreach (var result in results.Results)
{
Console.WriteLine($"{result.Title}: {result.Url}");
}
Features
Search Operations
// Basic search
var searchResults = await client.SearchAsync("machine learning");
// Advanced search with options
var advancedResults = await client.SearchAsync("AI startups", new SearchOptions
{
NumResults = 20,
IncludeDomains = new List<string> { "techcrunch.com", "venturebeat.com" },
Category = "company",
UserLocation = "US"
});
// Find similar pages
var similarResults = await client.FindSimilarAsync("https://openai.com");
// Get content for specific URLs
var content = await client.GetContentsAsync(
new List<string> { "https://example.com" },
new ContentsOptions
{
Text = new TextContentsOptions { MaxCharacters = 1000 },
Summary = new SummaryContentsOptions()
});
Research Operations
// Create a research task
var taskId = await client.Research.CreateTaskAsync(
"Research the latest developments in quantum computing");
// Poll for completion
var completedTask = await client.Research.PollTaskAsync(taskId.Id);
// Get task status
var task = await client.Research.GetTaskAsync(taskId.Id);
Console.WriteLine($"Status: {task.Status}");
if (task.Result != null)
{
Console.WriteLine($"Research Result: {task.Result}");
}
Websets Operations
// Create a webset
var webset = await client.Websets.CreateWebsetAsync(
"AI Companies",
"Collection of AI company websites",
new List<string> { "https://openai.com", "https://anthropic.com" });
// List websets
var websets = await client.Websets.ListWebsetsAsync();
// Get webset details
var websetInfo = await client.Websets.GetWebsetAsync(webset.Id);
// Update webset
var updatedWebset = await client.Websets.UpdateWebsetAsync(
webset.Id,
"Updated AI Companies",
"Updated description");
// Delete webset
await client.Websets.DeleteWebsetAsync(webset.Id);
Configuration
API Key
Set your API key in one of these ways:
- Constructor parameter:
var client = new ExaClient("your-api-key");
- Environment variable:
export EXA_API_KEY=your-api-key
var client = new ExaClient(); // Automatically uses EXA_API_KEY
Custom Configuration
var httpClient = new HttpClient();
var client = new ExaClient(
apiKey: "your-api-key",
baseUrl: "https://api.exa.ai",
httpClient: httpClient,
userAgent: "MyApp/1.0.0");
Models
Search Options
var options = new SearchOptions
{
Query = "search term",
NumResults = 10,
IncludeDomains = new List<string> { "example.com" },
ExcludeDomains = new List<string> { "spam.com" },
StartCrawlDate = "2023-01-01",
EndCrawlDate = "2023-12-31",
UserLocation = "US",
Type = "neural", // neural, keyword, hybrid, fast, auto
Category = "company", // company, research paper, news, etc.
UseAutoprompt = true,
Moderation = true
};
Content Options
var contentOptions = new ContentsOptions
{
Text = new TextContentsOptions
{
MaxCharacters = 2000,
IncludeHtml = false
},
Highlights = new HighlightsContentsOptions
{
NumSentences = 3,
Threshold = 0.5
},
Summary = new SummaryContentsOptions
{
Query = "What are the key points?"
},
Livecrawl = LivecrawlOptions.Auto,
LivecrawlTimeout = 5000
};
Error Handling
try
{
var results = await client.SearchAsync("test query");
}
catch (HttpRequestException ex)
{
Console.WriteLine($"API request failed: {ex.Message}");
}
catch (ArgumentException ex)
{
Console.WriteLine($"Invalid parameters: {ex.Message}");
}
Async and Sync Support
The library provides both async and sync methods:
// Async (recommended)
var results = await client.SearchAsync("query");
// Sync
var results = client.Search("query");
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
License
MIT License. See LICENSE file for details.
Links
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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.
-
.NETStandard 2.1
- Microsoft.Extensions.Http (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- System.Text.Json (>= 9.0.0)
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.3 | 86 | 8/3/2025 |