The RapidAPI Developer Hub


Get Started    Guides


Query RapidAPI using PHP

To start using PHP to consume APIs on RapidAPI, install SDK from the command line:

composer require rapidapi/rapidapi-connect

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

require __DIR__ . '/vendor/autoload.php';
use RapidApi\RapidApiConnect;

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

$rapid = new RapidApiConnect('ProjectName', 'ProjectKey');

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

$result = $rapid->call('APIName', 'FunctionName', [ 
  "ParameterKey1" => "ParameterValue1"
  "ParameterKey2" => "ParameterValue2"


Query RapidAPI using PHP

Suggested Edits are limited on API Reference Pages
