Return to Blog

First Release of Factual C# / .NET Driver

We’re pleased to announce the release of the officially supported C# / .NET driver for Factual.

Get going!
The driver is available on Nuget. To install the driver into your Visual Studio project, go to the package manager console window and do this:

Install-Package FactualDriver

See the README for more details, including instructions for non-Nuget use.

Once you have the driver installed in your project, you can create an authenticated handle to Factual like this:

Factual factual = new Factual(MY_KEY, MY_SECRET);

(If you don’t have an API key, sign up to get one. It’s free and easy.)

Basic Query Example
Do a full-text search of Factual’s Places table for entities matching “Sushi Santa Monica”:

factual.Fetch("places", new Query().Search("Sushi Santa Monica"));

You can find out more about detailed query capabilities in the driver’s README as well as the general docs for our Core API docs.

Geo Filter Example
The driver supports all of Factual’s Geo Filtering. Here’s an example of finding Starbucks locations near a latitude, longitude:

factual.Fetch("places", new Query()
                              .WithIn(new Circle(34.06018, -118.41835, 5000)));

Crosswalk Example
Factual’s Crosswalk service lets you map third-party (Yelp, Foursquare, etc.) identifiers for businesses or points of interest to each other where each ID represents the same place.

Here’s an example using the C# driver to query with a factual id, getting entites from Yelp and Foursquare:

var query = new Query().Field("factual_id").Equal("97598010-433f-4946-8fd5-4a6dd1639d77");
factual.Fetch("crosswalk", query);

Use Factual’s Resolve to enrich your data and match it against Factual’s:

factual.Fetch("places", new ResolveQuery()
                              .Add("name", "McDonalds")
                              .Add("address", "10451 Santa Monica Blvd")
                              .Add("region", "CA")
                              .Add("postcode", "90025"));

The C# driver supports Factual’s Geopulse API. This gives you hyper­local context for any geographic point in the world. Check it out:

factual.Geopulse(new Geopulse(
                           new Point(34.06021, ­118.41828)).Only(

Thanks go to Sergey Maskalik for his care and dedication in the creation and continuing development of this driver.

We hope you’ll take the Factual C# / .NET driver and build something great!

Software Engineer