Farming & Foraging

Forageables

Access all forageable items in Stardew Valley, filterable by season and sortable by name or sell price.

Quick Start

import { forageables } from 'stardew-valley-data'

// All forageables
const all = forageables().get()

// Spring forageables sorted by sell price
const springBest = forageables().bySeason('spring').sortBySellPrice().get()

Type Definition

interface Forageable {
  id: string
  name: string
  description: string
  seasons: Season[]
  locations: string
  sellPrice: number
  image: string
}

Field Reference

FieldTypeDescription
idstringUnique identifier.
namestringDisplay name (e.g. "Leek").
descriptionstringIn-game description text.
seasonsSeason[]Seasons the item can be foraged ('spring', 'summer', 'fall', 'winter', 'ginger island').
locationsstringDescription of where the item can be found.
sellPricenumberBase sell price in gold.
imagestringPath to the image asset.

Query Methods

The forageables() function returns a ForageableQuery instance. All methods return a new ForageableQuery for chaining.

Inherited Methods

MethodReturnsDescription
.get()Forageable[]Return all results as an array.
.first()Forageable | undefinedReturn the first result.
.find(id)Forageable | undefinedFind by exact ID.
.findByName(name)Forageable | undefinedFind by name (case-insensitive).
.count()numberReturn the number of results.

Filter Methods

MethodSignatureDescription
bySeasonbySeason(season: Season)Filter to forageables available in the given season.

Sort Methods

MethodSignatureDefaultDescription
sortByNamesortByName(order?: 'asc' | 'desc')'asc'Sort alphabetically by name.
sortBySellPricesortBySellPrice(order?: 'asc' | 'desc')'desc'Sort by sell price (most valuable first).

Examples

Most valuable forageables per season

import { forageables } from 'stardew-valley-data'

const seasons = ['spring', 'summer', 'fall', 'winter']

seasons.forEach((season) => {
  const best = forageables().bySeason(season).sortBySellPrice().first()
  if (best) {
    console.log(`Best ${season} forageable: ${best.name} (${best.sellPrice}g)`)
  }
})

Count forageables by season

const springCount = forageables().bySeason('spring').count()
console.log(`There are ${springCount} spring forageables`)

Alphabetical listing

const sorted = forageables().sortByName().get()
sorted.forEach((f) => console.log(f.name))
Previous
Trees