Gadget Trade Developer API
A professional integration reference for developers building applications that use approved public Gadget Trade marketplace data.
Overview
The Gadget Trade Developer API provides authenticated access to selected public marketplace data. It is designed as a dedicated developer surface: your normal Gadget Trade account manages identity, while your applications, credentials, usage and plan are managed from the Developer Portal.
Getting started
- 1Create or sign in to your Gadget Trade account.
- 2Open Developer Portal from the documentation or account navigation.
- 3Create an application with a clear app name, owner type and target platform.
- 4Copy the public key and secret when the credential is created.
- 5Store the secret in your server environment and never ship it in browser or mobile client code.
- 6Make a test request to the versioned API base URL and inspect the response and rate-limit headers.
Application configuration
The Developer Portal keeps application identity separate from marketplace activity. Personal applications can be associated with an individual account, while business and organization applications can record the relevant business or organization name and target platform. These details help you identify credentials when you have multiple integrations.
Credential lifecycle
- 1Use a separate credential set for each application or integration.
- 2Reveal a public key only when you need to copy or verify it; existing secrets remain masked after creation.
- 3Keep the secret in a server-side environment variable or a managed secret store.
- 4If a secret is exposed, revoke that credential immediately and create a replacement.
- 5Do not rotate credentials by creating many accounts or changing IP addresses to bypass limits.
Base URL
All API requests use HTTPS and the versioned /api/v1 base path. Versioning keeps existing integrations stable when a future API release introduces breaking changes.
https://gadgettrade.com.ng/api/v1Authentication
Every developer API request must include both a public key and its matching secret key. The public key identifies the application. The secret key proves that the request is authorised. Never place the secret key in browser JavaScript, mobile application source code, public repositories or client-side configuration that users can inspect.
curl -H "X-Gadget-Trade-Public-Key: gt_pub_live_YOUR_PUBLIC_KEY" -H "Authorization: Bearer gt_sec_live_YOUR_SECRET_KEY" https://gadgettrade.com.ng/api/v1/categoriesCreate credentials
- 1Sign in to Gadget Trade and open Gadget Trade for Developers.
- 2Create one credential set for each application or integration.
- 3Give the credential a clear application name so it can be identified later.
- 4Copy the public key and secret key when they are displayed.
- 5Store the secret in a server-side environment variable or secret manager.
- 6Use the same public/secret pair for authenticated API requests from your backend.
Available scope
The initial developer scope is catalog:read. It permits access to approved public catalogue information only. Developer credentials do not grant access to private user profiles, messages, orders, payment information, seller payout information or administrative functions.
List categories
Returns the public Gadget Trade categories available to integrations.
GET /api/v1/categories
X-Gadget-Trade-Public-Key: gt_pub_live_YOUR_PUBLIC_KEY
Authorization: Bearer gt_sec_live_YOUR_SECRET_KEYList marketplace listings
Use pagination to retrieve approved public listings. The default page size is 25 and the maximum page size is 50. Search matches public title, brand and model fields. The category parameter accepts a category slug.
GET /api/v1/listings?search=iphone&category=phones&page=1&per_page=25
X-Gadget-Trade-Public-Key: gt_pub_live_YOUR_PUBLIC_KEY
Authorization: Bearer gt_sec_live_YOUR_SECRET_KEYRetrieve one listing
Fetch one approved public listing by its numeric listing ID.
GET /api/v1/listings/1234
X-Gadget-Trade-Public-Key: gt_pub_live_YOUR_PUBLIC_KEY
Authorization: Bearer gt_sec_live_YOUR_SECRET_KEYResponse format
Successful responses return JSON. Listing responses include the public product title, brand, model, description, condition, current price, currency, stock, category, public location fields, selected marketplace flags, images and canonical product URL.
Pagination
Listing results use page and per_page parameters. Responses include pagination.page, pagination.per_page and pagination.has_more. Keep page sizes reasonable and stop requesting pages when has_more is false.
Plans, usage and limits
Gadget Trade offers a Free Developer API plan for starting integrations and a paid Developer Pro plan for production integrations that need more capacity. The current plan, included monthly request allowance, requests-per-minute limit and maximum page size are shown in the developer billing area. Plan limits may be changed by Gadget Trade as the platform evolves; applications should read the response headers and avoid assuming that a limit is permanent.
- 1Free — 1,000 requests per month, 30 requests per minute and up to 25 items per page.
- 2Developer Pro — 50,000 requests per month, 120 requests per minute and up to 100 items per page at launch.
- 3Monthly usage resets at the start of each UTC calendar month.
- 4A request that is rejected by authentication or rate limiting is not a successful catalogue response.
- 5When a monthly allowance is reached, the API returns HTTP 429 with a clear error message.
Usage headers
Successful API responses expose the active plan and current limits through response headers. These are intended for dashboards and adaptive clients.
X-Gadget-Trade-Plan: Free
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-Usage-Monthly-Limit: 1000
X-Usage-Monthly-Remaining: 999Upgrading
Developers can upgrade from the Developer Portal without contacting an administrator. Paid plans are purchased through Gadget Trade’s supported checkout. Payment is verified server-side before the paid plan becomes active. The secret API key is not changed when a developer upgrades, so an existing integration can continue using the same credentials.
- 1Open Gadget Trade for Developers.
- 2Open Plans, usage & billing.
- 3Review the available plan and included limits.
- 4Select Upgrade and complete the secure payment checkout.
- 5Return to the developer portal and confirm that the new plan is active.
Billing and renewal
Developer API subscriptions are currently period-based and do not silently auto-renew. When a paid period ends, the account returns to the Free plan unless another paid period is purchased. Gadget Trade does not expose payment-card data through the Developer API.
Infrastructure protection
Developer traffic is intentionally separated from private marketplace workflows. Catalogue endpoints are read-only, responses are short-lived cached where appropriate, result sizes are bounded and monthly usage is counted with low-write reservations rather than a database write for every request. These controls let developers use the service without making every API call an expensive database operation.
Higher capacity
If an integration needs more capacity than the published plan provides, contact Gadget Trade before building aggressive polling or parallel request patterns. Higher limits can be considered based on the application and the capacity available on the platform. Do not attempt to bypass limits with rotating credentials, IP addresses or multiple accounts.
Errors
Errors use a predictable JSON structure with an error.code and error.message field. Common responses include authentication_required (401), not_found (404), invalid_listing_id (400), pagination_limit (400) and rate-limit responses (429).
Security requirements
- 1Keep secret keys on your server and never commit them to source control.
- 2Use HTTPS for every request.
- 3Create separate credentials for separate applications.
- 4Revoke a credential immediately if its secret may have been exposed.
- 5Request only the data your application needs.
- 6Do not use developer credentials to collect or expose private user information.
Production integration checklist
- 1Use the current /api/v1 base URL over HTTPS.
- 2Load credentials from server-side environment variables.
- 3Respect X-RateLimit-Remaining and X-Usage-Monthly-Remaining instead of hard-coding quotas.
- 4Cache public catalogue responses where appropriate and avoid aggressive polling.
- 5Handle 401, 404, 400 and 429 responses explicitly.
- 6Monitor your own application logs without recording secret keys or authentication headers.
Caching and infrastructure efficiency
The API is deliberately read-only and avoids marketplace intelligence, messaging, payment and other expensive workflows. Responses use short private caching windows, requests are paginated, and catalogue endpoints select only public fields. This design limits unnecessary database work and helps integrations remain efficient without requiring Gadget Trade to scale compute simply because developers are using the API.
API versioning
The current stable API is v1. Breaking changes will be introduced through a new version path rather than silently changing the contract of an existing version. Developers should keep the version in their configured base URL and review release notes before moving to a newer version.
Developer portal and account links
Use the Developer Portal to create and revoke credentials and the Plans, usage & billing area to review limits and upgrade. The public API documentation, Privacy Policy, Terms & Conditions and Support pages should be treated as the authoritative account and service references.
Your first integration — step by step
- 1Create an application in Developer Portal and give it the real name of the app you are building.
- 2Copy the public key and save the secret key immediately; the secret is shown only when the credential is created.
- 3Create server-side environment variables named GT_PUBLIC_KEY and GT_SECRET_KEY.
- 4Install the HTTP client for your language, or use the built-in fetch available in modern Node.js.
- 5Call GET /api/v1/categories first to verify authentication before building your product screens.
- 6Then request /api/v1/listings with page and per_page and render the returned public data in your application.
- 7Handle HTTP 401, 400, 404 and 429 responses before moving the integration into production.
Integration options
Use the server environment that fits your product. Gadget Trade currently documents JavaScript/Node.js, Python, PHP and cURL examples. There is no browser-side secret-key SDK: client applications should call your own backend, and your backend should call Gadget Trade.
Node.js integration
Use Node.js on your server. Never put GT_SECRET_KEY in React, browser JavaScript or a mobile application.
const response = await fetch('https://gadgettrade.com.ng/api/v1/listings?search=iphone&per_page=25', {
headers: {
'X-Gadget-Trade-Public-Key': process.env.GT_PUBLIC_KEY,
Authorization: `Bearer ${process.env.GT_SECRET_KEY}`,
},
});
if (!response.ok) {
throw new Error(`Gadget Trade API error: ${response.status}`);
}
const data = await response.json();
console.log(data);Quick test with cURL
If you are new to programming, start here. cURL lets you test the API directly from a terminal before you build a full application.
curl -X GET -H "X-Gadget-Trade-Public-Key: $GT_PUBLIC_KEY" -H "Authorization: Bearer $GT_SECRET_KEY" "https://gadgettrade.com.ng/api/v1/listings?search=iphone&per_page=10"Beginner integration path
- 1Create your application in Developer Portal.
- 2Copy the public key and secret key once; save the secret in your server environment.
- 3Test GET /api/v1/categories with cURL or the language example below.
- 4Test GET /api/v1/listings with search, page and per_page.
- 5Connect your backend endpoint to your website or mobile app.
- 6Display only the public JSON returned by your backend to users.
- 7Before launch, test authentication failures and HTTP 429 rate limits.
Next.js / server route integration
For Next.js or another full-stack React framework, keep the Gadget Trade request inside a server route. The browser calls your route; your route calls Gadget Trade.
// app/api/gadget-trade/listings/route.ts
export async function GET() {
const response = await fetch(
'https://gadgettrade.com.ng/api/v1/listings?search=iphone&per_page=25',
{
headers: {
'X-Gadget-Trade-Public-Key': process.env.GT_PUBLIC_KEY!,
Authorization: `Bearer ${process.env.GT_SECRET_KEY}`,
},
cache: 'no-store',
},
);
return new Response(await response.text(), {
status: response.status,
headers: { 'content-type': 'application/json' },
});
}Python integration
Python developers can use requests from a server, worker or backend service. Keep both credentials in environment variables.
import os
import requests
response = requests.get(
"https://gadgettrade.com.ng/api/v1/listings",
params={"search": "iphone", "per_page": 25},
headers={
"X-Gadget-Trade-Public-Key": os.environ["GT_PUBLIC_KEY"],
"Authorization": f"Bearer {os.environ['GT_SECRET_KEY']}",
},
timeout=20,
)
response.raise_for_status()
data = response.json()
print(data)PHP integration
For PHP applications, send the credentials from your server with cURL. Do not echo the secret key into HTML.
<?php
$ch = curl_init('https://gadgettrade.com.ng/api/v1/categories');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Gadget-Trade-Public-Key: ' . getenv('GT_PUBLIC_KEY'),
'Authorization: Bearer ' . getenv('GT_SECRET_KEY'),
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 400) {
throw new RuntimeException('Gadget Trade API request failed.');
}
$data = json_decode($response, true);Browser and React apps
A browser or mobile client should not contain the secret key. If your interface is React, Next.js, React Native or another client application, call your own backend endpoint and let that server call Gadget Trade. This keeps the secret outside code that users can inspect.
// Browser / React client
const response = await fetch('/api/gadget-trade/listings?search=iphone');
const listings = await response.json();
// Your server then calls Gadget Trade with GT_PUBLIC_KEY + GT_SECRET_KEY.Build a small backend proxy
GET /api/gadget-trade/listings?search=iphone
│
▼
Your server / backend
│ GT_PUBLIC_KEY + GT_SECRET_KEY
▼
GET https://gadgettrade.com.ng/api/v1/listings
│
▼
Public JSON → your application- 1Create a private server route such as /api/gadget-trade/listings.
- 2Read GT_PUBLIC_KEY and GT_SECRET_KEY only on the server.
- 3Forward safe query parameters such as search, category, page and per_page.
- 4Call the Gadget Trade API and check response.ok or the HTTP status.
- 5Return only the public JSON your application needs to the client.
- 6Never return GT_SECRET_KEY in the response, logs or browser source.
Pagination integration
Large catalogues should be loaded page by page instead of requesting a huge response. Stop when has_more is false and keep the page size within the active plan limit.
const page = 1;
const perPage = 25;
const url = new URL('https://gadgettrade.com.ng/api/v1/listings');
url.searchParams.set('page', String(page));
url.searchParams.set('per_page', String(perPage));
const response = await fetch(url, {
headers: {
'X-Gadget-Trade-Public-Key': process.env.GT_PUBLIC_KEY,
Authorization: `Bearer ${process.env.GT_SECRET_KEY}`,
},
});Rate-limit handling
Your integration should slow down when the remaining request allowance becomes low and retry later after a 429 response. Do not repeatedly retry a failed request in a tight loop.
if (response.status === 429) {
// Wait before trying again.
// Read the rate-limit / usage headers when available.
throw new Error('Gadget Trade API rate limit reached.');
}
if (response.status === 401) {
throw new Error('Check your public and secret credentials.');
}Environment variables
A simple server configuration can look like this. Keep the real values in your hosting provider’s environment-variable settings, not in source control.
GT_PUBLIC_KEY=gt_pub_live_YOUR_PUBLIC_KEY
GT_SECRET_KEY=gt_sec_live_YOUR_SECRET_KEYTest before production
- 1Create a Free developer credential.
- 2Run the categories request.
- 3Run a paginated listings request.
- 4Confirm your application handles an authentication failure.
- 5Confirm your application handles HTTP 429 without an infinite retry loop.
- 6Remove secrets from logs and error messages.
- 7Deploy only after the integration works with production environment variables.
Developer support
For integration questions, use the official Gadget Trade support channels and include the endpoint, HTTP status, request timestamp and a safe description of the problem. Never send a secret key, password or authentication code in a support message.


