# G2G Offer Scraper - Game Gold Price & Stock Monitor (`stas_k/g2g-offer-search`) Actor

Game gold price pages show one offer group and a stale price, so you never know the real cheapest seller. This actor reads every live offer group for a game: cheapest price, stock, offer count, delivery mode and seller, no key and no browser.

- **URL**: https://apify.com/stas_k/g2g-offer-search.md
- **Developed by:** [Stas K](https://apify.com/stas_k) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.80 / 1,000 offer groups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## G2G Offer Scraper: live game gold prices and stock

A price scraper for the g2g marketplace that returns one seller group and a page snapshot is
useless the moment the price moves: you cannot tell a real market from a cached number. This
actor asks the same live offer search the marketplace itself calls, and it walks the search
page by page, so one game comes back as every offer group it currently sells: cheapest price,
stock, how many offers sit in the group, delivery mode and the seller behind it.

No key, no login and no browser disguise: the endpoint answers a plain JSON request.

### What one row means

One row is one game. The row is paid only when the marketplace really sells something for it.

| Field | Meaning |
| --- | --- |
| `query` | The line you sent, as it was understood |
| `serviceId`, `brandId` | The ids the marketplace resolved for that line |
| `country`, `currency` | The storefront the prices were quoted for |
| `groupsReturned` | How many offer groups are in this row (`maxGroupsPerGame` caps it) |
| `groupsInSource` | How many distinct offer groups the game really has: the whole market is read, not the first page |
| `groupsInSourceComplete` | `false` when the page walk hit its ceiling, so a row never pretends to be the whole market |
| `pagesRead` | How many search pages the game took |
| `cheapestPrice` | The lowest price across every group of the game, in `currency` |
| `cheapestTitle`, `busiestTitle` | The group that holds the cheapest offer and the busiest group |
| `busiestOffers` | How many offers the busiest group holds |
| `groups[]` | The kept groups, cheapest first: `title`, `cheapestPrice`, `priceField`, `currency`, `unitName`, `minQty`, `availableQty`, `offersInGroup`, `deliveryModes`, `sellerName`, `sellerId`, `sellerScore`, `sellerSatisfactionRate`, `sellerReviews`, `sellerRanking`, `sellerLevel`, `topSellers`, `completedOrders`, `verifiedSeller`, `regionId` |

Status rows are the free half of the dataset: `status`, `reason` and nothing a buyer could
mistake for a price. They are written in batches, so sort by `actorIndex` to restore the input
order.

### Input

- `games`: category links (`https://www.g2g.com/categories/aion-2-kinah`), id pairs
  (`lgc_service_1/lgc_game_37781`) or bare game ids (`37781`).
- `country` and `currency`: which storefront the prices are quoted for. Keep them fixed when
  you track a price over time, otherwise you compare two different shop windows.
- `maxGroupsPerGame`: how many groups the row carries, cheapest first (default 20, max 100).
  The cap limits the row, never the reading: all groups are read so the cheapest price is the
  real one.
- `maxGames`: how many list lines this run reads (default and max 200).

### Price

One delivered game is one paid event, whatever way you typed it: a category link, an id pair
and a bare game id that resolve to the same game are one sale and the repeats come back free as
`DUPLICATE` rows. A game the marketplace does not sell, an unreadable line and anything past
`maxGames` are free and carry a reason. The lowest spending limit you can set per run is $0.05,
so a run that reads many games never pays that minimum per game.

### What this actor does not do

- It does not list individual seller offers inside a group. The marketplace publishes the group
  with its cheapest price, stock and offer count; per-offer pages are not part of this actor.
- It does not keep price history. Store the rows and diff them yourself, or run it on a
  schedule and compare.
- It does not buy, order or message any seller.
- It does not guess a price. A group whose price the marketplace does not quote comes back with
  `cheapestPrice: null`, not with a made-up number.

### Notes

- The search answers one page at a time and sends 20 groups a page unless asked otherwise. This
  actor asks `page_size=100` and keeps walking while the page comes back full, so on a game with
  183 groups the cheapest price is the cheapest of all 183, and `groupsInSource` says 183.
- Prices are the marketplace display prices for the chosen country and currency: `cheapestPrice`
  is the converted unit price, and `priceField` names the field it came from.
- `sellerScore` is the seller score the marketplace shows, `sellerSatisfactionRate` is its
  satisfaction fraction, and `sellerReviews` is the number of reviews behind it: the source
  field is called `total_rating`, but it is a count, not a rating. `topSellers` is the source
  array and comes back empty for every live group, so the seller of a group is `sellerName`.
- `completedOrders` is what the source returns; it is 0 for every live group today, so it is a
  source value, not a proof that a seller never sold anything.
- A category link is resolved by reading that page's own service and brand ids, so any game
  category works without you looking the ids up. The page is public HTML and is read under the
  actor's own name: what it refuses is a User-Agent carrying a link to apify.com, not a
  non-browser client, so no browser disguise is used anywhere.
- The source is public and keyless; a refusal from the marketplace comes back as a free status
  row with the platform's own words, never as an empty paid row.

# Actor input Schema

## `games` (type: `array`):

Games to price: a category link such as https://www.g2g.com/categories/aion-2-kinah, an id pair such as lgc_service_1/lgc_game_37781, or a bare game id such as 37781. The last line of the default list is not sold on g2g, so it comes back free.

## `country` (type: `string`):

Which regional storefront the prices are quoted for: US, UA, DE, GB, FR, PL, BR, CA, AU or JP. It changes the currency mix and the offers a seller exposes, so keep it fixed when you track a price over time.

## `currency` (type: `string`):

Currency of the quoted price: USD, EUR, GBP, UAH, PLN, BRL, CAD, AUD or JPY. The marketplace converts the seller's own currency, so a price quoted in USD is the one a US buyer really pays.

## `maxGroupsPerGame` (type: `integer`):

How many offer groups (server or region slices) the row carries, cheapest first. The whole market is read either way, so cheapestPrice is the real lowest price and groupsInSource counts every group; this cap only limits what the row keeps. Default 20, maximum 100.

## `maxGames` (type: `integer`):

How many lines of the list this run reads. Default and maximum 200; a line past the cap comes back as a free NOT_CHECKED_CAP row that names the cap. Two lines that resolve to the same game are one paid row: the second is a free DUPLICATE row.

## Actor input object example

```json
{
  "games": [
    "https://www.g2g.com/categories/aion-2-kinah",
    "35181",
    "https://www.g2g.com/categories/this-game-does-not-exist-xyz-2026"
  ],
  "country": "US",
  "currency": "USD",
  "maxGroupsPerGame": 20,
  "maxGames": 200
}
```

# Actor output Schema

## `dataset` (type: `string`):

One row per game. Paid rows carry groupsInSource (every group the game has), groupsInSourceComplete, pagesRead, groupsReturned, cheapestPrice, cheapestTitle, busiestOffers and the groups array with each group's price, stock, offer count and seller (sellerName, sellerId, sellerScore, sellerSatisfactionRate, sellerReviews, sellerRanking); every other row is a free status row with a reason and no price data. Status rows are written in batches of up to 100, so sort by actorIndex to get the input order back.

## `summary` (type: `string`):

Counters of the run: requested, attempted, delivered, chargedEvents, deliveredUncharged, deliveredUnverified, chargeUncertain, gamesNotFound, gamesInvalid, cutByLimit, byStatus, counterMismatch, stopReason, datasetNote, firstFailure and priceNote. The bare RUN_SUMMARY lives in the default store of the run; a copy under RUN_SUMMARY-<runId> is kept in the named store g2g-offer-summary so two runs do not overwrite each other.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "games": [
        "https://www.g2g.com/categories/aion-2-kinah",
        "35181",
        "https://www.g2g.com/categories/this-game-does-not-exist-xyz-2026"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("stas_k/g2g-offer-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "games": [
        "https://www.g2g.com/categories/aion-2-kinah",
        "35181",
        "https://www.g2g.com/categories/this-game-does-not-exist-xyz-2026",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("stas_k/g2g-offer-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "games": [
    "https://www.g2g.com/categories/aion-2-kinah",
    "35181",
    "https://www.g2g.com/categories/this-game-does-not-exist-xyz-2026"
  ]
}' |
apify call stas_k/g2g-offer-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,stas_k/g2g-offer-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gyQGAfllKPnKIhxVI/builds/IMs9pEaoVMFRCv3Dn/openapi.json
