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    Guides

PHP

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"
]);