🔧 RapidAPI Integration Docs
How this site connects to the live Matka result API
📌 API Overview
Host: matka-result-api.p.rapidapi.com
Method: POST
Format: JSON
Auth: x-rapidapi-key header
No HMAC-SHA256 signing required. Just send your x-rapidapi-key in the header
and a JSON body with your domain credentials. Much simpler than the DPBOSS API!
🔗 Exact API Call (from your curl command)
curl --request POST \
--url https://matka-result-api.p.rapidapi.com/api/market_api.php \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: matka-result-api.p.rapidapi.com' \
--header 'x-rapidapi-key: 0847cb0e86msh7db1a1569b5a74bp10040bjsncec7126f4eda' \
--data '{
"domain": "91club.codes",
"api_key": "61c565ca23710",
"domain_key": "ba5182c1ddf0729190cd54d1093e5d73",
"market": "all"
}'
Change "market": "all" to a specific market name like "kalyan" to get results for one market only.
🐘 PHP Implementation (how this site calls it)
<?php
$payload = json_encode([
'domain' => '91club.codes',
'api_key' => '61c565ca23710',
'domain_key' => 'ba5182c1ddf0729190cd54d1093e5d73',
'market' => 'all', // or specific market
]);
$ch = curl_init('https://matka-result-api.p.rapidapi.com/api/market_api.php');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'x-rapidapi-host: matka-result-api.p.rapidapi.com',
'x-rapidapi-key: 0847cb0e86msh7db1a1569b5a74bp10040bjsncec7126f4eda',
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$data = json_decode($response, true);
echo "HTTP Status: $httpCode\n";
print_r($data);
?>🟨 JavaScript / Node.js Call
const response = await fetch(
'https://matka-result-api.p.rapidapi.com/api/market_api.php',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-rapidapi-host': 'matka-result-api.p.rapidapi.com',
'x-rapidapi-key': '0847cb0e86msh7db1a1569b5a74bp10040bjsncec7126f4eda',
},
body: JSON.stringify({
domain: '91club.codes',
api_key: '61c565ca23710',
domain_key: 'ba5182c1ddf0729190cd54d1093e5d73',
market: 'all',
}),
}
);
const data = await response.json();
console.log(data);🐍 Python Call
import requests
url = "https://matka-result-api.p.rapidapi.com/api/market_api.php"
headers = {
"Content-Type": "application/json",
"x-rapidapi-host": "matka-result-api.p.rapidapi.com",
"x-rapidapi-key": "0847cb0e86msh7db1a1569b5a74bp10040bjsncec7126f4eda",
}
payload = {
"domain": "91club.codes",
"api_key": "61c565ca23710",
"domain_key": "ba5182c1ddf0729190cd54d1093e5d73",
"market": "all",
}
resp = requests.post(url, json=payload, headers=headers)
print(resp.status_code)
print(resp.json())⚡ Caching (how this site saves API calls)
RapidAPI may have rate limits. This site caches results in cache/ for 30 seconds.
This means your API is only called once every 30 seconds, not on every page load.
// In config.php — tweak these values:
define('CACHE_ENABLED', true); // set false to always call live
define('CACHE_SECONDS', 30); // cache for 30 secondsCache files stored in cache/matka_all.json
🔍 Debug Mode
To see the raw API response on the homepage, add ?debug=1 to the URL:
http://localhost/matka-rapidapi/index.php?debug=1
Remove in production! This reveals your raw data structure.
⚙️ config.php Reference
// ── All credentials in one place ──
define('RAPIDAPI_HOST', 'matka-result-api.p.rapidapi.com');
define('RAPIDAPI_KEY', '0847cb0e86msh7db1a1569b5a74bp10040bjsncec7126f4eda');
define('RAPIDAPI_URL', 'https://matka-result-api.p.rapidapi.com/api/market_api.php');
define('API_DOMAIN', '91club.codes');
define('API_KEY', '61c565ca23710');
define('DOMAIN_KEY', 'ba5182c1ddf0729190cd54d1093e5d73');
// ── Caching ──
define('CACHE_ENABLED', true);
define('CACHE_SECONDS', 30); // seconds between API calls