# Advice Generator API

> Advice Generator supplies random pieces of advice on demand. Each response includes a unique advice identifier, the advice quote, and the language code.

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

## Overview

Send a GET request without parameters to fetch an advice entry. The endpoint responds with a random advice string, its unique identifier, and a language code indicating the text language. Calls execute on demand, returning one advice slip per request.

## 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/advice" \
  -H "x-api-key: YOUR_API_KEY"
```

## Response fields

- `id` — string · Unique identifier for the generated advice entry
- `advice` — string · The randomly generated piece of advice text
- `lang` — string · Language code of the generated advice

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "id": "3xx4VZSZ",
    "advice": "Be creative and innovative.",
    "lang": "en"
  }
}
```

## Use cases

- **Discord Bot Command** — Chatbot developers fetch a quick piece of advice whenever a community member types a designated advice trigger command.
- **Daily Wisdom Notifications** — To keep users engaged during morning routines, wellness apps pull a fresh advice slip to send as a push notification.
- **Loading Screen Distraction** — Display a thoughtful advice quote on application progress screens while users wait for slow background jobs to finish.
- **Terminal Login Greeting** — When an engineer opens a new terminal session, internal developer tools render a random tip on login.

## SDKs

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

## More

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