Endpoint
GET
/functions/v1/get_decode_compound_id?q=caffeine&limit=20Contract
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
- Optional q query parameter for compound name search
- Optional limit query parameter from 1 to 100
Returns
- items[] array
- compound_id
- compound_name and compound_identifier_value
Error codes
missing_api_keyinvalid_api_keyscope_not_allowedquota_exceededinvalid_jsoninvalid_requestvalidation_errormethod_not_allowedunsupported_api_versionjob_not_foundbacklog_highupstream_timeoutupstream_errorinternal_error
Request details
- q performs a case-insensitive name search.
- limit defaults to 20 and is clamped to the range 1 through 100.
- Omitting q returns the first page ordered by compound name.
Response details
- This is a synchronous GET endpoint.
- The response always wraps matches in items[].
- Empty searches return an empty items array rather than an error.
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.
- Use returned compound IDs in supported compound filters instead of hard-coding names.
Examples
Request
GET /functions/v1/get_decode_compound_id?q=caffeine&limit=20Response JSON
{
"data": {
"items": [
{
"compound_id": "cmp_123",
"compound_name": "Caffeine",
"compound_identifier_value": "C8H10N4O2"
}
]
},
"meta": {
"request_id": "req_...",
"api_version": "2026-07-10"
}
}Code examples
curl 'https://api.mymolecules.de/functions/v1/get_decode_compound_id?q=caffeine&limit=20' \
-H 'x-api-key: $MYMOLECULES_API_KEY' \
-H 'mymolecules-api-version: 2026-07-10'


