apyhub
Back
▣ ARTIFICIAL INTELLIGENCE

Food Search & Trivia API

What it does

Food Search gives you food discovery, media lookup, and conversational food responses in one API. Send a search query, image URL, or text prompt, and get structured results back for recipes, menu items, grocery products, videos, trivia, jokes, and chatbot answers.

Use /food/search to search across food content with query, and optionally number and offset. Use /food/site/search to look up site content by query across Recipes, Articles, Menu Items, and Grocery Products. For richer discovery, /food/videos/search supports query plus filters like diet, type, cuisine, includeIngredients, excludeIngredients, minLength, maxLength, number, and offset, returning video metadata and totalResults.

If you work with images, /food/images/classify accepts an imageUrl and returns a category with probability. /food/images/analyze also takes imageUrl, and returns nutrition, category, and matching recipes. For text-based workflows, /food/detect accepts a body with text and returns annotations, while /food/converse and /food/converse/suggest provide answerText, media, suggests, and words for food-focused chat flows.

You can also generate lightweight engagement content with /food/trivia/random and /food/jokes/random, both returning a single text field. This makes Food Search useful for recipe apps, content sites, assistants, and product experiences that need food search, classification, and conversational output without building the logic yourself.

▣ ENDPOINT 01 / 09
GET
Random Food Trivia
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/trivia/random

QUICKSTART

GUIDE

Quickstart

Get a random food trivia fact.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/trivia/random" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a required text string field containing the trivia fact.

