Endpoint
GET
/functions/v1/get_decode_compound_id?q=caffeine&limit=20Inputs
- 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
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 quota headers are returned when 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
{
"items": [
{
"compound_id": "cmp_123",
"compound_name": "Caffeine",
"compound_identifier_value": "C8H10N4O2"
}
]
}Code examples
curl 'https://tirqjzahcinadeulfylj.supabase.co/functions/v1/get_decode_compound_id?q=caffeine&limit=20' \
-H 'x-api-key: $MYMOLECULES_API_KEY'