Documentation

How to integrate the InstaJSON API Gateway into your applications.

Quick start

  1. 1

    Create a subscription

    Open Subscriptions and create a new subscription by choosing a service and a plan.

  2. 2

    Get your API key

    Each subscription comes with an API key. Keep it secret; every request authenticates with it.

  3. 3

    Make your first request

    Send the key with your requests to the gateway endpoints, as shown below.

Authentication

Every API request must include your API key. Send it in either of these headers:

Option 1: X-API-Key header

X-API-Key: sk_live_your_api_key_here

Option 2: Authorization bearer token

Authorization: Bearer sk_live_your_api_key_here

Making requests

Base URL

/s/<service-slug>/<endpoint>

Example request

curl -X GET \
  '/s/{service-slug}/{endpoint}' \
  -H 'X-API-Key: sk_live_your_api_key_here' \
  -H 'Content-Type: application/json'

Response headers

Each response includes headers with gateway information:

X-Gateway-Response-Time
Response time in milliseconds
X-Gateway-Version
Gateway version

Social downloaders

Pick a platform and an item in the sidebar for its endpoint, examples and a sample response.

Rate limits

Rate limits vary by plan; check your subscription for the exact limits. When you go over, the API answers with 429 Too Many Requests.

Error handling

Common error codes

  • 401

    Unauthorized

    Invalid or missing API key

  • 402

    Payment Required

    Insufficient balance for pay-as-you-go plans

  • 403

    Forbidden

    Inactive subscription or access denied

  • 404

    Not Found

    Service or endpoint not found

  • 429

    Too Many Requests

    Rate limit exceeded

  • 502

    Bad Gateway

    Target service unavailable

Need help?

If you have questions or get stuck, our support team can help.