C# Barcode API Lookup

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.Collections.Generic;
using System.Diagnostics;
using System.Net;
using System.Net.Http;

var productCode = "9781119367956";
var apiKey = "YOUR_API_KEY_HERE";

var apiBaseUrl = "https://go-upc.com/api/v1/code/";
var url = apiBaseUrl + productCode + "?key=" + apiKey;

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
WebResponse response = req.GetResponse();

Console.Write(response);

For further information about interacting with the API and product fields available, please see our documentation.