Veganify Ingredients API
Status: Service operationalIntroduction
Warning! Veganify API v0 has recently been rewritten from PHP to Node.js! Therefore, some changes, including URIs, are breaking!
The Veganify Ingredients API is a fork of is-vegan with some more languages for recognition added, which is actively maintained and available in Node.js.
How to use
JSON End-Point
The APIs base path is https://api.veganify.app/v0/ingredients/ and gives out a JSON response.
You can find the monitoring status page here.
Parameters
The following parameters are available as of now:
-
The URL-parameter ingredients can be passed directly through the url of the request.
Sample request:
Attention: The ingredients have to be comma and space seperated. Otherwise, the results will be erroneous.
Responses
We use standardized HTTP status codes as responses. Depending on which language you want to use to implement the API in, you may have to disable error-handling or ignore errors.
Positive response
A successful request will throw a result like this:
Please note:
- The field data→flagged will only be present if vegan is false.
Error responses
The following error responses can be expected:
- 400 - Missing required parameter, please make sure you sent at least one of the parameters mentioned in Parameters:
- 404 - Missing required parameter, please make sure you sent at least one of the parameters mentioned in Parameters:
Code examples
PHP
Laravel example:
Python
Javascript
Using Axios (recommended) - Second example is using Axios as a React component in Typescript: