# Macaroon Network Scientific Code Search

> Macaroon Network Scientific Code Search is a paid API for AI agents from api.macaroonnetwork.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Searches a curated index of source-linked scientific software repositories by topic, returning metadata, licence evidence, and provenance pointers without downloading repository contents.

## Facts

- Endpoint: POST https://api.macaroonnetwork.com/execute/polymathica-scientific-code-search-v1
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/macaroon-network-scientific-code-search-cd8ceaf0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TWp1tpdQxLpCUz2jiexxY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability macaroon-network-scientific-code-search-cd8ceaf0 -d '<json body>'
```

Example prompt: Search for open-source scientific software repositories related to molecular dynamics simulation — I need metadata, licence info, and provenance pointers for the top results.

## When to prefer this

Choose this endpoint when you need to discover scientific software by research topic with licence and provenance metadata attached — especially when compliance, reproducibility, or attribution matter. Prefer over general web search when you need structured metadata rather than raw links, and over GitHub search when you need licence evidence surfaced without manually inspecting repository files.

## Known failure modes

- Query too vague or broad returns low-relevance or empty results
- Topic outside indexed scientific domains returns no matches
- Snapshot age means recently created repositories may not be indexed
- Ambiguous topic terms may match unrelated software domains
- Malformed request body returns 400-level error

## How this service works

Find source-linked scientific software and repositories by topic. Returns metadata, declared licence evidence and provenance pointers without downloading or reselling repository contents.

## Output

Returns a list of matched scientific software repositories with metadata (name, description, source URL), declared licence evidence (licence type, file location), and provenance pointers (origin, lineage references). Does not download or redistribute repository contents.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "payload": {
   "query": "",
   "total": 0,
   "records": [],
   "provenance": {
    "content_hash": null,
    "metadata_only": null,
    "no_outbound_network_on_purchase": null
   }
  },
  "settled": true,
  "predicate_passed": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/macaroon-network-scientific-code-search-cd8ceaf0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.macaroonnetwork.com](https://www.zero.xyz/host/api.macaroonnetwork.com/llms.txt)
