Shopify Functions must be WASI compliant and deterministic, so they do not support external API calls. If you need external data for your function, you can place it in either a metafield, a cart attribute, or cart line item property ahead of time, and read the data in your input query.