Food E-Additives Recognition API

Food E-Additives Recognition API - FoodEs is a cross browsers REST API which get a JSON input with a still photo (as base64 encoded string), containing food label with E-Additives codes like E100, E200 etc. and returns a JSON string which contains details of the eCodes detected and recognized in the label or input text. Those details include: name of the E-Additive, categories in which the E-Additive is used, restrictions or limitations of the E-Additive for each category of food. Of course, there are some limitations in order to get a higher accuracy. We recommend properly exposed, unobstructed JPEG photos at 1920x1080 (full HD resolution) where ratio between height of the eCode and height of entire picture should be at least 1:15. For ratios like 1:16, 1:17, 1:18 and so on the accuracy is lower and the AI algorithm may not see and read the eCode. We do not store pictures.

Allthough this Food E-Additives Detection API (currently we do not offer a Food E-Additives Recognition sdk) is intended for software development and therefore developers, we have also here a Food E-Additives Recognition online application that may be used to check the input and output JSONs of the API. The necessary steps are written below, basically for this real time Food E-Additives Recognition API you send an authorized POST request in JSON format to the API endpoint and you get as JSON response the output as described below through parameters and examples.

This Food E-Additives Detection API is useful for a large number of domains like: food processors, retailers, customers, IT developers etc. You own the commercial copyright of the resulted JSON with no additional fee meaning you may use it in your own apps for sale.

For using our Food E-Additives Recognition API and/or APP you must create an account (free of charge, no card required), activate it from your received email, login and then start your TRIAL package with no fees as you can see at our pricing packages. After you have tested the API and/or APP and you are satisfied, you may buy a paid package. You will always see at your Admin Console page the real resources consumption in real time, your invoices, you may see/edit/delete your profile or export log consents as GDPR instructed, you may read our FAQs.

Food E-Additives Recognition APP

Photo File
Text with eCodes separated by ";"
* Let the "NO" value of Text eCodes if you upload a Photo File, otherwise write the eCodes separated by ";"



API Endpoint (method POST):
https://gatiosoft.ro/foodes.aspx
Headers:
Authorization: Basic //Your username:password are base64 encoded string
Content-Type: application/json
Accept: application/json
JSON Request Body (change inputs here and see in real time below):
                   {
  "base64ImageString": "iVBORw0KGgoAAAA...base64 encoded string photo...GAAAAAElFTkSuQmCC",
  "eCode": "NO"
}
               
JSON Response From API (change inputs here and see in real time below):
[
  {
    "eCode": "E100",
    "eName": "Curcumin",
    "categoryNo": "14.2.7.2",
    "category": "Aromatised wine-based drinks (14.2.7.2)",
    "restriction": "ML = 100 mg/l, only bitter soda"
  },
  {
    "eCode": "E101",
    "eName": "Riboflavins",
    "categoryNo": "04.2.3",
    "category": "Canned or bottled fruit and vegetables (4.2.3)",
    "restriction": "quantum satis only preserves of red fruit"
  }
]
JSON Response (Example) From API in case of ERROR:

 [
  {
    "cd": "1001",
    "description": "The authorization header Is either empty Or isn't Basic"
  }
]

Request Parameters Table

Parameter Name
Parameter Description
base64ImageString
This is the food label input photo as base64 encoded string [string] from which will be detected and recognized eCodes.
eCode
This is the text eCodes input [string] separated by ";" if you do not want to upload a photo. If you upload a photo, the value of this parameter must be NO.

Response Parameter Table

Parameter Name
Parameter Description
eCode  
This is the recognized eCode as  [string] at the moment that request is made. Example: E100
eName 
This is the name of the eCode [string] parameter described above. Example: Curcumin
categoryNo
This is the category number [string] of the eCode described above. Example: 14.2.7.2
category
This is the category [string] of the eCode described above.
Example: Aromatised wine-based drinks (14.2.7.2)
restriction
This is the maximum limit [string] for using the eCode in certain conditions for certain categories of food.
Example: ML = 100 mg/l, only bitter soda

Response Error Codes Table

Parameter Name
Parameter Description
cd

This is the error code which may be:

  • 1001
  • 1002
  • 1003
  • 1004
  • 1005
  • 1006
  • 1007
  • 1008
  • 1009
  • 1010
  • 1011
  • 1012
  • 1013
  • 1014
  • 1015
  • 1016
  • 2001
description

This is the description of the error code which may be:

  • 1001 - The authorization header is either empty or isn't Basic.
  • 1002 - Daily requests number exceeded in TRIAL mode!
  • 1003 - Trial expired!
  • 1004 - Requests number exceeded!
  • 1005 - Package expired!
  • 1006 - No invoice!
  • 1007 - Reader is NULL for TRIAL!
  • 1008 - Cannot Read if TRIAL exists!
  • 1009 - Error connecting to database looking for TRIAL! (and a detailed description message of the encountered error)
  • 1010 - Reader is NULL for Invoice!
  • 1011 - Cannot Read if Invoice exists!
  • 1012 - Error connecting to database! (and a detailed description message of the encountered error)
  • 1013 - Input request too long! Maximum 5 MB per request are allowed / Nothing to upload
  • 1014 - Invalid request data! (and a detailed description message of the encountered error)
  • 2001 - Invalid request data after passing to the API (and a detailed description message of the encountered error)

