# Matprat — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and discover recipes from Matprat's collection, view detailed recipe information, get weekly meal plan suggestions, and find what's currently popular—all with helpful autocomplete to guide your searches. Plan your meals effortlessly by browsing recipes and organizing them into weekly menus.

**Category:** Food & Dining | **Website:** [matprat.no/](https://matprat.no/) | **Docs:** [parse.bot/marketplace/daf30cd7-8a16-4f2c-89bd-2cefb025915c/matprat-no-api](https://parse.bot/marketplace/daf30cd7-8a16-4f2c-89bd-2cefb025915c/matprat-no-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/matprat/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Autocomplete

Get autocomplete suggestions for a search prefix. Returns filter suggestions (dish types, ingredients) and content matches (recipe previews). Useful for building search-as-you-type UI or discovering filter values programmatically.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search prefix to autocomplete (e.g. 'past', 'kyl'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/matprat/autocomplete \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Get popular recipes

Get currently popular recipes on matprat.no sorted by popularity. Returns paginated results with the same structure as search_recipes (searchHits with recipe summaries, searchFilters for available filters). Useful for discovering trending recipes without a specific search query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/matprat/get-popular-recipes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### Get recipe

Fetch full details of a single recipe by its URL path on matprat.no. Returns structured recipe data including name, description, ingredients, step-by-step instructions, nutrition facts, aggregate rating, and a related recipe suggestion. The URL path is the canonical identifier found in search results under data.linkUrl.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | URL path of the recipe on matprat.no (e.g. /oppskrifter/rask/pasta-puttanesca/). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/matprat/get-recipe \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### Get weekly menu

Fetch the weekly meal plan for a given week. Returns an array of daily recipes with day names (Mandag–Søndag), recipe details, ingredients, ratings, and difficulty. One recipe per day. Defaults to the current ISO week and year when parameters are omitted.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `week` | string | No | ISO week number (1–53). Defaults to current week. |
| `year` | string | No | Year as four digits (e.g. '2026'). Defaults to current year. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/matprat/get-weekly-menu \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"week":"<string>","year":"<string>"}'
```

### Search recipes

Full-text search over matprat.no recipes. Returns paginated results with search hits (recipe summaries with images, ratings, ingredients preview) and available filter groups for further refinement. Filters are cumulative — combine dish_types, commodity, diet_type, etc. to narrow results. Each hit's data.linkUrl can be passed to get_recipe for full details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `categories` | string | No | Category filter ID(s) from searchFilters. |
| `commodity` | string | No | Main ingredient filter ID(s) from searchFilters (e.g. '68' for Storfe, '69' for Svin). |
| `diet_type` | string | No | Dietary adjustment filter ID(s) from searchFilters (e.g. '358' for Vegetarisk, '357' for Vegansk). |
| `difficulty` | string | No | Difficulty level filter ID(s) from searchFilters. |
| `dish_types` | string | No | Dish type filter ID(s) from searchFilters (e.g. '23' for Middagsrett, '39' for Tilbehør). |
| `origins` | string | No | World region filter ID(s) from searchFilters. |
| `page` | integer | No | Page number for pagination (1-based). |
| `prep_time` | string | No | Preparation time filter ID(s) from searchFilters. |
| `query` | string | No | Search keyword (e.g. 'pasta', 'kylling'). Omitting returns all recipes. |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/matprat/search-recipes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"categories":"<string>","commodity":"<string>","diet_type":"<string>","difficulty":"<string>","dish_types":"<string>","origins":"<string>","page":"<integer>","prep_time":"<string>","query":"<string>","sort":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.