Tree Search
Search for synthetic routes to a target molecule
Run a retrosynthetic tree search for a single target molecule and receive every validated route found within the requested time budget, along with vendor pricing for the building blocks involved.
Run a synchronous retrosynthetic tree search for a target molecule. The search runs for up to max_seconds, exploring reaction steps to the configured max_depth, and the response contains every validated route found together with pricing/lead-time annotations for the building blocks used.
OAuth2 authentication.
Authenticate using the Pending AI authorization server through an OAuth2 authorization code flow. You will be redirected to a Pending AI login page to authenticate and authorize access to your account. After authorization, you will be redirected back to the original application with an access token. Ensure that the application is registered with Pending AI and/or that the correct redirect URI is configured. Contact Pending AI support for more information if the application is not registered.
Request data for creating a tree search.
The SMILES string representing the target molecule to search for synthetic routes to.
CC[C@H](C)[C@H](NC(=O)[C@H](Cc1ccc(O)cc1)NC(=O)CC(C)C)C(=O)N[C@H](CO)CCSCIf true, stop the search as soon as one validated solution route is found, rather than continuing to search for the full time budget.
trueMaximum wall-clock time in seconds to run the tree search.
4Example: 10Maximum number of reaction steps (tree depth) to search.
5Example: 6Exclude the trivial zero-step solution where the target molecule is itself a purchasable building block.
trueExample: trueExclude building blocks with a molecular weight (daltons) greater than or equal to this value. Omit or set to null for no molecular weight limit.
nullExclude building blocks priced at or above this normalised USD-per-gram cost. Omit or set to null for no price limit.
10000Example: 10000ISO country code used to scope pricing and lead-time annotations to a specific delivery region.
USExample: USExclude building blocks with a lead time (days) to the ships_to region greater than or equal to this value. Omit or set to null for no lead-time limit.
nullMaximum number of distinct synthetic route backbones to return.
5Example: 5Maximum number of building-block variations to keep per backbone.
10Example: 10When true, keep the cheapest building-block variations first when truncating to max_backbone_group_size.
falseReturns the tree search result.
The result of a completed tree search.
Canonicalised SMILES of the target molecule that was searched for.
CC(=O)Oc1ccccc1C(=O)ORequest contained invalid data (e.g. an unparsable SMILES string).
Missing or invalid authentication credentials.
Request validation failed.
POST /synth/v1/treesearch HTTP/1.1
Host: api.pending.ai
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 381
{
"search_smiles": "CC[C@H](C)[C@H](NC(=O)[C@H](Cc1ccc(O)cc1)NC(=O)CC(C)C)C(=O)N[C@H](CO)CCSC",
"early_exit_first_solution": false,
"max_seconds": 10,
"max_depth": 6,
"mask_trivial_solution": true,
"mask_bblocks_mw_gte": null,
"mask_usd_pricing_gte": 10000,
"ships_to": "US",
"mask_lead_times_gte": null,
"max_backbone_groups": 5,
"max_backbone_group_size": 10,
"limit_backbone_group_size_by_cost": false
}{
"search_smiles": "CC(=O)Oc1ccccc1C(=O)O",
"metadata": {
"tree_search_elapsed": 10.065487623214722,
"routes_extracted_elapsed": 0.033852338790893555,
"routes_validated_elapsed": 0.0072100162506103516,
"bblock_annotations_elapsed": 0.04003763198852539,
"total_elapsed": 10.289523124694824,
"total_graph_nodes": 36131,
"unvalidated_routes": 159,
"validated_routes": 136,
"total_bblocks": 12
},
"route_hierarchy": {
"ANY_ADDITIONAL_PROPERTY": {
"ANY_ADDITIONAL_PROPERTY": [
[
{
"directed": true,
"multigraph": false,
"nodes": [
{
"id": "5f1cb78e-e7ec-40f7-9ccb-aa0f6ae2d2ab",
"data": {
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"mw": 180.042258736,
"is_building_block": false,
"building_block_idx": null,
"closest_building_block": 0.1475452184677124,
"depth": 0,
"expanded": true,
"in_solution_path": false
}
}
],
"edges": [
{
"source": "5f1cb78e-e7ec-40f7-9ccb-aa0f6ae2d2ab",
"target": "bf75215f-f22f-4940-89d6-a27b3c5a8e75"
}
]
}
]
]
}
},
"pricing_annotations": [
{
"major_component_id": 378698,
"full_canonical": "CC(=O)[O-].O.[Na+]",
"major_component": "CC(=O)[O-]",
"minor_components": "O.[Na+]",
"mw": 59.01385291591001,
"vendor_name": "Angene International Limited",
"cs_id": "CSSB00015343762",
"cs_prefix": "CSSB",
"cs_url": "https://chem-space.com/CSSB00015343762",
"pack": 5,
"uom": "kg",
"price_usd": 17,
"normalised_usd": 0.0034,
"api_timestamp": "2026-03-12T20:14:46.438000Z",
"lead_time_days_to_US": 12,
"lead_time_days_to_CA": 10,
"lead_time_days_to_GB": 12,
"lead_time_days_to_FR": 12,
"lead_time_days_to_CH": 12,
"lead_time_days_to_DE": 12,
"lead_time_days_to_CN": 10,
"lead_time_days_to_AU": 10
}
],
"reagent_results": {
"reaction_to_edges": {
"CCOC(=O)c1ccccc1OC(C)=O>>CC(=O)Oc1ccccc1C(=O)O": [
"bf75215f-f22f-4940-89d6-a27b3c5a8e75"
]
}
}
}Last updated
Was this helpful?

