API Documentation

Endpoints

GET a Random Pun

Retrieve a random pun from our collection of humorous wordplay. Use this endpoint to add a touch of humor to your day or integrate puns into your applications for a fun twist. Each request will return a unique pun for your enjoyment.

Request TypeURL
GEThttps://punapi.rest/api/pun

Parameters

NameTypeDescription
none------------------

Request Example

Response Example

200
{
  "id": "23  "
  "pun": "I went to a seafood disco last week... and pulled a mussel."
}

GET Pun BY ID

Retrieve a specific pun by providing its unique identifier (ID).

Request TypeURL
GEThttps://punapi.rest/api/pun/{id}

Parameters

NameTypeDescription
idintThe ID of the pun. This ID can be found in the Search page.

Request Example

Response Example

200
{
  "id": "2"
  "pun": "I would avoid the sushi if I was you. It’s a little fishy."
}

GET Pun(s) by Searching

Retrieve a pun(s) by searching

Request TypeURL
GEThttps://punapi.rest/api/pun/search?{query}

Parameters

NameTypeDescription
querystringKey words that you are looking for

Request Example

Response Example

200
[{
  "id": "4"
 "pun": "Why did the cookie cry? Because his father was a wafer so long!"
}]

GET Pun Meme

Retrieve a random pun meme. The response format will be in JSON with a direct link to the image to adhere to RESTful principles.

Request TypeURL
GEThttps://punapi.rest/api/meme

Parameters

NameTypeDescription
none------------------

Request Example

Response Example

200
{
  "meme": "https://b085hi8rvymugnvm.public.blob.vercel-storage.com/2-bJZtO1TbX8MRhbK4Cx5UFkxHxNjz2C.jpg"
}
GET https://b085hi8rvymugnvm.public.blob.vercel-storage.com/2-bJZtO1TbX8MRhbK4Cx5UFkxHxNjz2C.jpg