G2 Product comparison API
Temporarily unavailable
We are restoring this capability. Until then calls usually fail or return no results; failed calls and empty results are not charged.
API health
- 24h health
- Temporarily unavailable
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Compare the G2 products named in slugs on one comparison page. Get each product's rating and review count, ratings by dimension and the alternatives the page suggests. Slugs are joined with -vs- into the page path. You can also pass a ready-made combined_slug.
Send POST https://api.everyinfra.com/api/v1/social with platform set to g2 and action set to compare. Price $1.39 per 1,000 requests ($0.001389 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
G2 Product comparison reads one G2 comparison page, the side-by-side view of software products, and returns the page url, its combined_slug, the product entries in products with product_count, the rating details broken down by dimension in ratings, and the alternative products the page suggests in alternatives_shown, each with its slug, name and link. Software buyers use it to see where products differ dimension by dimension, and product marketers use it to track how their product scores against named rivals.
Name the products in slugs, or point at a comparison page you already have with combined_slug or url. The returned combined_slug is the comparison's combined slug, the part of the address after /compare/, so store it with the date of each call to set later readings of the same page against earlier ones.
AI prompt
#Please help me write a data collection script with the EveryInfra G2 Product comparison endpoint (g2/compare).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to g2 and action to compare, and put the parameters inside params.
- Required parameters:
- slugs: Specifies an array of product slugs or product URLs for the compare action, which are automatically joined with -vs- to construct the G2 comparison path.
- Optional parameters:
- combined_slug: Specifies the pre-joined comparison path slug following /compare/ for the compare action, taking precedence over auto-generated slug arrays.
- url: Specifies the target G2 resource URL or bare slug. For profile, reviews, and alternatives, pass a /products/<slug> URL or product slug; for vendor, pass a /sellers/<slug> URL or seller slug.
- Returns one object. Main fields: url, combined_slug, product_count, products, ratings, alternatives_shown.
- Example request body:
{
"platform": "g2",
"action": "compare",
"params": {
"slugs": [
"slack",
"microsoft-teams"
]
}
}
- Price: $1.39 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
#| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | g2 | Platform identifier, fixed value. |
action | body | string | Yes | compare | Capability identifier, fixed value. |
slugs | body.params | array | Yes | - | Specifies an array of product slugs or product URLs for the compare action, which are automatically joined with -vs- to construct the G2 comparison path. This parameter does not execute separate parallel queries or accept vendor names; choose product combinations with existing G2 comparison pages. |
combined_slug | body.params | string | No | - | Specifies the pre-joined comparison path slug following /compare/ for the compare action, taking precedence over auto-generated slug arrays. It does not accept single vendor-and-product identifiers, and passing an explicit url parameter takes higher precedence. |
url | body.params | string | No | - | Specifies the target G2 resource URL or bare slug. For profile, reviews, and alternatives, pass a /products/<slug> URL or product slug; for vendor, pass a /sellers/<slug> URL or seller slug. For compare, passing a full /compare/ URL overrides auto-generated paths, though the required slugs parameter must still be supplied. |
Code samples
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "g2",
"action": "compare",
"params": {
"slugs": [
"slack",
"microsoft-teams"
]
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
#{ "id": "req_…", "platform": "g2", "action": "compare", "results": { "url": …, "combined_slug": …, "product_count": …, "products": …, "ratings": …, "alternatives_shown": …, "platform": … }, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
Response fields
#Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
url | Link to the record on the platform. |
combined_slug | Keeps the platform's own meaning |
product_count | Keeps the platform's own meaning |
products | Keeps the platform's own meaning |
ratings | Keeps the platform's own meaning |
alternatives_shown | Keeps the platform's own meaning |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
FAQ
#How do I name the products to compare?
#Put them in slugs as an array of strings, one per product, using each product's G2 slug, the part after /products/ in its G2 link, or the full product URL. The slugs are joined with -vs- to build the address of the comparison page. G2 Search returns product links you can take the slugs from.
Which input wins if I send more than one?
#The full comparison url comes first, then combined_slug, the part of the address after /compare/, and only then slugs. Send just one of them to keep the request clear; if you copied a comparison page from your browser, pass it whole as url and leave out the slugs.
What does ratings contain?
#ratings holds the rating details the comparison page breaks down by dimension, so you can see where products differ instead of relying on one overall score. Read it next to alternatives_shown, the alternative products the page suggests beyond the ones you named; each comes with a slug you can pass to G2 Reviews.
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.