External API passing arguments

Options
Hi, I have looked at a couple of videos on passing arguments to external apis. One talks about pasting curl string and the other talks about a scenario where there is one argument and then using sprintf. In my case
api-path/function?varname= number, number & key=

How would I go about this. 

Thx

Comments