[Integrations](https://spiral.ai/integrations) › [Muse Code](https://spiral.ai/integrations/muse-code) › [GOV.UK publication search](https://spiral.ai/integrations/muse-code/gov-uk-publication-search)

# How to Use GOV.UK publication search in Muse Code

Returns matching GOV.UK content records and links for further reading. Use it to discover publications across topics and publishers before fetching a page or exploring a manual.

|  |  |
| --- | --- |
| Model | GOV.UK publication search |
| Available through | Alexandria |
| Category | Public Records |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GOV.UK publication search in Muse Code

- Use GOV.UK publication search to find HMRC guidance about VAT and create a linked reading list for our documentation review.
- Use GOV.UK publication search to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from GOV.UK publication search and tell me what changed since last week.
- Check GOV.UK publication search and summarize what you find in three bullet points.
- Pull the newest data from GOV.UK publication search and give me the result as a table.

## How to set up GOV.UK publication search in Muse Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Install Muse Code**

```bash
curl -fsSL https://dev.meta.ai/install.sh | bash
```

2. **Ask Muse to add the server**: Start `muse` and ask:

```text
Add the Spiral MCP server at https://api.spiral.ai/mcp
```

3. **Sign in**: In your terminal, run:

```bash
muse mcp login spiral
```

### Use the Spiral skill

1. **Send Muse Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run GOV.UK publication search**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "gov-uk/government-publications/search",
    "input": {
      "q": "<q>"
    }
  }'
