Suggest
curl --request POST \
--url https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prefix": "oat"
}
'import requests
url = "https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest"
payload = { "prefix": "oat" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prefix: 'oat'})
};
fetch('https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prefix' => 'oat'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest"
payload := strings.NewReader("{\n \"prefix\": \"oat\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prefix\": \"oat\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prefix\": \"oat\"\n}"
response = http.request(request)
puts response.read_body{
"count": 8,
"lang": "en",
"observed_at_ms": 1791942140987,
"options": [
{
"id": "en:oat",
"taxonomy": "category",
"text": "Oat"
},
{
"id": "en:oat-blenders",
"taxonomy": "brand",
"text": "Oat Blenders"
},
{
"id": "en:oat-brans",
"taxonomy": "category",
"text": "Oat bran"
},
{
"id": "en:oat-flakes",
"taxonomy": "category",
"text": "Oat flakes"
},
{
"id": "en:cooked-oat-flakes",
"taxonomy": "category",
"text": "Oat flakes cooked in water"
},
{
"id": "en:oat-flours",
"taxonomy": "category",
"text": "Oat flours"
},
{
"id": "en:oat-groats",
"taxonomy": "category",
"text": "Oat groats"
},
{
"id": "en:oat-milk-yogurts",
"taxonomy": "category",
"text": "Oat milk yogurts"
}
],
"prefix": "oat",
"taxonomies": [
"category",
"brand"
]
}Open Food Facts
Suggest
Resolve a category, brand, label or country name the user typed into the taxonomy id before filtering with search.
POST
https://api.aisa.one
/
apis
/
v1
/
world-openfoodfacts-org
/
foods
/
suggest
Suggest
curl --request POST \
--url https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prefix": "oat"
}
'import requests
url = "https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest"
payload = { "prefix": "oat" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prefix: 'oat'})
};
fetch('https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prefix' => 'oat'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest"
payload := strings.NewReader("{\n \"prefix\": \"oat\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prefix\": \"oat\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prefix\": \"oat\"\n}"
response = http.request(request)
puts response.read_body{
"count": 8,
"lang": "en",
"observed_at_ms": 1791942140987,
"options": [
{
"id": "en:oat",
"taxonomy": "category",
"text": "Oat"
},
{
"id": "en:oat-blenders",
"taxonomy": "brand",
"text": "Oat Blenders"
},
{
"id": "en:oat-brans",
"taxonomy": "category",
"text": "Oat bran"
},
{
"id": "en:oat-flakes",
"taxonomy": "category",
"text": "Oat flakes"
},
{
"id": "en:cooked-oat-flakes",
"taxonomy": "category",
"text": "Oat flakes cooked in water"
},
{
"id": "en:oat-flours",
"taxonomy": "category",
"text": "Oat flours"
},
{
"id": "en:oat-groats",
"taxonomy": "category",
"text": "Oat groats"
},
{
"id": "en:oat-milk-yogurts",
"taxonomy": "category",
"text": "Oat milk yogurts"
}
],
"prefix": "oat",
"taxonomies": [
"category",
"brand"
]
}Request contract
- Method and path: POST /apis/v1/world-openfoodfacts-org/foods/suggest
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/world-openfoodfacts-org/foods/suggest
{
"operationId": "world-openfoodfacts-org.foods.suggest",
"method": "POST",
"path": "/apis/v1/world-openfoodfacts-org/foods/suggest",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"prefix": "oat",
"size": 8,
"taxonomies": [
"category",
"brand"
]
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"lang": {
"description": "Language of the names to match and return; default `en`. Pattern: ^[a-z]{2}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"prefix": {
"description": "Typed text to complete, e.g. `oat`.",
"type": "string"
},
"size": {
"description": "Maximum number of options; default 10.\n\nProvider reference: minimum 1; maximum 50.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 50,
"min": 1
}
},
"taxonomies": {
"description": "Taxonomies to complete in; default `category` and `brand`.",
"items": {
"type": "string"
},
"type": "array",
"x-alexandria-option-metadata": {
"in": "body"
}
}
},
"required": [
"prefix"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
application/json
Response
Autocomplete Open Food Facts taxonomy entries (categories, brands, labels, countries) from a typed prefix, returning the canonical ids (en:oat-milks, en:france) that search filters accept together with their display names.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
count | number | |
lang | string | |
observed_at_ms | number | |
options | object[] | |
prefix | string | |
taxonomies | string[] |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.