Many applications require product data, and given the popularity of C# as a programming language there's no shortage of C#-based apps and tools that need access to a broad array of product information.
Go-UPC is an ideal solution for such applications — especially those that need to scan barcodes — as our database is vast, can provide advanced product information, and includes products in many niches. Provide any UPC or EAN number and (if the product is known) you'll get back a product name, image, description, and more.
Example API Code
Below you'll find some sample C# code that interacts with our API to look up a product by its UPC. In the sample we output the product JSON response.
using System;
using System.Net.Http;
using System.Threading.Tasks;
string upc = "5030756007775";
string apiKey = "YOUR_API_KEY_HERE";
string info = GoUPC.API.GetProduct(upc, apiKey).Result;
Console.WriteLine(info);
namespace GoUPC
{
public static class API
{
static readonly HttpClient TheClient = new();
public static Task<string> GetProduct(string upc, string apiKey)
{
string url = $"https://go-upc.com/api/v1/code/" + upc + "?key=" + apiKey;
return TheClient.GetStringAsync(url);
}
}
}
For further information about interacting with the API and product fields available, please see our documentation.