{
  "text": "Bananas are berries, but strawberries are not."
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns a random food trivia item as a JSON object.

Response

Returns a JSON object with a text string field containing the trivia text. Success response shape: 200 OK.

ParameterTypeDescription
textStringThe trivia text. Must be a non-empty string.
▣ ENDPOINT 02 / 09
GET
Random Food Joke
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/jokes/random

QUICKSTART

GUIDE

Quickstart

Fetch a random food joke with your API token.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/jokes/random" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a text string field containing the joke.

{
  "text": "Why did the tomato turn red? Because it saw the salad dressing."
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns a random food joke as a JSON object containing a single text string.

Response

Returns a JSON object with a text string field containing the joke text.

ParameterTypeDescription
textStringThe joke text.
▣ ENDPOINT 03 / 09
GET
Conversation Suggests
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse/suggest

QUICKSTART

GUIDE

Quickstart

Use the query parameter to get food conversation suggestions.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse/suggest?query=tell" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with two top-level fields: suggests and words.

  • words is an array of strings.
  • suggests is an object with a required _ field, where _ is an array of objects; each object contains a name string.
{
  "suggests": {
    "_": [
      {
        "name": "pizza"
      }
    ]
  },
  "words": [
    "pizza",
    "pasta"
  ]
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns conversation suggestion data for a given query string. The endpoint accepts a query parameter input and responds with a JSON object containing suggests and words.

Query Parameter(s)

AttributeTypeDescription
queryStringSearch text to generate suggestions from.
numberNumberNumber of suggestions to return.

Response

Returns a JSON object with two top-level fields: suggests is an object, and words is an array of strings. The success response shape is defined by the schema and includes nested suggestion entries under suggests._.

AttributeTypeDescription
suggestsObjectObject containing the _ array of suggestion items.
suggests._Object ArrayArray of suggestion objects. Each item includes a name string field with at least 1 character.
suggests._[].nameStringSuggestion name.
wordsString ArrayArray of strings related to the response.
▣ ENDPOINT 04 / 09
GET
Image Classification by URL
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/classify

QUICKSTART

GUIDE

Quickstart

Classify a food image by passing its image URL as a query parameter.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/classify?imageUrl=https://assets.apyhub.com/samples/recipe.jpg" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a category string and a probability number.

{
  "category": "pizza",
  "probability": 0.98
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Classifies an image from a URL and returns the predicted food category together with a probability score.

Query Parameter(s)

AttributeTypeDescription
imageUrlStringThe image URL to classify.

Response

Returns a JSON object with two top-level fields: category as a string and probability as a number. The category is the predicted classification label, and probability is the associated score.

ParameterTypeDescription
categoryStringPredicted classification label.
probabilityNumberProbability score for the classification.
▣ ENDPOINT 05 / 09
GET
Image Analysis by URL
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/analyze

QUICKSTART

GUIDE

Quickstart

Analyze a food image by passing its image URL as a query parameter.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/analyze?imageUrl=https://assets.apyhub.com/samples/recipe.jpg" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with three top-level fields: nutrition (an object with nutrition estimates), category (an object with the predicted food category), and recipes (an array of matching recipe objects).

{
  "nutrition": {
    "recipesUsed": 0,
    "calories": {
      "value": 0,
      "unit": "kcal",
      "confidenceRange95Percent": { "min": 0, "max": 0 },
      "standardDeviation": 0
    },
    "fat": {
      "value": 0,
      "unit": "g",
      "confidenceRange95Percent": { "min": 0, "max": 0 },
      "standardDeviation": 0
    },
    "protein": {
      "value": 0,
      "unit": "g",
      "confidenceRange95Percent": { "min": 0, "max": 0 },
      "standardDeviation": 0
    },
    "carbs": {
      "value": 0,
      "unit": "g",
      "confidenceRange95Percent": { "min": 0, "max": 0 },
      "standardDeviation": 0
    }
  },
  "category": {
    "name": "dessert",
    "probability": 0.98
  },
  "recipes": []
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Analyzes an image provided by URL and returns identified category information, nutrition estimates, and matching recipes. The request takes the image URL as a query parameter.

Query Parameter(s)

AttributeTypeDescription
imageUrlStringURL of the image to analyze.

Response

Returns a JSON object with three required top-level fields: nutrition (object), category (object), and recipes (array of objects).

AttributeTypeDescription
nutritionObjectNutrition analysis object containing recipesUsed and estimates for calories, fat, protein, and carbs.
categoryObjectDetected food category, including name and probability.
recipesObject ArrayArray of recipe objects, each containing id, title, imageType, and url.
▣ ENDPOINT 06 / 09
GET
Talk to Chatbot
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse

QUICKSTART

GUIDE

Quickstart

Ask the endpoint a food-related question by passing the required text query parameter.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse?text=donut%20recipes" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with an answerText string and a media array. answerText contains the reply text, and each item in media is an object that may include link, image, and title.

{
  "answerText": "Here are some donut recipes you can try.",
  "media": [
    {
      "link": "https://example.com/donut-recipes",
      "title": "Donut recipes"
    }
  ]
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Sends a text query to the chatbot and returns a JSON object containing the chatbot’s answer text and any related media entries.

Query Parameter(s)

AttributeTypeDescription
textStringThe text prompt to send to the chatbot.
contextIdStringAn optional context identifier to continue or reference a prior conversation.

Response

Returns a JSON object with an answerText string field and a media array field. answerText contains the chatbot’s response text, and media contains zero or more media objects.

ParameterTypeDescription
answerTextStringThe chatbot’s answer text.
mediaObject ArrayAn array of media objects associated with the response.
media[].linkStringA link associated with the media item.
media[].imageStringAn image value associated with the media item.
media[].titleStringThe media item’s title.
▣ ENDPOINT 07 / 09
GET
Search All Food
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/search

QUICKSTART

GUIDE

Quickstart

Search for foods by query string using the required query parameter.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/search?query=apple" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with query (string), totalResults (integer), limit (integer), offset (integer), and searchResults (array). searchResults contains objects with name and totalResults, and each result item may include fields like id, link, name, type, image, content, kvtable, and relevance.

{
  "query": "apple",
  "totalResults": 1,
  "limit": 10,
  "offset": 0,
  "searchResults": [
    {
      "name": "Apple",
      "totalResults": 1,
      "results": [
        {
          "id": 1,
          "name": "Apple"
        }
      ]
    }
  ]
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Searches the food catalog for items matching a query string and returns a JSON object with the search metadata and grouped search results. The response includes the original query, totalResults, limit, offset, and a searchResults array.

Query Parameter(s)

AttributeTypeDescription
queryStringSearch term to look up.
numberIntegerNumber of results to return per page. Default: 10; minimum: 1; maximum: 100.
offsetIntegerZero-based result offset for pagination. Minimum: 0; maximum: 900.

Response

Returns a JSON object with query (string), totalResults (integer), limit (integer), offset (integer), and searchResults (array) fields.

ParameterTypeDescription
queryStringThe query string used for the search.
totalResultsIntegerTotal number of matching results.
limitIntegerThe result limit applied in the response.
offsetIntegerThe result offset applied in the response.
searchResultsObject ArrayArray of grouped search result objects. Each item includes name and totalResults, and may include a results array.
searchResults[].nameStringGroup name.
searchResults[].totalResultsIntegerTotal number of results in the group.
searchResults[].resultsObject ArrayArray of result objects. Each item may include id, link, name, type, image, content, kvtable, and relevance.
searchResults[].results[].idIntegerResult identifier.
searchResults[].results[].linkStringResult link. Nullable in the schema.
searchResults[].results[].nameStringResult name.
searchResults[].results[].typeStringResult type.
searchResults[].results[].imageStringResult image.
searchResults[].results[].contentStringResult content. Nullable in the schema.
searchResults[].results[].kvtableStringKey-value table data.
searchResults[].results[].relevanceNumberResult relevance score.
▣ ENDPOINT 08 / 09
GET
Search Site Content
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/site/search

QUICKSTART

GUIDE

Quickstart

Search for food-related matches by query string.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/site/search?query=past" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with four required top-level arrays: Articles, Grocery Products, Menu Items, and Recipes. Each array contains result objects with at least a name field, and may also include id, link, type, image, content, kvtable, and relevance.

{
  "Articles": [],
  "Grocery Products": [],
  "Menu Items": [],
  "Recipes": []
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Searches site content for the supplied query string and returns matching results grouped into four arrays: Recipes, Articles, Menu Items, and Grocery Products.

Query Parameter(s)

AttributeTypeDescription
queryStringSearch term to match against site content.

Response

Returns a JSON object with four required array fields: Articles, Grocery Products, Menu Items, and Recipes. Each array contains objects with site-content result details, and each item is required to include name.

ParameterTypeDescription
ArticlesObject ArrayMatching article results. Each item includes name and may also include id (Integer), link (String, nullable), type (String), image (String), content (String, nullable), kvtable (String), and relevance (Number).
Grocery ProductsObject ArrayMatching grocery product results. Each item includes name and may also include id (Integer), link (String, nullable), type (String), image (String), content (String, nullable), kvtable (String), and relevance (Number).
Menu ItemsObject ArrayMatching menu item results. Each item includes name and may also include id (Integer), link (String, nullable), type (String), image (String), content (String, nullable), kvtable (String), and relevance (Number).
RecipesObject ArrayMatching recipe results. Each item includes name and may also include id (Integer), link (String, nullable), type (String), image (String), content (String, nullable), kvtable (String), and relevance (Number).
▣ ENDPOINT 09 / 09
GET
Search Food Videos
https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/videos/search

QUICKSTART

GUIDE

Quickstart

Search for food-related videos with a required query string.

curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/videos/search?query=burger" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with videos and totalResults fields. videos is an array of video objects, and each video includes title, length, rating, shortTitle, thumbnail, views, and youTubeId; totalResults is the total number of matching videos.

{
  "videos": [
    {
      "title": "How to Make a Burger",
      "length": 180,
      "rating": 4.8,
      "shortTitle": "Burger",
      "thumbnail": "https://example.com/thumb.jpg",
      "views": 125000,
      "youTubeId": "abc123"
    }
  ],
  "totalResults": 1
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Searches for food-related videos using query parameters and returns a JSON object containing matching videos plus the total number of results.

Query Parameter(s)

AttributeTypeDescription
dietStringDietary preference filter.
typeStringRecipe/video type filter.
queryStringSearch query term.
numberIntegerNumber of results to return. Default: 10. Minimum: 1, maximum: 100.
offsetIntegerResult offset for pagination. Minimum: 0, maximum: 900.
cuisineStringCuisine filter.
maxLengthNumberMaximum video length.
minLengthNumberMinimum video length.
excludeIngredientsStringIngredients to exclude.
includeIngredientsStringIngredients to include, comma-separated.

Response

Returns a JSON object with a videos array and a totalResults integer field. The videos array contains video objects, each with title, views, length, rating, thumbnail, youTubeId, and shortTitle fields.

ParameterTypeDescription
videosObject ArrayArray of video objects. Each item includes title (String), views (Integer), length (Integer), rating (Number), thumbnail (String), youTubeId (String), and shortTitle (String).
totalResultsIntegerTotal number of matching videos.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.