API Documentation

Integrate our barcode lookup API into your applications

Introduction

The Barcode Report API allows you to search for barcode information and retrieve account details. It requires an API key for authentication and supports searching for barcode details across our comprehensive database.

API Endpoints

Search Barcode

Endpoint: /api/search_barcode

Method: GET

Parameters:

  • barcode (required) - The barcode to search
  • api_key (required) - Your API key

Response: 200 success, 404 not found, 403 invalid key

Account Information

Endpoint: /api/account

Method: GET

Parameters:

  • api_key (required) - Your API key

Response: 200 success, 403 invalid key

Authentication

All API requests require a valid API key passed as a query parameter. Get your API key from your dashboard after signing up.

Error Handling

The API returns standard HTTP status codes:

  • 400 Bad Request - Missing or invalid parameters
  • 403 Forbidden - Invalid API key
  • 404 Not Found - Barcode not in database
  • 500 Server Error - Internal processing error

Code Examples

Python
import requests

endpoint = "https://barcodereport.com/api/search_barcode"
params = {"barcode": "061500127178", "api_key": "your_api_key"}

response = requests.get(endpoint, params=params)
data = response.json()
print(data)
JavaScript
const endpoint = "https://barcodereport.com/api/search_barcode";
const params = new URLSearchParams({
  barcode: "061500127178",
  api_key: "your_api_key"
});

fetch(`${endpoint}?${params}`)
  .then(res => res.json())
  .then(data => console.log(data));
PHP
$endpoint = "https://barcodereport.com/api/search_barcode";
$params = http_build_query([
    "barcode" => "061500127178",
    "api_key" => "your_api_key"
]);

$response = file_get_contents("{$endpoint}?{$params}");
$data = json_decode($response, true);
print_r($data);
Ruby
require "net/http"
require "json"

uri = URI("https://barcodereport.com/api/search_barcode")
uri.query = URI.encode_www_form(barcode: "061500127178", api_key: "your_api_key")

response = Net::HTTP.get_response(uri)
data = JSON.parse(response.body)
puts data

Ready to Get Started?

Sign up for free and get your API key today.

Sign Up Free