Skip to main content
The /v1/food endpoint lets you search for farms starting from a product name rather than a location. Ask “who sells raw milk?” and optionally scope by geography.
GET https://api.bhumifarms.co/v1/food

Parameters

product
string
required
The product to search for. Case-insensitive. Example: raw milk, pastured eggs, grass-fed beef.
lat
number
Latitude for geo-scoped results. Must be paired with lng.
lng
number
Longitude for geo-scoped results. Must be paired with lat.
radius
number
default:"50"
Search radius in miles when using lat/lng. Minimum 1, maximum 100.
state
string
Filter by US state. Accepts full names or abbreviations (e.g., TX or Texas). Used when no lat/lng is provided.
page
number
default:"1"
Page number. Minimum 1.
per_page
number
default:"20"
Results per page. Minimum 1, maximum 100.

Example request

curl "https://api.bhumifarms.co/v1/food?product=raw%20milk&lat=45.52&lng=-122.68&radius=30" \
  -H "X-API-Key: bh_live_your_key_here"

Example response

{
  "data": [
    {
      "id": "abc123-...",
      "name": "Rolling Meadow Dairy",
      "city": "Canby",
      "state": "Oregon",
      "lat": 45.26,
      "lng": -122.69,
      "place_type": "farm",
      "products": ["raw milk", "butter", "cream", "kefir"],
      "categories": ["dairy"],
      "distance_mi": 18.3
    }
  ],
  "meta": {
    "count": 1,
    "total": null,
    "page": 1,
    "per_page": 20,
    "has_more": false
  }
}
When lat and lng are provided, results include distance_mi and are sorted by proximity. Without coordinates, results are sorted by quality score.

Difference from /v1/search

/v1/food/v1/search
Requiredproductlat + lng
Starting pointProduct nameLocation
Use case”Who sells raw milk?""What farms are near me?”
Default radius50 mi25 mi