# Random Pun API

> Random Pun retrieves a random pun and its topic category on every request. Each call supplies the full pun text, with paid plans adding an additional humor rating score.

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

## Overview

Random Pun returns one random pun with its topic category each time you call it, with no parameters to set. Use it as a pun generator for chatbots, newsletters and loading screens, or for a pun of the day in an app, email footer or team chat.

Each response holds the full text of the joke on a single line and the category it belongs to, so you can show the theme alongside it or skip ones that do not fit your audience.

The Free plan returns the pun and its category. Paid plans add a numeric humor rating from the source collection, which you can use to keep only the most popular puns.

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

## Response fields

- `category` — string · Category or theme of the pun content
- `rating` — number · Popularity score from 1 to 5, based on how often the pun recurs across the source joke archive · (premium)
- `pun` — string · Full text of the random pun

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "category": "Family, Parents",
    "rating": 2,
    "pun": "There was this guy who decided he wanted to live with his gay friends in a nudest colony and so he up and quit his job, and moved. He was really happy until he got a letter from his grandma. She told him he was about to die and wanted a picture of him. He got his friend to take a picture of him, and sice he had no clothes, he cut the picture in half. A few weeks later he received another letter from his grandma telling him he needed to get a haircut because it made his nose look long.... he soon realized he had sent her the wrong half."
  }
}
```

## Use cases

- **Daily Standup Icebreakers** — Chat bots send a pun and category to team channels every morning to start meetings with a quick laugh.
- **Gaming Loading Screens** — To keep players entertained during long loading screens, video games fetch a pun to show between levels.
- **Newsletter Footer Jokes** — Email newsletters inject a fresh joke into the footer section of automated weekly subscriber digests.
- **Smart Speaker Skills** — When users ask for humor, smart speaker apps pull pun text to read aloud over audio.

## SDKs

- **npm** — `npm install @apiverve/randompun` (https://www.npmjs.com/package/@apiverve/randompun)
- **PyPI** — `pip install apiverve-randompun` (https://pypi.org/project/apiverve-randompun/)
- **NuGet** — `dotnet add package APIVerve.API.RandomPun` (https://www.nuget.org/packages/APIVerve.API.RandomPun)
- **Source** — https://github.com/apiverve/randompun-api

## More

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