Menu

I turned a joke product generator into a real API (and a CLI, and a faker.js plugin)
πŸ–ΌοΈ

I turned a joke product generator into a real API (and a CLI, and a faker.js plugin)

DEV CommunityΒ·kafkΒ·6 months ago
#1QmWvH6B
#ai#api#webdev#opensource#anycrap
Reading 0:00
15s threshold

A while back I built Anycrap β€” a fake store full of absurdist AI-generated products. It hit #1 on Hacker News, got way more traffic than expected.

Here's what exists now.

REST API

35,000+ products with names, descriptions, AI images, and 23 categories. Free key, no credit card.

curl https://anycrap.shop/api/v1/products/random \ -H "Authorization: Bearer YOUR_KEY"

Enter fullscreen mode

Exit fullscreen mode

60 req/min, CORS included, OpenAPI spec available at /api/v1/docs .

CLI

npx anycrap random npx anycrap random -c food npx anycrap search "underwater" npx anycrap categories

Enter fullscreen mode

Exit fullscreen mode

faker.js plugin

Drop-in replacement for faker.commerce.productName() β€” no API call, bundled data, works offline.

import { faker } from ' @faker-js/faker ' ; import { createAnycrapFaker } from ' anycrap-faker ' ;

const anycrap = createAnycrapFaker ( faker );

anycrap . productName () // "Thought-Cancelling Headphones" anycrap .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.