---
title: "Food Search & Trivia API"
slug: food-search-trivia-api
url: https://apyhub.com/skycraft/service/food-search-trivia-api
provider: Skycraft
categories: [Artificial Intelligence]
tags: [food-search, recipe-discovery, food-videos, image-classification, chatbot, content-search]
auth: api_key
version: 2.0.2
service_type: sync
endpoints: 9
atoms: 20
mcp: true
---

# Food Search & Trivia API

Search food content, classify food images, and get food chatbot responses. Returns recipes, videos, trivia, jokes, and structured search results.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/trivia/random` | What it does Returns a random food trivia item as a JSON object. Response Returns a JSON object wit… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/jokes/random` | What it does Returns a random food joke as a JSON object containing a single text string. Response… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse/suggest` | What it does Returns conversation suggestion data for a given query string. The endpoint accepts a… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/classify` | What it does Classifies an image from a URL and returns the predicted food category together with a… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/analyze` | What it does Analyzes an image provided by URL and returns identified category information, nutriti… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse` | What it does Sends a text query to the chatbot and returns a JSON object containing the chatbot’s a… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/search` | What it does Searches the food catalog for items matching a query string and returns a JSON object… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/site/search` | What it does Searches site content for the supplied query string and returns matching results group… | 20 |
| GET | `https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/videos/search` | What it does Searches for food-related videos using query parameters and returns a JSON object cont… | 20 |

## Endpoint reference

### Random Food Trivia

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/trivia/random` · 20 atoms · accepts `application/json` · returns `application/json`

#### Quickstart

Get a random food trivia fact.

```bash
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.

```json
{
  "text": "Bananas are berries, but strawberries are not."
}
```

### Random Food Joke

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/jokes/random` · 20 atoms · accepts `application/json` · returns `application/json`

#### Quickstart

Fetch a random food joke with your API token.

```bash
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.

```json
{
  "text": "Why did the tomato turn red? Because it saw the salad dressing."
}
```

### Conversation Suggests

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse/suggest` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | query | string | yes | Example: `tell`. |
| `number` | query | number | no | Example: `5`. |

#### Quickstart

Use the `query` parameter to get food conversation suggestions.

```bash
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.

```json
{
  "suggests": {
    "_": [
      {
        "name": "pizza"
      }
    ]
  },
  "words": [
    "pizza",
    "pasta"
  ]
}
```

### Image Classification by URL

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/classify` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `imageUrl` | query | string | yes | Example: `https://spoonacular.com/recipeImages/635350-240x150.jpg`. |

#### Quickstart

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

```bash
curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/classify?imageUrl=https%3A%2F%2Fspoonacular.com%2FrecipeImages%2F635350-240x150.jpg" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

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

```json
{
  "category": "pizza",
  "probability": 0.98
}
```

### Image Analysis by URL

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/analyze` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `imageUrl` | query | string | yes | Example: `https://spoonacular.com/recipeImages/635350-240x150.jpg`. |

#### Quickstart

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

```bash
curl -X GET "https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/images/analyze?imageUrl=https%3A%2F%2Fspoonacular.com%2FrecipeImages%2F635350-240x150.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).

```json
{
  "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": []
}
```

### Talk to Chatbot

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/converse` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | query | string | yes | Example: `donut recipes`. |
| `contextId` | query | string | no | Example: `342938`. |

#### Quickstart

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

```bash
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`.

```json
{
  "answerText": "Here are some donut recipes you can try.",
  "media": [
    {
      "link": "https://example.com/donut-recipes",
      "title": "Donut recipes"
    }
  ]
}
```

### Search All Food

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/search` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | query | string | yes | Example: `apple`. |
| `number` | query | integer | no | Default: `10`. Example: `10`. |
| `offset` | query | integer | no |  |

#### Quickstart

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

```bash
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`.

```json
{
  "query": "apple",
  "totalResults": 1,
  "limit": 10,
  "offset": 0,
  "searchResults": [
    {
      "name": "Apple",
      "totalResults": 1,
      "results": [
        {
          "id": 1,
          "name": "Apple"
        }
      ]
    }
  ]
}
```

### Search Site Content

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/site/search` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | query | string | yes | Example: `past`. |

#### Quickstart

Search for food-related matches by query string.

```bash
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`.

```json
{
  "Articles": [],
  "Grocery Products": [],
  "Menu Items": [],
  "Recipes": []
}
```

### Search Food Videos

`GET https://api.eu.apyhub.com/skycraft/food-search-trivia-api/food/videos/search` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `diet` | query | string | no | Example: `vegetarian`. |
| `type` | query | string | no | Example: `main course`. |
| `query` | query | string | yes | Example: `burger`. |
| `number` | query | integer | no | Default: `10`. Example: `10`. |
| `offset` | query | integer | no |  |
| `cuisine` | query | string | no | Example: `italian`. |
| `maxLength` | query | number | no | Example: `999`. |
| `minLength` | query | number | no | Example: `0`. |
| `excludeIngredients` | query | string | no | Example: `eggs`. |
| `includeIngredients` | query | string | no | Example: `tomato,cheese`. |

#### Quickstart

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

```bash
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.

```json
{
  "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
}
```

## About

## 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.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/skycraft/service/food-search-trivia-api
