API v2
The original Open Food Facts API for comprehensive product data access and management - stable, production-ready, and widely adopted
Open Food Facts API v2
The original Open Food Facts API provides comprehensive access to the world's largest collaborative food database. This mature, stable API offers reliable endpoints for accessing product information, nutrition data, images, and extensive product metadata.
API v2 is the stable, production-ready API that powers thousands of applications and services worldwide. It provides excellent backward compatibility, extensive functionality, and has been battle-tested in production environments.
API Categories
Products
Retrieve and manage product information, including barcode lookup and product updates
Search
Search for products using various criteria and filters
Images
Upload, crop, rotate, and manage product images with OCR processing
Authentication
Session management, user authentication, and access control mechanisms
Personal Search
Personalized product searches with preference management and filtering
Nutrients
Access nutrition data and nutrient information for products
OCR
Optical Character Recognition for extracting text from product images
Suggestions
Get suggestions for product data completion and improvements
Base URL
All API v2 requests should be made to:
https://world.openfoodfacts.org
Core Capabilities
Retrieve comprehensive product information including nutrition facts, ingredients, allergens, and metadata
Access products and data in multiple languages with proper localization and country-specific information
Upload, crop, rotate, and manage product images with automatic OCR processing and quality validation
Perform complex searches with filters, sorting, faceting, and geographic constraints
Contribute new products and update existing information with validation and quality checks
Efficiently handle multiple product operations with optimized endpoints and bulk processing
Key Features
Data Access
- Comprehensive Coverage: Nutrition facts, ingredients, images, packaging, and environmental data
- Real-time Updates: Access to the latest product information and contributions
- Historical Data: Track changes and maintain audit trails for product information
- Quality Metrics: Access to data quality scores and completeness indicators
Integration Features
- RESTful Design: Standard HTTP methods and predictable URL patterns
- Multiple Formats: JSON, XML, and HTML response formats
- CORS Support: Cross-origin requests for web applications
- Rate Limiting: Fair usage policies with clear limits and headers
Most read operations are public and don't require authentication. Write operations require user credentials for data integrity and attribution.
Common Use Cases
For Developers
- Product Lookup: Get detailed information using barcodes, product IDs, or search queries
- Nutrition Analysis: Access comprehensive nutrition data for dietary and health applications
- Image Processing: Upload and manage product photos for improved data quality
- Data Contribution: Add or update product information to support the open data community
For Applications
- Mobile Apps: Barcode scanning and product information display
- E-commerce: Product catalog enrichment and nutrition labeling
- Research: Food industry analysis and nutritional studies
- Compliance: Regulatory reporting and ingredient analysis
Getting Started
Start with the Get Product by Barcode endpoint to understand the data structure
Learn about authentication requirements for different operations
Use the sandbox environment to test your integration
Deploy with proper error handling and rate limiting
Important: Always include the json=1
parameter to receive responses in
JSON format. Without it, responses will be in HTML format intended for web
browsers.
Migration to v3
API v3 Available: Consider migrating to API v3 for new projects. It offers improved performance, better error handling, and modern RESTful design patterns while maintaining compatibility with Open Food Facts data.