Marketplace gateway

Call any Gateway API from the marketplace with your APISwaps key. APISwaps forwards the request to the provider with the provider's own credentials and bills your balance per call — one key, one balance, every API.

Base URL

code
https://apiswaps.com/api/gw/v1/<listing-slug>/<path>

The listing page shows the exact base URL and every endpoint with its price. Query strings and request bodies are passed through unchanged.

Authentication

Send the API token you created in Settings → API Tokens:

code
Authorization: Bearer sk-as-...

The same token also works for the Partner API. Never put provider credentials in your requests — the gateway injects them for you.

Example

bash
curl https://apiswaps.com/api/gw/v1/acme-search/search?q=hello \  -H "Authorization: Bearer sk-as-YOUR_KEY"

Billing

  • Only 2xx responses are charged, at the price shown on the listing (per request or per 1,000 requests, spread per call).
  • 4xx/5xx responses, timeouts and provider outages are free.
  • Charges appear on Usage → Marketplace and in your transactions as Marketplace: <listing>.
  • Calls are refused with 402 when your balance cannot cover one call. Top up on Credits.

Errors

Errors are JSON:

json
{ "error": { "type": "insufficient_balance", "message": "...", "request_id": "gw_..." } }
StatustypeMeaning
401unauthorizedMissing or invalid API key
402insufficient_balanceBalance cannot cover one call
404not_found / endpoint_not_foundUnknown listing or path
413payload_too_largeBody over 10 MB
429rate_limitedPer-key limit for this listing
502upstream_error / unsafe_upstreamProvider unreachable or its address is not allowed
503listing_unavailableProvider configuration incomplete
504upstream_timeoutProvider did not answer in time

Quote the request_id (also sent as the X-Request-Id header) when contacting support.

Limits

Request bodies up to 10 MB, 600 requests per minute per key and listing by default, provider timeout up to 30 seconds. Responses are streamed; redirects from the provider are not followed.