# Fortune Cookie Generator API

> Fortune Cookie Generator creates authentic fortune cookie messages including wisdom, predictions, advice, humor, and motivational quotes.

**Endpoint:** `GET https://api.apiverve.com/v1/fortunecookie`  
**Category:** Games  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/fortunecookie

## Overview

A free fortune cookie quotes API: each GET request returns one fortune message and its category as JSON, ready for games, entertainment apps, or a fortune cookie of the day feature. The catalogue holds 250 messages, 50 for each of the five types, and an optional type parameter picks one kind.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/fortunecookie?type=humor" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | No | Optional fortune type: wisdom, prediction, advice, humor or motivational (case-insensitive); omitted or unrecognised picks a type at random |

## Response fields

- `fortune` — string · Generated fortune cookie message text content
- `type` — string · Category type of the generated fortune message

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "fortune": "The best time to plant a tree was 20 years ago. The second best time is now.",
    "type": "wisdom"
  }
}
```

## Use cases

- **Gaming Features** — Add fortune cookie features to games with randomized fortune messages for enhanced player engagement
- **Daily Wisdom** — Generate daily wisdom messages and inspirational quotes for apps, websites, and digital products
- **Motivational Content** — Create motivational content and positive affirmations for wellness apps, productivity tools, and lifestyle platforms
- **Entertainment Apps** — Build entertainment and novelty features with authentic fortune cookie messages

## SDKs

- **npm** — `npm install @apiverve/fortunecookie` (https://www.npmjs.com/package/@apiverve/fortunecookie)
- **NuGet** — `dotnet add package APIVerve.API.FortuneCookieGenerator` (https://www.nuget.org/packages/APIVerve.API.FortuneCookieGenerator)
- **Source** — https://github.com/apiverve/fortunecookie-api

## More

- Full reference: https://docs.apiverve.com/ref/fortunecookie
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
