PlantPair API

By manowar online

The best Companion Planting catalog online.
More than 97,000 garden beds combinations

PlantPair API is your best buddy when using companion planting techniques on your garden, farm, homestead... It helps you get the best advice on what plants mingle best, and which combinations you should avoid.

PlantPair API logo, a garden plant

Built for products that put a garden bed in their users’ hands

They name what is already planted. You show what can go next.

Match

Names, not botany homework

Cherry tomatoes become Tomato. Genovese basil becomes Basil. Close spellings get suggestions. Duplicates are ignored.

Companions

Helpful, or just compatible

best_companions help every plant in the bed. possible_to_plant can share the space without helping all of them.

Compatibles

A yes or a no

Send two or more plants. Get whether any of them should be kept apart from the others.

Two calls, two jobs

Same garden_bed body. Different answers.

POST /companionsWhat else can go in this bed
POST /compatiblesWhether these plants can share it

Three calls to a working garden

Name the bed

Send garden_bed as an array of plant names. No User-Id. No account.

Ask for companions

POST /v1/companions. Read best_companions and possible_to_plant. Add extensive=true when you want the full lists.

Check a mix

POST /v1/compatibles with two or more names. compatible is true or false.

A Go client, so you don't write the HTTP twice

Module gitlab.com/man-o-war/plantpairAPI-client. Pass the host your marketplace lists, the key that marketplace requires, then call Companions or Compatibles. Paths have no /v1; marketplaces strip that prefix.

go get gitlab.com/man-o-war/plantpairAPI-client

package main

import (
	"fmt"

	ppclient "gitlab.com/man-o-war/plantpairAPI-client/client"
)

func main() {
	c, err := ppclient.New(
		ppclient.WithBaseURL("https://plantpair-api-by-manowar-online.p.rapidapi.com"),
		ppclient.WithRapidAPIKey("YOUR_RAPIDAPI_KEY"),
	)
	if err != nil {
		fmt.Println(err.Error())
		return
	}

	result, err := c.Companions([]string{"tomato", "basil"}, false)
	if err != nil {
		fmt.Println(err.Error())
		return
	}
	fmt.Println(result.BestCompanions)
}

Use the matching WithX option for your marketplace. Copy the base URL from their snippet, stopping before /companions.

  • RapidAPIWithRapidAPIKey (optional WithRapidAPIHost)
  • Zyla API HubWithZylaLabsKey
  • API.marketWithAPIMarketKey

Context-aware twins: HealthWithCtx, CompanionsWithCtx, CompatiblesWithCtx. Optional in-process cache covers companions and compatibles only; health always hits the network.

Source and docs on GitLab

Go gopher by Renee French, CC BY 4.0.

We provide the JSON, you build your UI however you like, for example...

POST /v1/companions


        

Bed: tomato · basil

Tomato Basil

Best companions

Possible to plant

POST /v1/compatibles


        

Tomato and Basil in one bed

CompatibleYes
In the bed2
Conflicts0

Get PlantPair API

Subscribe and use through your API Marketplace of choice! Instant keys, usage billing and OpenAPI on day one.

No garden left behind

PlantPair does not keep accounts. You send names, you get JSON, we retain none of that request. There is no user record to delete, no data retention after the response, and we don't sell any of the data of our customers to anyone, ever. As a developer, you don't need to worry with us to be GDPR compliant for this API.

Read the contract