Companion Planting
Companion planting data tells you which plants grow well together, which should be kept apart, and why. Use these endpoints to build planting recommendations, garden layout tools, and compatibility checkers.
Get companions by plant ID
Retrieve all companion planting relationships for a specific plant variety by its plant library UUID. Returns beneficial, harmful, and neutral companions grouped by relationship type.
Required attributes
- Name
plantId- Type
- string
- Description
The UUID of the plant library record (e.g.,
"107b8dbb-9fc1-4417-adff-2f647f274969").
Response: plant
- Name
id- Type
- string
- Description
UUID of the queried plant.
- Name
commonName- Type
- string
- Description
Common display name of the plant (e.g.,
"Sungold Tomato").
- Name
scientificName- Type
- string
- Description
Scientific name of the plant (e.g.,
"Solanum lycopersicum").
Response: companion entries
Each entry in the beneficial, harmful, and neutral arrays contains:
- Name
plantId- Type
- string | null
- Description
UUID of the companion plant. Null for type-level relationships (e.g., "all beans" rather than a specific variety).
- Name
commonName- Type
- string
- Description
Common name of the companion (e.g.,
"Basil","Marigold").
- Name
scientificName- Type
- string | null
- Description
Scientific name of the companion. Null for type-level relationships.
- Name
relationshipType- Type
- string
- Description
One of
beneficial,harmful, orneutral.
- Name
benefitType- Type
- string | null
- Description
Category of benefit when applicable (e.g.,
"pest deterrent","flavor enhancer","nitrogen fixer"). Null for harmful or neutral relationships.
- Name
description- Type
- string
- Description
Explanation of the relationship and its effects.
- Name
source- Type
- string
- Description
Citation or source for the companion data.
Request
curl "https://verdantly-gardening-api.p.rapidapi.com/v2/companion-planting/plant/107b8dbb-9fc1-4417-adff-2f647f274969" \
-H "X-RapidAPI-Host: verdantly-gardening-api.p.rapidapi.com" \
-H "X-RapidAPI-Key: {apiKey}"
Response
{
"data": {
"plant": {
"id": "107b8dbb-9fc1-4417-adff-2f647f274969",
"commonName": "Sungold Tomato",
"scientificName": "Solanum lycopersicum"
},
"beneficial": [
{
"plantId": null,
"commonName": "Basil",
"scientificName": null,
"relationshipType": "beneficial",
"benefitType": "pest deterrent",
"description": "Basil repels aphids, whiteflies, and tomato hornworms. Some gardeners report improved tomato flavor when planted nearby.",
"source": "Carrots Love Tomatoes, Louise Riotte"
},
{
"plantId": null,
"commonName": "Marigold",
"scientificName": null,
"relationshipType": "beneficial",
"benefitType": "pest deterrent",
"description": "French marigolds release compounds that repel root-knot nematodes and whiteflies, two common tomato pests.",
"source": "University of Florida IFAS Extension"
},
{
"plantId": null,
"commonName": "Carrot",
"scientificName": null,
"relationshipType": "beneficial",
"benefitType": "soil aeration",
"description": "Carrots loosen the soil around tomato roots, improving water penetration and root development.",
"source": "Carrots Love Tomatoes, Louise Riotte"
}
],
"harmful": [
{
"plantId": null,
"commonName": "Fennel",
"scientificName": null,
"relationshipType": "harmful",
"benefitType": null,
"description": "Fennel secretes a substance from its roots that inhibits the growth of tomatoes and most other garden plants.",
"source": "Oregon State University Extension"
},
{
"plantId": null,
"commonName": "Brassicas",
"scientificName": null,
"relationshipType": "harmful",
"benefitType": null,
"description": "Cabbage, broccoli, and other brassicas compete with tomatoes for nutrients and can stunt each other's growth.",
"source": "The Old Farmer's Almanac"
}
],
"neutral": [
{
"plantId": null,
"commonName": "Pepper",
"scientificName": null,
"relationshipType": "neutral",
"benefitType": null,
"description": "Peppers and tomatoes are in the same family and share similar growing requirements. No strong benefit or harm observed, but they may share diseases.",
"source": "Verdantly Research"
}
]
}
}
Get companions by plant type
Retrieve companion planting relationships for a plant type (e.g., "tomato", "pepper", "basil"). Useful when you want general companion data without specifying a particular variety. Returns the same response shape as the plant ID endpoint.
Required attributes
- Name
plantType- Type
- string
- Description
The plant type name (e.g.,
"tomato","pepper","basil","squash").
Request
curl "https://verdantly-gardening-api.p.rapidapi.com/v2/companion-planting/type/tomato" \
-H "X-RapidAPI-Host: verdantly-gardening-api.p.rapidapi.com" \
-H "X-RapidAPI-Key: {apiKey}"
Response
{
"data": {
"plant": {
"id": null,
"commonName": "Tomato",
"scientificName": "Solanum lycopersicum"
},
"beneficial": [
{
"plantId": null,
"commonName": "Basil",
"scientificName": null,
"relationshipType": "beneficial",
"benefitType": "pest deterrent",
"description": "Basil repels aphids, whiteflies, and tomato hornworms. Some gardeners report improved tomato flavor when planted nearby.",
"source": "Carrots Love Tomatoes, Louise Riotte"
},
{
"plantId": null,
"commonName": "Nasturtium",
"scientificName": null,
"relationshipType": "beneficial",
"benefitType": "trap crop",
"description": "Nasturtiums attract aphids away from tomatoes, serving as a sacrificial trap crop.",
"source": "Royal Horticultural Society"
}
],
"harmful": [
{
"plantId": null,
"commonName": "Fennel",
"scientificName": null,
"relationshipType": "harmful",
"benefitType": null,
"description": "Fennel secretes a substance from its roots that inhibits the growth of tomatoes and most other garden plants.",
"source": "Oregon State University Extension"
}
],
"neutral": []
}
}
Check compatibility
Check whether two specific plants are compatible for companion planting. Returns a simple compatibility verdict with an optional description explaining the relationship.
Required attributes
- Name
plant1- Type
- string
- Description
UUID of the first plant.
- Name
plant2- Type
- string
- Description
UUID of the second plant.
Response properties
- Name
compatible- Type
- boolean
- Description
Whether the two plants are compatible.
truefor beneficial or neutral relationships,falsefor harmful.
- Name
relationshipType- Type
- string | null
- Description
The relationship type if a known relationship exists:
"beneficial","harmful", or"neutral". Null if no companion data exists for this pair.
- Name
description- Type
- string | null
- Description
Explanation of the relationship. Null if no companion data exists for this pair.
Request
curl -G "https://verdantly-gardening-api.p.rapidapi.com/v2/companion-planting/compatibility" \
--data-urlencode "plant1=107b8dbb-9fc1-4417-adff-2f647f274969" \
--data-urlencode "plant2=a3c9f1e2-8b4d-4567-9012-abc345678def" \
-H "X-RapidAPI-Host: verdantly-gardening-api.p.rapidapi.com" \
-H "X-RapidAPI-Key: {apiKey}"
Response (beneficial pair)
{
"data": {
"compatible": true,
"relationshipType": "beneficial",
"description": "Basil repels aphids, whiteflies, and tomato hornworms. Some gardeners report improved tomato flavor when planted nearby."
}
}
Response (harmful pair)
{
"data": {
"compatible": false,
"relationshipType": "harmful",
"description": "Fennel secretes a substance from its roots that inhibits the growth of tomatoes and most other garden plants."
}
}
Response (no data)
{
"data": {
"compatible": true,
"relationshipType": null,
"description": null
}
}
When no companion data exists for a pair, the endpoint returns compatible: true with null relationship details. Absence of data does not imply incompatibility.