Source Code Examples for Using Our Food E-Additives Recognition API

                       
Imports System
Imports System.Text
imports System.Collections.Generic
Imports System.Net
Imports Newtonsoft.Json

Public Class food_e_additives_recognition_api
    Public Class ResponseFields
	 Public Property eCode As String
         Public Property eName As String
         Public Property categoryNo As String
         Public Property category As String
         Public Property restriction As String
    End Class

    Public Class ErrorFields
        Public Property cd As String
        Public Property description As String
    End Class

    Protected Sub SendRequest()
        Dim Client As WebClient = New WebClient()
        Dim credentials As String = Convert.ToBase64String(Encoding.ASCII.GetBytes("your_username:your_password"))
        Client.Headers(HttpRequestHeader.Authorization) = String.Format("Basic {0}", credentials)
        Client.Headers(HttpRequestHeader.Accept) = "application/json"
        Client.Headers(HttpRequestHeader.ContentType) = "application/json"
	Client.BaseAddress = "https://gatiosoft.ro/foodes.aspx"
        Dim resString As String = ""

        Try
            Dim js As String = "Replace this string with your JSON Request Body string like in the example above on the website"
            Dim reqString As Byte() = Encoding.UTF8.GetBytes(js)
            Dim url As Uri = New Uri(Client.BaseAddress)
            Dim resByte As Byte() = Client.UploadData(url, "post", reqString)
            resString = Encoding.UTF8.GetString(resByte)

	    If resString.IndexOf("eCode") > 0 Then
                Dim r As ResponseFields = New list (Of ResponseFields()
                r = JsonConvert.DeserializeObject(Of list (Of ResponseFields))(resString)
                Console.Write(resString)
            Else
		Dim e As list(Of ErrorFields) = New list(Of ErrorFields)
		e = JsonConvert.DeserializeObject(Of list(Of ErrorFields))(resString)
                Console.Write(e(0).cd)
                Console.Write(e(0).description)
            End If

            Client.Dispose()
        Catch exception As Exception
            Dim ex As System.Exception = exception
            Console.Write("ERROR: " & resString & ex.Message)
        End Try
    End Sub

    Public Shared Sub Main()
	Dim b As food-e-additives-recognition_api = New  food-e-additives-recognition_api
        b.SendRequest()
    End Sub
End Class



FoodEs Online Video Presentation

Food E-Additives Recognition API, foodes is in the video presentation below. There are several search terms which you may use like: Food E-Additives Recognition sdk, Food E-Additives Detection c#, Food E-Additives Recognition online, automatic Food E-Additives Recognition, Food E-Additives Recognition python, real time Food E-Additives Detection python.

 



Pricing Packages

Please choose one of the below pricing packages for start using our Food E-Additives Recognition API and online APP!

Start TRIAL
No catches

  • 7 days TRIAL
  • Use our cloud REST API and online APP
  • Maximum 50 requests per DAY in trial period
  • You do NOT own the commercial copyright for using the API in your apps in trial period.
  • Get eCode Name, category number, category, restrictions for each eCode detected in one photo or input text.
  • Unlimited Devices
  • Administration console
  • Support through online chat and/or tickets
  • We do NOT allow spam accounts for TRIAL



Monthly TIER
Popular

  • 80 USD per month
  • Use our cloud REST API and online APP
  • Maximum 10000 requests(*) per month
  • Maximum 50 requests per MINUTE
  • You own the commercial copyright to use it in your apps.
  • Get eCode Name, category number, category, restrictions for each eCode detected in one photo or input text.
  • Unlimited Devices
  • Administration console
  • Premium support through online chat and/or tickets, very supportive help and quick responses.



Yearly TIER
(15% Discount)

  • 816 USD per year
  • Use our cloud REST API and online APP
  • Maximum 10000 predictions(*) per month
  • Maximum 50 requests per MINUTE
  • You own the commercial copyright to use it in your apps.
  • Get eCode Name, category number, category, restrictions for each eCode detected in one photo or input text.
  • Unlimited Devices
  • Administration console
  • Premium support through online chat and/or tickets, very supportive help and quick responses.



Note: VAT rate may be added or not, function to your country and/or if you are a taxable person or company.
DISCLAIMER: We are using the English version of the database at https://ec.europa.eu/food/safety/food-improvement-agents/additives_en The database may be incomplete and it is NOT free of errors, so the result(s) is(are) just informational. We decline any responsibility or liability whatsoever for errors or deficiencies in this database.