Interesse an einer wissenschaftlichen Studie?Mehr erfahren

Utility API

Get Decode Compound ID API

Available

Get Decode Compound ID searches compound identifiers by name and returns IDs that can be used in compound-level filters and advanced nutrition workflows.

Endpoint

GET/functions/v1/get_decode_compound_id?q=caffeine&limit=20

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

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=20

Response 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'