# AI use cases for API Anything (goodnight000/api-anything)

Repo: [goodnight000/api-anything](https://github.com/goodnight000/api-anything) | Use cases: 4 | Page: https://dedupedai.com/use-cases/goodnight000-api-anything/

API Anything is a local TypeScript tool that learns a website's own page requests and saves them as operations that an agent or script can call over MCP, the CLI or TypeScript.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Query a website through a shared spec in minutes: https://dedupedai.com/use-cases/goodnight000-api-anything/query-shared-site-spec/
- Teach a new site operation from its page request: https://dedupedai.com/use-cases/goodnight000-api-anything/teach-operation-from-page-request/
- Let an agent map a site's operations from your goal: https://dedupedai.com/use-cases/goodnight000-api-anything/map-site-from-intent-with-agent/
- Publish a learned site spec after a privacy preview: https://dedupedai.com/use-cases/goodnight000-api-anything/share-spec-after-review-preview/

## How to query a website through a shared spec in minutes with API Anything

Repo: [goodnight000/api-anything](https://github.com/goodnight000/api-anything) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Pull a community-published spec and call a site's operations as JSON instead of browsing it.

**Who it is for:** A developer or agent builder who needs data from a site like Goodreads and does not want to write a scraper or drive a browser.

**The problem:** Browser-driven agents are slow and costly on sites they must navigate page by page.

**The outcome:** The site's data comes back as JSON from one command over plain HTTP, with tier 1 shown in the result.

### Steps

1. `git clone https://github.com/goodnight000/api-anything.git && cd api-anything`
2. `npm ci && npm install -g "$(npm pack --silent)"`
3. `api-anything pull goodreads`
4. `api-anything call goodreads searchBooks q=piranesi`

### Prompt to paste into your agent

```text
Using the api-anything repo at github.com/goodnight000/api-anything, run `api-anything pull <site>` and then `api-anything call <site> <operation> q=<query>` for a query you choose. Expected output is one JSON object with ok set to true and a data array. Verify that ok is true and that tier is 1.
```

### Caveat

The README says the package is not on npm yet, so you must install from a local clone, and it covers only the operations that were taught, not whole sites.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/goodnight000-api-anything/query-shared-site-spec/

## How to teach a new site operation from its page request with API Anything

Repo: [goodnight000/api-anything](https://github.com/goodnight000/api-anything) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Record a site's page request for two example inputs and save it as a callable operation.

**Who it is for:** A developer who needs one specific data view from a site that has no public API, such as the latest stories on a domain in Hacker News.

**The problem:** Writing a request by hand means reading network traffic and rebuilding headers and tokens for every site.

**The outcome:** A named operation that takes a new input, such as a domain, and returns its fields as JSON.

### Steps

1. `git clone https://github.com/goodnight000/api-anything.git && cd api-anything`
2. `npm ci && npm install -g "$(npm pack --silent)"`
3. `api-anything add hn-demo links --trigger 'https://news.ycombinator.com/from?site={domain}' --example domain=github.com --example2 domain=github.io --match path=/from --html '{"items":"tr.athing","fields":{"title":".titleline > a","url":".titleline > a@href"}}'` (inferred, check the README)
4. `api-anything call hn-demo links domain=arxiv.org`

### Prompt to paste into your agent

```text
Using the api-anything repo at github.com/goodnight000/api-anything, add an operation for <site> from the page URL <trigger URL with {placeholder}> using two example inputs, then call it with a new input. Expected output is an ok:true JSON result with data for the new input. Verify that the result uses a value that was not one of the two examples.
```

### Caveat

Creating an operation needs a Chromium browser, and the README says repair can fail and that CAPTCHA challenges must be cleared by hand.

Risk, reverse engineering: The tool records a site's own page requests and rebuilds them as callable operations, so check the site's terms before doing this.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/goodnight000-api-anything/teach-operation-from-page-request/

## How to let an agent map a site's operations from your goal with API Anything

Repo: [goodnight000/api-anything](https://github.com/goodnight000/api-anything) | Difficulty: Intermediate | Time: 60 minutes | Basis: From the README

Describe what you need from a site and let the skill propose, scout and build the operations.

**Who it is for:** A developer using a coding agent who wants a set of reusable site operations without designing each request themselves.

**The problem:** Finding the right requests across many pages of a site is slow, and reading full responses fills the agent's context.

**The outcome:** A set of operations for the goal, each checked with an input that was not one of its examples.

### Steps

1. Paste `Set up API Anything for me: https://github.com/goodnight000/api-anything/blob/main/INSTALL.md` into your coding agent.
2. Describe the data you want from the site, and answer the agent's questions about what is unclear.
3. Approve the proposed operations when the agent asks.
4. Ask the agent to run `capture --outline` on each page so it reads summaries, not full responses. (inferred, check the README)
5. Restart the agent and ask it a question that uses the new operations.

### Prompt to paste into your agent

```text
Using the api-anything repo at github.com/goodnight000/api-anything and its skill, map the operations needed to answer <goal> from <site>. Expected output is a list of approved operations, each with a working call. Verify that each operation is tested with an input that was not used as an example.
```

### Caveat

The README's Goodreads example took 6.3 minutes and $1.19 for one run, and the agent's approach works only for the operations it was taught.

Risk, reverse engineering: The agent records and rebuilds a site's page requests, so confirm the site's terms allow this before you map it.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/goodnight000-api-anything/map-site-from-intent-with-agent/

## How to publish a learned site spec after a privacy preview with API Anything

Repo: [goodnight000/api-anything](https://github.com/goodnight000/api-anything) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Preview every file, host and possible personal value, then open a pull request to share a spec.

**Who it is for:** A developer who has taught API Anything a useful site operation and wants other people to pull it from the registry.

**The problem:** A spec can carry emails or account ids by accident, and sharing it publicly is hard to undo.

**The outcome:** A reviewed pull request to the registry that others can pull after a maintainer merges it.

### Steps

1. `api-anything publish hn-demo`
2. Check the preview for files, every host the spec sends to, and any personal values such as an email or account id.
3. `api-anything publish hn-demo --yes`
4. Wait for a maintainer to review the pull request and for CI to pass.

### Prompt to paste into your agent

```text
Using the api-anything repo at github.com/goodnight000/api-anything, preview the publish of <spec name> with `api-anything publish <spec name>` and report every file, host and possible personal value listed. Expected output is the preview only, with nothing sent. Verify that no pull request is opened until the user confirms and adds --yes.
```

### Caveat

Publishing opens a pull request under your GitHub account's noreply address, and the README says a maintainer must review it before anyone can pull the spec.

Risk, credentials: A published spec can contain an email or account id, so read the preview carefully before adding --yes.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/goodnight000-api-anything/share-spec-after-review-preview/
