Endpoint
GET
/functions/v1/get_decode_compound_id?q=caffeineContract
Send mymolecules-api-version with 2026-07-10 to use the documented response contract.
{
"data": {},
"meta": {
"request_id": "req_...",
"api_version": "2026-07-10"
}
}Headers
Request
x-api-keyrequired - Server-side API key for your integration.mymolecules-api-versionrequired2026-07-10- Use the latest stable API version: 2026-07-10.
Response
x-request-idrequired - Request identifier. Log this value when contacting support.mymolecules-api-versionrequired2026-07-10- The API contract version used for the response.x-ratelimit-limitoptional - Quota limit for the current key and window when quota data is available.x-ratelimit-remainingoptional - Remaining requests in the current quota window when quota data is available.x-ratelimit-resetoptional - ISO timestamp for the current quota window reset when quota data is available.retry-afteroptional - Seconds to wait before retrying when the request is rate-limited or temporarily unavailable.
Inputs
- Required q query parameter with the compound name to resolve
Returns
- status: resolved with compound_id and canonical_name
- status: needs_clarification with reason
Error codes
missing_api_keyinvalid_api_keyscope_not_allowedquota_exceededrate_limitedinvalid_jsoninvalid_requestinvalid_request_shapetoo_many_optionsinput_too_largeuser_context_not_alloweddetect_signals_not_allowedvalidation_errormethod_not_allowedunsupported_api_versionjob_not_foundbacklog_highservice_unavailableupstream_timeoutupstream_errorinternal_error
Request details
- An exact name or ID match may resolve immediately; otherwise the endpoint evaluates similar candidates.
- This endpoint returns one resolution, not a paginated list. An empty q is invalid.
Response details
- This is a synchronous GET endpoint.
- compound_id is a numeric string; pass it in Decode compound_identifier_ids as a string or integer.
- needs_clarification means the query was ambiguous, insufficiently confident or unavailable; no ID is returned.
Operational notes
- Requires x-api-key with the edge:get_decode_compound_id scope.
- Usage is counted and rate-limit headers are returned when quota data is available.
- This endpoint requires its own scope, separate from the Decode tier scopes.
Examples
Request
GET /functions/v1/get_decode_compound_id?q=caffeineResponse JSON
{
"data": {
"status": "resolved",
"compound_id": "2987",
"canonical_name": "caffeine"
},
"meta": {
"request_id": "req_...",
"api_version": "2026-07-10"
}
}Code examples
curl 'https://api.mymolecules.de/functions/v1/get_decode_compound_id?q=caffeine' \
-H "x-api-key: $MYMOLECULES_API_KEY" \
-H 'mymolecules-api-version: 2026-07-10'


