# Matprat — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-matprat-no-api-daf30cd7/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-matprat-no-api-daf30cd7/autocomplete \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-matprat-no-api-daf30cd7/get_popular_recipes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-matprat-no-api-daf30cd7/get_recipe \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-matprat-no-api-daf30cd7/get_weekly_menu \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-matprat-no-api-daf30cd7/search_recipes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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>"}'
```