```

Then paste one of the prompts above: Muse Code finds GOV.UK publication search on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/muse-code

## GOV.UK publication search tools and prices

- [GOV.UK · Search](https://spiral.ai/tools/alexandria/gov-uk/government-publications/search) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| q |  | — | Search words. Optional: without q the filters list documents newest first. |
| to |  | — | Latest public timestamp, YYYY-MM-DD (inclusive). Pattern: ^\d{4}-\d{2}-\d{2}$. |
| url |  | — | A pasted GOV.UK finder URL instead of filters: https://www.gov.uk/search/all, /search/news-and-communications, /search/guidance-and-regulation, /search/policy-papers-and-consultations, /search/research-and-statistics, /search/transparency-and-freedom-of-information-releases or /search/services, with or without .atom. Its keywords, organisations[], people[], world_locations[], topical_events[], level_one_taxon, content_store_document_type, public_timestamp[from]/[to] (dd/mm/yyyy or yyyy-mm-dd) and order are mapped to the Search API; combine only with limit and cursor. Pattern: ^https?://. |
| from |  | — | Earliest public timestamp, YYYY-MM-DD (inclusive). Pattern: ^\d{4}-\d{2}-\d{2}$. |
| limit | 1 to 50 | — | Results per page, 1 to 50 (default 10). |
| order | relevance, newest, oldest, most_viewed | — | relevance (default with q; needs q), newest (default without q), oldest (by public timestamp, the last public change) or most_viewed. |

## What can you do with GOV.UK publication search in Muse Code?

Build a GOV.UK evidence index for a project’s government references. A coding agent can turn publication records, page text, manual sections, organization records, or product notices into linked research material.

### Prepare a retailer’s compliance reading list

Identify the relevant government publishers, find retail guidance, locate HMRC manual sections, and check OPSS notices for the retailer’s product categories. Read the selected pages to produce a linked reading list.

### Research a consumer goods import launch

Build an evidence pack covering customs guidance, relevant HMRC manual sections, government publishing bodies, and published product safety notices. Read the underlying pages before drafting questions for the importer’s advisers.

### Draft a trade association research bulletin

Collect publications, manual amendments, and product safety notices relevant to consumer goods businesses. Match publishers to organization records and read each selected page before writing the bulletin.

### Check a marketplace seller handbook

Compare a draft handbook’s government references with published guidance, HMRC manual contents, and OPSS product notices. Use organization records to resolve publisher names and page content to support proposed corrections.

### Build a manual section reading queue

Find the relevant HMRC manual, inspect its contents and change notes, and read selected sections. Produce a reading queue with section titles and source links.

### Resolve publishers in a publication inventory

Match publication publishers to government organization records and follow available successor relationships. Use publication search and page content to check the references in the inventory.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Muse Code guides](https://spiral.ai/integrations/muse-code)

## GOV.UK publication search in other agents

- [Amp](https://spiral.ai/integrations/amp/gov-uk-publication-search)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/gov-uk-publication-search)
- [Claude](https://spiral.ai/integrations/claude-desktop/gov-uk-publication-search)
- [Claude Code](https://spiral.ai/integrations/claude-code/gov-uk-publication-search)
- [Cline](https://spiral.ai/integrations/cline/gov-uk-publication-search)
- [Codex](https://spiral.ai/integrations/codex/gov-uk-publication-search)
- [Cursor](https://spiral.ai/integrations/cursor/gov-uk-publication-search)
- [Devin](https://spiral.ai/integrations/devin/gov-uk-publication-search)
- [dots](https://spiral.ai/integrations/dots/gov-uk-publication-search)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/gov-uk-publication-search)
- [Gemini](https://spiral.ai/integrations/gemini/gov-uk-publication-search)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/gov-uk-publication-search)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/gov-uk-publication-search)
- [goose](https://spiral.ai/integrations/goose/gov-uk-publication-search)
- [Grok](https://spiral.ai/integrations/grok/gov-uk-publication-search)
- [Grok Build](https://spiral.ai/integrations/grok-build/gov-uk-publication-search)
- [Hermes](https://spiral.ai/integrations/hermes/gov-uk-publication-search)
- [Instinct](https://spiral.ai/integrations/instinct/gov-uk-publication-search)
- [Manus](https://spiral.ai/integrations/manus/gov-uk-publication-search)
- [Muse](https://spiral.ai/integrations/muse/gov-uk-publication-search)
- [n8n](https://spiral.ai/integrations/n8n/gov-uk-publication-search)
- [Notion](https://spiral.ai/integrations/notion/gov-uk-publication-search)
- [OpenClaw](https://spiral.ai/integrations/openclaw/gov-uk-publication-search)
- [opencode](https://spiral.ai/integrations/opencode/gov-uk-publication-search)
- [Perplexity](https://spiral.ai/integrations/perplexity/gov-uk-publication-search)
- [Raycast](https://spiral.ai/integrations/raycast/gov-uk-publication-search)
- [VS Code](https://spiral.ai/integrations/vscode/gov-uk-publication-search)
- [Windsurf](https://spiral.ai/integrations/windsurf/gov-uk-publication-search)
- [Zapier](https://spiral.ai/integrations/zapier/gov-uk-publication-search)

## More Muse Code guides

- [GOV.UK product safety notices](https://spiral.ai/integrations/muse-code/gov-uk-product-safety-notices)
- [Gov.br agency directory](https://spiral.ai/integrations/muse-code/gov-br-agency-directory)
- [GOV.UK page content](https://spiral.ai/integrations/muse-code/gov-uk-page-content)
- [Gov.br agency news](https://spiral.ai/integrations/muse-code/gov-br-agency-news)
- [GOV.UK manual contents and updates](https://spiral.ai/integrations/muse-code/gov-uk-manual-contents-and-updates)
- [Gov.br page content](https://spiral.ai/integrations/muse-code/gov-br-page-content)

## Questions about GOV.UK publication search in Muse Code

**Can Muse Code use GOV.UK publication search?**

Yes. Add Spiral to Muse Code as an MCP server, and Muse Code can find and run GOV.UK publication search like any built-in tool.

**How much does GOV.UK publication search cost in Muse Code?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Muse Code plan is separate.

**Do I need an Alexandria account to use GOV.UK publication search in Muse Code?**

No. Spiral runs GOV.UK publication search on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up GOV.UK publication search in Muse Code?**

About two minutes: install Muse Code, then ask Muse to add the server, then sign in.

**Does Muse Code wait while GOV.UK publication search runs?**

GOV.UK publication search runs in the background. Muse Code starts the run, checks on it and gives you the json when it's ready.

**Does this cover every UK government website?**

No. GOV.UK content retrieval covers pages hosted on www.gov.uk. It does not provide general coverage of other government websites.

**Does GOV.UK search include publications in every language?**

No. GOV.UK documents that only English documents are allowed into its search index, and certain formats are excluded.

**What does a GOV.UK search update date mean?**

The public timestamp is the last updated date excluding minor editorial corrections. A date-based search therefore does not identify every text edit.

**Can I retrieve an earlier version of a publication?**

The Content API returns published GOV.UK content. GOV.UK directs requests for historical content to the National Archives.

**Are HMRC manuals complete answers to tax questions?**

No. HMRC explicitly says its manuals are not comprehensive and do not provide a definitive answer in every case.

