
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
XiansAi.Agent.GoogleSearch
Advanced tools
A Google Search implementation for AI agents that provides structured search results from Google Custom Search API.
A lightweight C# library for integrating Google's Custom Search JSON API into your applications. This library provides a simple interface to perform web searches programmatically using Google's search capabilities.
Before using this library, you'll need:
Install the package via NuGet:
dotnet add package XiansAi.Agent.GoogleSearch
Here's a basic example of how to use the library:
using XiansAi.Agent.GoogleSearch;
// Initialize the search engine
var apiKey = "your_api_key";
var searchEngine = new SearchEngine(apiKey);
try
{
// Perform a search with a limit of 5 results
var results = await searchEngine.SearchAsync("NoIsolation AS Norway", 5);
// Process the results
foreach (var item in results.Items)
{
Console.WriteLine($"Title: {item.Title}");
Console.WriteLine($"URL: {item.Link}");
Console.WriteLine($"Snippet: {item.Snippet}");
Console.WriteLine();
}
}
catch (SearchException ex)
{
Console.WriteLine($"Search failed: {ex.Message}");
throw;
}
The library throws SearchException
for any API-related errors. Always wrap your search calls in a try-catch block to handle potential errors gracefully.
This project is licensed under 99x commercial license. Contact 99x for more information.
For support, please open an issue in the GitHub repository.
FAQs
A Google Search implementation for AI agents that provides structured search results from Google Custom Search API.
We found that xiansai.agent.googlesearch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.