# Zapier

MillionShort search as a step in Zapier, with one call to the API.

Recipe · An HTTP step · Key in a form field · Checked 2026-11-19

> **For agents.** Read the API key from the `MILLIONSHORT_API_KEY` environment variable. Never print it; where a client needs it in a settings file, use a file that is not committed.
> The MCP address is https://mcp.millionshort.com/mcp (streamable HTTP; send `Authorization: Bearer <key>`, or no header for the no-key mode).
> On `INSUFFICIENT_CREDITS` stop and ask a person; on `RATE_LIMITED` or `CAPACITY` wait the `Retry-After` seconds, then retry once.
> Set-up steps written for agents: https://millionshort.com/docs/auth.md. Every integration: https://millionshort.com/docs/integrations.md.

> **App coming soon.** A MillionShort app for Zapier is not published yet. Everything below works today without it.

## 1. Call the API in an HTTP step

Add an action step: **Webhooks by Zapier**, event **Custom Request**:

```text Custom Request
Method:   POST
URL:      https://api.millionshort.com/v1/search
Data:     {"query": "...", "remove_top_sites": 1000, "num_results": 5}
Headers:  Content-Type = application/json
          Authorization = Bearer ms-YOUR_API_KEY
```

Map the query from an earlier step into `Data`. The key is in the step's headers, where anyone who can edit the Zap can read it: use a key you can revoke.

## 2. Try it

Ask Zapier's agent, or run the step with this as the query:

> Search MillionShort for forum threads about restoring a cast iron skillet, with the 1,000 most popular sites removed. List the five most useful with their links.

A good answer comes from a `search` call (the client shows the tool call) and links to pages you may not have seen before.

## 3. Tell it when to search

Zapier has no search of its own in a Zap, so say which search to use.

If an AI step reads the results, tell it:

> Use the MillionShort `search` tool for anything recent, niche, or that needs a source. To reach lesser-known sites, set `remove_top_sites` (for example 1000). Cite the URLs it returns.

## 4. Check it works

**Test step** in the Zap editor, then read the response fields in the step's output.

A search that worked returns `data.results`, each with a `title`, a `url` and a `snippet`, and `usage.credits`: what it cost.

## Tools

| Tool | What it does | Without a key | Cost |
|---|---|---|---|
| `search` | Searches the web and the specialist sources, with the popularity, domain, page-type, topic, site and date filters | Yes: one source, up to 5 results | 1 credit per source searched, first 10 results |
| `get_domain_info` | Popularity and risk for up to 25 sites | No | 1 credit |
| `list_sources` | The sources, page types and topics `search` accepts | Yes: source names | Free |
| The tools of the other endpoints | `extract`, `map`, `crawl`, `places` and more: [the MCP page](https://millionshort.com/docs/mcp#tools) lists them | A few, such as `places` | What the API call behind each costs |

## Costs and limits

A tool call costs what the API call behind it costs: 1 credit per source searched for the first 10 results, 1 credit for a domain lookup, nothing for the list of sources, the price of the endpoint for the other tools, and nothing at all in the no-key mode. An agent that loops can make many calls: give it a step limit, and ask for fewer results when a few will do. [Credits and limits](https://millionshort.com/docs/credits-and-limits) has the numbers.

## When it fails

| What you see | Why | Fix |
|---|---|---|
| `401 AUTH_MISSING_KEY` or `AUTH_INVALID_KEY` | The key is missing or wrong | Set `MILLIONSHORT_API_KEY`; keys start with `ms-` |
| `400 INVALID_PARAM` | A field name or value the API does not take | The `message` names the field; the [search reference](https://millionshort.com/docs/search/parameters) lists them all |
| `429 RATE_LIMITED` or `CAPACITY` | Too many calls a minute, or no free capacity right now | Wait the `Retry-After` seconds, then retry |
| `429 INSUFFICIENT_CREDITS` | The plan's credits are used up | Stop and add credits; do not retry |

## Related

- [MCP server](https://millionshort.com/docs/mcp): the address, every tool, and what the no-key mode allows.
- [Filters for agents](https://millionshort.com/docs/search/filters): what to ask `search` for, with recipes.
- More low-code builders: [n8n](https://millionshort.com/docs/integrations/n8n), [Make](https://millionshort.com/docs/integrations/make), [Dify](https://millionshort.com/docs/integrations/dify), [Langflow](https://millionshort.com/docs/integrations/langflow), and [every integration](https://millionshort.com/docs/integrations).
- Zapier's own documentation, read on 2026-11-19: [Webhooks by Zapier](https://zapier.com/apps/webhook/integrations).
