The RapidAPI Developer Hub

Welcome to the RapidAPI developer hub. You'll find comprehensive guides and documentation to help you start working with RapidAPI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Documentation

C# (.NET)

Query RapidAPI using C#

To get started using C# to consume APIs on RapidAPI, run the following command:

Install-Package RapidAPISDK

Once you've installed the SDK, require it in your code:

using RapidAPISDK;

You can now instantiate a new RapidAPI client with your ProjectName and ProjectKey:

private static RapidAPI RapidApi = new RapidAPI('ProjectName',token: 'ProjectKey');

Now, to call an API, all you have to do is write the following code:

List<Parameter> body = new List<Parameter>();

body.Add(new DataParameter("ParameterKey1", "ParameterValue1"));
body.Add(new DataParameter("ParameterKey2", "ParameterValue2"));

try { 
	Dictionary<string, object> response = RapidApi.Call("APIName", "FunctionName", body.ToArray()).Result;
	object payload;
	if (response.TryGetValue("success", out payload)){ 


catch (RapidAPIServerException e){ 

catch (Exception e){ 


C# (.NET)

Query RapidAPI using C#