Skip to main content

Getting started

Export API lets you search for products, create orders, and receive product keys on G2A.com programmatically.

Requirements

  • API access — OAuth2 credentials (client_id and client_secret) to obtain an access token. See Authentication for the token endpoint and how to send the token with requests.
  • Authorization on every request — All requests to Export API must be authenticated. Send the Authorization: Bearer <access_token> header with each call. Without it, requests are rejected.
  • Configured payments — your account must have configured payment methods. Details are available in our Guide.
  • CurrencyCreating an order requires currency: EUR on POST /export/v1/orders. Get orders history (GET /export/v1/orders) can return past orders in their stored order currency (any ISO code on the row, e.g. USD). Product and catalog monetary fields follow each endpoint’s own rules.
  • Rate limit — API is limited to 30 requests per second (30 req/s).

Typical flow

  1. Obtain access token — Request a token from the OAuth2 token endpoint using your client_id and client_secret. The token expires after a short period — request a new one before it does. See Authentication.

  2. Browse products — Use Get product offers (list) to retrieve a paginated list of available products with their offers and prices. Use the updatedAtFrom filter to poll for changes since your last sync.

  3. Inspect a product — Use Get product offers (single) to fetch a single product with its offers, optionally filtered by quantity or max price. Use Get products to retrieve full metadata (images, system requirements, restrictions) for one or more products.

  4. Place an order — Use Create order with quantity and maxPrice, and one of two modes:

    • Auto (productId) — G2A selects the best available offer automatically.
    • Manual (offerId) — you choose a specific offer.

    Include a unique Idempotency-Key header to prevent duplicate orders.

  5. Retrieve keys — After payment is processed, use Get order keys with the orderId from the Create order response to retrieve the product keys. If the payment is still pending, the API returns 402 order-not-paid — retry after a short delay.

Failed payment: A failed order is automatically canceled. To retry, call Create order with a new Idempotency-Key.

Response format

All responses are JSON. Success responses use a data wrapper. Errors use an error object with code, message, status, and optional errors and traceId.

When reporting errors or incorrect responses (e.g. 5xx) to technical support, always include this traceId to enable quick tracing and investigation of the request.