G2 V2 API
Introduction
There are 2 releases of G2 API: 1. Legacy - V1 API 2. Current - V2 API
Current - V2 API will be described in this document, while V1 API can be accessed by this link.
If you are looking for the API Implementation Guide of the G2 V2 API, as well as best practices, please refer to the API Implementation document.
If you are looking for the API Design Guide of the G2 V2 API, as well as best practices, please refer to the API Design Guide document.
Table of Contents
The G2 V2 API is built on OpenAPI 3.0 specification. More about OpenAPI can be found here
Tooling
Swagger UI
To support the OpenAPI 3.0 specification, the G2 API uses the Swagger UI to provide a user-friendly interface to interact with the API. The Swagger UI can be accessed here for production environment and following is the link for your local dev environment: dev docs .
Testing the API
The Swagger UI provides a way to interact with the API without needing to write any code. You can make requests to the API and see the responses in real-time. The Swagger UI also provides a way to generate code snippets in various languages to help you get started with your API integration.
In the Swagger UI, you can click on the Authorize
button and enter your API key to authenticate your requests (setting and getting API keys is described in Authentication section). Once you have authenticated, you can start making requests to the API.
If you are testing the local dev environment, you need to change the defaultHost
URL to https://data.g2.test
in the Swagger UI.
Other ways of testing the API
You can also download the generated schema yml file from the Swagger UI by clicking on the /openapi/v2.yaml link bellow the heading of the Swagger UI, downloading the schema definition and then importing it into your favorite API testing tool, like Postman, Insomnia, or Paw.
For example this is how Insomnium look like after importing the schema:
Authentication
The API requires an authentication token for access. You can generate a token from the integrations page.
If your account does not have permissions to connect to an endpoint, talk to your Account Executive to learn about how to gain access.
Rate Limits
The API has a global rate limit of 100 requests per second. If you exceed that limit your access will be blocked for 60 seconds.
Date format
Use rfc3339 format for all dates when submitting query parameters on your requests. Here are some examples of rfc3339 formatted dates:
2019-10-02T10:00:00-05:00
2019-10-02T15:00:00Z
2019-10-02T15:00:00.05Z
Pagination format
The G2 API enables pagination via page[size]
and page[number]
query parameters on GET requests to index pages.
The default page size is 10 items, with the maximum page size being 100 on most endpoints - some endpoints will have lower limits and this will be noted in their specific docs.
page[size]
Number of results returned per request (default: 10, max: 100)
page[number]
When paging through results, page[number]
specifies which page you want. (default: 1)
Filtering Collections
The G2 API allows filtering of records by passing along query parameters.
These are some of the filters currently allowed by the API (where relevant).
Index Filters
Arguments | Description |
---|---|
updated_at_lt | Return objects only updated before |
updated_at_gt | Return objects only updated since |
order | The order to return the collection i.e “?order=created_at desc” |
page[size] | See Pagination (default is 10) |
page[number] | See Pagination |
In addition, each record type has their own specific filters; these filters are covered in their respective sections.
Response Metadata
Every response returned from the G2 API returns some useful pieces of information in the response headers.
Request IDs
Every response will include an X-Request-ID
parameter unique to that specific request.
If you need to contact us about a specific request, please make sure to include the specific request ID in any communication with us to help speed up investigations.
Shared response fields
data
every list endpoint will return the results as an array under this keylinks
contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively.
Pagination Links
Every response that returns a collection will include pagination data in the meta and links objects.
meta[record_count]
: The total number of records matching the filters (excludespage
&limit
params).meta[page_count]
: The total number of pages of records matching the filters.links[first]
: Link to the first page of results.links[last]
: Link to the last page of results.links[next]
: Link to the next page of results if applicable.links[prev]
: Link to the previous page of results if applicable
Errors
The G2 API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request – You have passed a malformed request |
401 | Unauthorized – Your API key is incorrect |
402 | Payment Required – Your subscription has lapsed |
403 | Forbidden – The resource requested is not available with your permissions |
404 | Not Found – The specified resource could not be found |
414 | Request URI too long – You have applied too many filters on a GET request |
422 | Unprocessable Entity – Your request is invalid |
429 | Too Many Requests – You are allowed 100 requests per second |
500 | Internal Server Error – We had a problem with our server. Try again later |
503 | Service Unavailable (Time out) – The server is overloaded or down for maintenance |
Answers
G2 Answers are read-only models. G2 Reviews provide a snapshot of the 4 primary review questions; for the complete review response, you will need to fetch the answers of a Review to get the whole picture.
List
Endpoint
GET /api/v1/answers
Curl Request
curl -g "data.g2.com/api/v1/answers" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "150", "type": "answers", "links": { "self": "https://data.g2.com/api/v1/answers/150" }, "attributes": { "value": null, "question_type": "industry", "question_text": "What is your industry when using this product?", "input_type": "dropdown", "product_id": "9fec7624-e298-4122-a356-6655c0f10a52", "survey_response_id": 63, "question_id": 180, "created_at": "2024-04-26T09:15:14.905-05:00", "updated_at": "2024-04-26T09:15:14.905-05:00" }, "relationships": { "survey_response": { "links": { "self": "https://data.g2.com/api/v1/answers/150/relationships/survey-response", "related": "https://data.g2.com/api/v1/answers/150/survey-response" } }, "question": { "links": { "self": "https://data.g2.com/api/v1/answers/150/relationships/question", "related": "https://data.g2.com/api/v1/answers/150/question" } } } } ], "meta": { "record_count": 1, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/answers?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/answers?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
filter[product_id] | Filter answers by the product UUID |
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page |
filter[updated_at_gt] | Min time for when a record was last updated. Using rfc3339 format. |
filter[updated_at_lt] | Max time for when a record was last updated. Using rfc3339 format. |
Response Fields
value | The answer to the question |
question_id | ID of the question the answer was written for |
question_type | The type of question |
question_text | The specific question asked |
input_type | Input format. i.e. text, dropdown, boolean |
product_id | UUID of the product the answer was written for |
survey_response_id | ID of the review the answer was written for |
data | Returns the results as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
Show
Endpoint
GET /api/v1/answers/:id
Curl Request
curl -g "data.g2.com/api/v1/answers/148" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "148", "type": "answers", "links": { "self": "https://data.g2.com/api/v1/answers/148" }, "attributes": { "value": null, "question_type": "industry", "question_text": "What is your industry when using this product?", "input_type": "dropdown", "product_id": "df7213f9-af7d-4a65-a16c-f271eccdcca0", "survey_response_id": 61, "question_id": 178, "created_at": "2024-04-26T09:15:14.154-05:00", "updated_at": "2024-04-26T09:15:14.154-05:00" }, "relationships": { "survey_response": { "links": { "self": "https://data.g2.com/api/v1/answers/148/relationships/survey-response", "related": "https://data.g2.com/api/v1/answers/148/survey-response" } }, "question": { "links": { "self": "https://data.g2.com/api/v1/answers/148/relationships/question", "related": "https://data.g2.com/api/v1/answers/148/question" } } } } }
Parameters
filter[product_id] | Filter answers by the product UUID |
Response Fields
value | The answer to the question |
question_id | ID of the question the answer was written for |
question_type | The type of question |
question_text | The specific question asked |
input_type | Input format. i.e. text, dropdown, boolean |
product_id | UUID of the product the answer was written for |
survey_response_id | ID of the review the answer was written for |
BuyerIntent::Companies
Show
Endpoint
GET /api/v1/ahoy/companies/:id
Curl Request
curl -g "data.g2.com/api/v1/ahoy/companies/123" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "123", "type": "companies", "links": { "self": "https://data.g2.com/api/v1/ahoy/companies/123" }, "attributes": { "name": "Company Name", "legal_name": "Company Name, LLC", "domain": "company-name.com", "domain_aliases": [ ], "external_id": "dc928287-4d09-xxxx-xxxx-xxxxx", "twitter": "CompanyName", "twitter_id": "13133002", "twitter_bio": "Email support@company-name.com", "twitter_followers": 8426, "twitter_following": 3957, "twitter_location": "Boulder, CO", "twitter_site": "", "twitter_avatar": "", "linkedin": null, "facebook": "company-name", "url": "https://www.company-name.com/", "site_title": "Company Name", "site_h1": "", "site_meta": "", "site_author": null, "tags": [ ], "tech": [ ], "description": "", "founded_year": 2006, "location": "", "time_zone": "America/Denver", "utc_offset": -6, "crunchbase": "organization/company-name", "email_provider": false, "company_type": "private", "alexa_us_rank": 1000, "alexa_global_rank": 1234, "market_cap": null, "raised": null, "employees": 100, "employees_range": "51-250", "annual_revenue": null, "street_number": "1234", "street_name": "Company Name Circle", "sub_premise": "100", "city": "Boulder", "state": "Colorado", "state_code": "CO", "postal_code": "12345", "country": "United States", "country_code": "US", "latitude": "", "longitude": "" } } }
Parameters
id | Find companies that match provided ids |
Response Fields
name | Name of company |
legal_name | Legal name of company |
domain | Domain of company’s website |
domain_aliases | List of domains also used by the company |
external_id | Clearbit ID for company |
Company's Twitter username | |
twitter_id | Company's Twitter ID |
twitter_bio | Company's Twitter bio |
twitter_followers | Company's Twitter followers count |
twitter_following | Company's Twitter following count |
twitter_location | Company's Twitter location |
twitter_site | Company's Twitter URL |
twitter_avatar | Company's Twitter logo |
Company's LinkedIn profile | |
Company's Facebook profile | |
url | URL of company's website |
site_title | Page title of company's website |
site_h1 | Page heading of company's website |
site_meta | Page meta of company's website |
site_author | Page author of company's website |
tags | List of market categories |
tech | List of known technologies used |
description | Description of the company |
founded_year | Year company was founded |
location | Address of company |
time_zone | The timezone for the company’s location |
utc_offset | The offset from UTC in hours in the company’s location |
crunchbase | Crunchbase handle |
email_provider | If the domain is associated with a free email provider (i.e. Gmail)? |
company_type | The company’s type, either education, government, nonprofit, private, public, or personal |
alexa_us_rank | Alexa’s US site rank |
alexa_global_rank | Alexa’s global site rank |
market_cap | Market Cap |
raised | Total amount raised |
employees | Amount of employees |
employees_range | Employees range |
annual_revenue | Annual Revenue (public companies only) |
street_number | Headquarters street number |
street_name | Headquarters street name |
sub_premise | Headquarters suite number |
city | Headquarters city name |
state | Headquarters state name |
state_code | Headquarters two character state code |
postal_code | Headquarters postal/zip code |
country | Headquarters country name |
country_code | Headquarters two character country code |
latitude | Headquarters latitude |
longitude | Headquarters longitude |
BuyerIntent::EventStreams
View recent visitors to profile pages for a specific company. We only provide the event if our tracking identifies the visitor’s Organization. We send events for direct visits to the Product profile, comparisons, or category page of given product. We also send an event whenever a user views sponsored content. This endpoint provides up to the last 24 hours of events.
List
Endpoint
GET /api/v1/ahoy/remote-event-streams
Curl Request
curl -g "data.g2.com/api/v1/ahoy/remote-event-streams" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "1", "type": "remote_event_streams", "links": { "self": "https://data.g2.com/api/v1/ahoy/remote-event-streams/1" }, "attributes": { "visitor_id": "12345", "url": "", "tag": "products.reviews", "time": "2017-05-19T14:32:33.005-05:00", "title": "", "product_ids": [ ], "category_ids": [ ], "user_location": { }, "organization": "", "created_at": "2017-05-19T14:32:33.005-05:00" }, "relationships": { "company": { "links": { "self": "https://data.g2.com/api/v1/ahoy/remote-event-streams/1/relationships/company", "related": "https://data.g2.com/api/v1/ahoy/remote-event-streams/1/company" } }, "industry": { "links": { "self": "https://data.g2.com/api/v1/ahoy/remote-event-streams/1/relationships/industry", "related": "https://data.g2.com/api/v1/ahoy/remote-event-streams/1/industry" } } } } ], "meta": { "record_count": 0, "page_count": null }, "links": { "first": "https://data.g2.com/api/v1/ahoy/remote-event-streams?page%5Bnumber%5D=1&page%5Bsize%5D=10", "next": "https://data.g2.com/api/v1/ahoy/remote-event-streams?page%5Bnumber%5D=2&page%5Bsize%5D=10" } }
Parameters
page[size] | Pagination size (default: 10, max: 25) |
filter[start_time] | Min time for when an event was stored (created_at). Using rfc3339 format. |
filter[end_time] | Max time for when an event was stored (created_at). Using rfc3339 format. |
Response Fields
visitor_id | Session ID for the visitor |
url | URL of the event's location |
tag | Specific tag of the event |
time | The time the event occurred |
created_at | The time the event was stored |
title | Name of the event |
product_ids | List of product names where the event occurred if applicable |
category_ids | List of category names where the event occurred if applicable |
user_location | Location of the User |
organization | Name of the organization received events |
BuyerIntent::History
The Buyer Intent History endpoint allows for searching through the activity of buyer intent for a product. Useful for looking at how intent has changed over time, or just to see what has been happening in the past week. Data is grouped by company, and up to a years worth of data can be presented.
List
Endpoint
GET /api/v1/intent-history
Curl Request
curl -g "data.g2.com/api/v1/intent-history" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "120", "type": "intent_histories", "links": { "self": "https://data.g2.com/api/v1/intent-history/120" }, "attributes": { "company_name": "Example", "company_domain": "example.com", "company_country": "United States", "company_state": "Texas", "total_pageviews": 15, "direct_pageviews": 3, "product_profile_pageviews": 2, "pricing_pageviews": 1, "sponsored_content_pageviews": 0, "category_pageviews": null, "comparison_pageviews": null, "competitor_pageviews": null, "visitor_count": null, "intent_score": 100, "activity_level": "high", "buying_stage": "decision", "last_seen_at": "2018-07-17T14:52:21.223Z", "compared_products": [ ] }, "relationships": { "product": { "links": { "self": "https://data.g2.com/api/v1/intent-history/120/product", "related": "https://data.g2.com/api/v1/intent-history/120/product" } }, "company": { "links": { "self": "https://data.g2.com/api/v1/intent-history/120", "related": "https://data.g2.com/api/v1/intent-history/120" } } } } ], "meta": { "record_count": 2202, "page_count": 221 }, "links": { "first": "https://data.g2.com/api/v1/intent-histories?page%5Bnumber%5D=1&page%5Bsize%5D=10", "next": "https://data.g2.com/api/v1/intent-histories?page%5Bnumber%5D=2&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/intent-histories?page%5Bnumber%5D=221&page%5Bsize%5D=10" } }
Parameters
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page |
filter[visit_at_gt] | "Visit at greater than." Min time for when the intent activity occurred. Using rfc3339 format. |
filter[visit_at_lt] | "Visit at less than." Max time for when the intent activity occurred. Using rfc3339 format. |
BuyerIntent::TrackProspects
View conversions captured by the ‘Track your Prospects’ tool. A conversion is created whenever someone views a page that has been flagged with a pixel by your team, and also viewed your product on G2. The result will indicate which action occurred first.
List
Endpoint
GET /api/v1/attribution_tracking/remote-conversions
Curl Request
curl -g "data.g2.com/api/v1/attribution_tracking/remote-conversions" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "1", "type": "remote_conversions", "links": { "self": "https://data.g2.com/api/v1/attribution-tracking/remote-conversions/1" }, "attributes": { "first_seen": { "occurred_at": "2018-03-01T06:27:46.208-06:00", "scope": "external", "path": "https://example.com/contact-us/" }, "last_seen": { "occurred_at": "2018-03-01T06:28:42.976-06:00", "scope": "internal", "path": "/products/product-id/reviews" }, "saw_first": "external", "isp": false, "industry": "Diversified Consumer Services", "organization": "Example", "external_id": null, "visitor_id": "9b5d03fb-8b06-4270-8aab-49b4ca3bb497" } } ], "meta": { "record_count": 0, "page_count": null }, "links": { "first": "https://data.g2.com/api/v1/attribution-tracking/remote-conversions?page%5Bnumber%5D=1&page%5Bsize%5D=10", "next": "https://data.g2.com/api/v1/attribution-tracking/remote-conversions?page%5Bnumber%5D=2&page%5Bsize%5D=10" } }
Response Fields
timestamp | Timestamp when visitor was last seen |
scope | Internal or external, indicates whether the visitor was last seen on G2.com properties or other sites. |
path | If the visitor has an internal scope, this is a URL path on G2.com, if the visitor was external, it is a full URL |
timestamp | Timestamp when visitor was first seen |
scope | Internal or external, indicates whether the visitor was first seen on G2.com properties or other sites. |
path | If the visitor has an internal scope, this is a URL path on G2.com, if the visitor was external, it is a full URL |
saw_first | Indicates whether user was first tracked on a G2.com property or external site. |
isp | True/False whether visitor's organization is likely an ISP |
industry | Industry of visitor |
organization | Organization of visitor |
external_id | Trackable external ID |
visitor_id | Session ID for the visitor |
Categories
List
Endpoint
GET /api/v1/categories
Curl Request
curl -g "data.g2.com/api/v1/categories" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "0c1f6ac0-f46f-42b6-8c29-f092a4277db8", "type": "categories", "links": { "self": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8" }, "attributes": { "name": "test", "slug": "test-0c657bca-a63a-4012-af53-cf37dd6c58f8", "description": "test", "updated_at": "2024-04-26T09:15:10.637-05:00" }, "relationships": { "products": { "links": { "self": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/relationships/products", "related": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/products" } }, "children": { "links": { "self": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/relationships/children", "related": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/children" } }, "ancestors": { "links": { "self": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/relationships/ancestors", "related": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/ancestors" } }, "descendants": { "links": { "self": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/relationships/descendants", "related": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/descendants" } }, "parent": { "links": { "self": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/relationships/parent", "related": "https://data.g2.com/api/v1/categories/0c1f6ac0-f46f-42b6-8c29-f092a4277db8/parent" } } } } ], "meta": { "record_count": 1, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/categories?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/categories?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
slug | URL slug of the category |
name | Name of the category |
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page |
filter[updated_at_gt] | Min time for when a record was last updated. Using rfc3339 format. |
filter[updated_at_lt] | Max time for when a record was last updated. Using rfc3339 format. |
Response Fields
name | Name of the Category |
slug | URL slug of the category. e.g. https://www.g2.com/categories/:slug |
description | Short blurb explaining what products fit in this category. |
data | Returns the results as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
Show
Endpoint
GET /api/v1/categories/:id
Curl Request
curl -g "data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "703af303-034d-40fa-ae86-17c3381c567d", "type": "categories", "links": { "self": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d" }, "attributes": { "name": "test", "slug": "test-dde7dd5d-47b0-4384-97b5-ab2445996a27", "description": "test", "updated_at": "2024-04-26T09:15:09.824-05:00" }, "relationships": { "products": { "links": { "self": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/relationships/products", "related": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/products" } }, "children": { "links": { "self": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/relationships/children", "related": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/children" } }, "ancestors": { "links": { "self": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/relationships/ancestors", "related": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/ancestors" } }, "descendants": { "links": { "self": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/relationships/descendants", "related": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/descendants" } }, "parent": { "links": { "self": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/relationships/parent", "related": "https://data.g2.com/api/v1/categories/703af303-034d-40fa-ae86-17c3381c567d/parent" } } } } }
Parameters
slug | URL slug of the category |
name | Name of the category |
Response Fields
name | Name of the Category |
slug | URL slug of the category. e.g. https://www.g2.com/categories/:slug |
description | Short blurb explaining what products fit in this category. |
Products
G2 Products are read-only models. All Reviews and Answers belong to a specific G2 Product, this is most likely one of the core objects that you will be interacting with in the API.
List
Endpoint
GET /api/v1/products
Curl Request
curl -g "data.g2.com/api/v1/products" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "6a9eeb5a-015c-4ceb-83d4-92f813d16499", "type": "products", "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499" }, "attributes": { "product_type": "Software", "name": "test product 20", "short_name": "test product 20", "domain": "example.com", "slug": "test-product-20", "description": "Description of product", "detail_description": "Vendor inputted description of product", "image_url": null, "product_url": null, "review_count": 0, "star_rating": 2.5, "avg_rating": "5.0", "public_detail_url": "https://www.g2.com/products/test-product-20/reviews", "updated_at": "2024-04-26T09:15:12.434-05:00", "created_at": "2024-04-26T09:15:12.403-05:00" }, "relationships": { "categories": { "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/relationships/categories", "related": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/categories" } }, "survey_responses": { "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/relationships/survey-responses", "related": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/survey-responses" } }, "competitors": { "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/relationships/competitors", "related": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/competitors" } }, "main_category": { "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/relationships/main-category", "related": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/main-category" } }, "vendor": { "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/relationships/vendor", "related": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/vendor" } }, "product_rating": { "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/relationships/product-rating", "related": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/product-rating" } }, "product_features": { "links": { "self": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/relationships/product-features", "related": "https://data.g2.com/api/v1/products/6a9eeb5a-015c-4ceb-83d4-92f813d16499/product-features" } } } } ], "meta": { "record_count": 1, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/products?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/products?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
filter[name] | Filter products by name |
filter[domain] | Filter products by domain name |
filter[slug] | Filter products by unique URL slug |
Response Fields
product_type | Type of product. i.e. Software, Provider, Hardware, ProductSuite |
name | Name of the product |
short_name | Name or shortened name of the product |
domain | Domain of product's website |
slug | URL slug of the product. e.g. https://www.g2.com/product/:slug/reviews |
description | Internal description of product |
detail_description | Seller-input description of product |
image_url | URL of product's logo |
product_url | URL of product's about page |
review_count | Total number of published reviews on G2 |
star_rating | Average rating between 0-5 |
avg_rating | Average rating between 0-10 |
public_detail_url | Link to product's reviews page on G2 |
languages_supported | Languages this product supports |
List Reviews for Product
Endpoint
GET /api/v1/products/:id/survey-responses
Curl Request
curl -g "data.g2.com/api/v1/products/ac7841ad-cca8-4125-ac6f-6ef6b5848781/survey-responses" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "50", "type": "survey_responses", "links": { "self": "https://data.g2.com/api/v1/survey-responses/50" }, "attributes": { "default_sort": 0.0, "product_name": "test product 21", "is_public": true, "slug": "test-product-21-review-50", "percent_complete": null, "star_rating": 0.0, "title": null, "comment_answers": { }, "secondary_answers": { }, "verified_current_user": false, "is_business_partner": false, "review_source": "Organic review. This review was written entirely without invitation or incentive from G2, a seller, or an affiliate.", "votes_up": 0, "votes_down": 0, "votes_total": 0, "user_id": "3e8ec764-18e9-4f59-8ec6-0822fd2844de", "user_name": "alex smith", "user_image_url": null, "country_name": null, "regions": [ ], "submitted_at": "2024-04-26T09:15:12.720-05:00", "updated_at": "2024-04-26T09:15:12.704-05:00", "moderated_at": null, "product_id": "ac7841ad-cca8-4125-ac6f-6ef6b5848781", "reference_user_consent": "accepted", "status": "approved" }, "relationships": { "product": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/50/relationships/product", "related": "https://data.g2.com/api/v1/survey-responses/50/product" } }, "questions": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/50/relationships/questions", "related": "https://data.g2.com/api/v1/survey-responses/50/questions" } }, "answers": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/50/relationships/answers", "related": "https://data.g2.com/api/v1/survey-responses/50/answers" } } } } ], "meta": { "record_count": 1, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/products/ac7841ad-cca8-4125-ac6f-6ef6b5848781/survey-responses?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/products/ac7841ad-cca8-4125-ac6f-6ef6b5848781/survey-responses?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
filter[name] | Filter products by name |
filter[domain] | Filter products by domain name |
filter[slug] | Filter products by unique URL slug |
page[size] | Pagination size |
page[number] | Pagination page |
Response Fields
product_type | Type of product. i.e. Software, Provider, Hardware, ProductSuite |
name | Name of the product |
short_name | Name or shortened name of the product |
domain | Domain of product's website |
slug | URL slug of the product. e.g. https://www.g2.com/product/:slug/reviews |
description | Internal description of product |
detail_description | Seller-input description of product |
image_url | URL of product's logo |
product_url | URL of product's about page |
review_count | Total number of published reviews on G2 |
star_rating | Average rating between 0-5 |
avg_rating | Average rating between 0-10 |
public_detail_url | Link to product's reviews page on G2 |
languages_supported | Languages this product supports |
Show
Endpoint
GET /api/v1/products/:id
Curl Request
curl -g "data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "8a84257f-e834-49e5-bfba-fe0cbce27451", "type": "products", "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451" }, "attributes": { "product_type": "Software", "name": "test product 11", "short_name": "test product 11", "domain": "example.com", "slug": "test-product-11", "description": "Description of product", "detail_description": "Vendor inputted description of product", "image_url": null, "product_url": null, "review_count": 0, "star_rating": 2.5, "avg_rating": "5.0", "public_detail_url": "https://www.g2.com/products/test-product-11/reviews", "updated_at": "2024-04-26T09:15:11.081-05:00", "created_at": "2024-04-26T09:15:11.052-05:00" }, "relationships": { "categories": { "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/relationships/categories", "related": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/categories" } }, "survey_responses": { "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/relationships/survey-responses", "related": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/survey-responses" } }, "competitors": { "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/relationships/competitors", "related": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/competitors" } }, "main_category": { "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/relationships/main-category", "related": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/main-category" } }, "vendor": { "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/relationships/vendor", "related": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/vendor" } }, "product_rating": { "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/relationships/product-rating", "related": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/product-rating" } }, "product_features": { "links": { "self": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/relationships/product-features", "related": "https://data.g2.com/api/v1/products/8a84257f-e834-49e5-bfba-fe0cbce27451/product-features" } } } } }
Parameters
filter[name] | Filter products by name |
filter[domain] | Filter products by domain name |
filter[slug] | Filter products by unique URL slug |
Response Fields
product_type | Type of product. i.e. Software, Provider, Hardware, ProductSuite |
name | Name of the product |
short_name | Name or shortened name of the product |
domain | Domain of product's website |
slug | URL slug of the product. e.g. https://www.g2.com/product/:slug/reviews |
description | Internal description of product |
detail_description | Seller-input description of product |
image_url | URL of product's logo |
product_url | URL of product's about page |
review_count | Total number of published reviews on G2 |
star_rating | Average rating between 0-5 |
avg_rating | Average rating between 0-10 |
public_detail_url | Link to product's reviews page on G2 |
languages_supported | Languages this product supports |
Questions
G2 Questions are read-only models. Most API users won’t need to access questions, but they are helpful if you are attempting to build up a review form using our form schema.
List
Endpoint
GET /api/v1/questions
Curl Request
curl -g "data.g2.com/api/v1/questions" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "118", "type": "questions", "links": { "self": "https://data.g2.com/api/v1/questions/118" }, "attributes": { "title": "Industry", "text_template": "What is your industry when using this product?", "is_required": null, "description": null, "question_type": "industry", "input_type": "dropdown" }, "relationships": { "survey_responses": { "links": { "self": "https://data.g2.com/api/v1/questions/118/relationships/survey-responses", "related": "https://data.g2.com/api/v1/questions/118/survey-responses" } }, "answers": { "links": { "self": "https://data.g2.com/api/v1/questions/118/relationships/answers", "related": "https://data.g2.com/api/v1/questions/118/answers" } } } }, { "id": "119", "type": "questions", "links": { "self": "https://data.g2.com/api/v1/questions/119" }, "attributes": { "title": "Company Size", "text_template": "What is your company size when using this product?", "is_required": true, "description": null, "question_type": "company_size", "input_type": "dropdown" }, "relationships": { "survey_responses": { "links": { "self": "https://data.g2.com/api/v1/questions/119/relationships/survey-responses", "related": "https://data.g2.com/api/v1/questions/119/survey-responses" } }, "answers": { "links": { "self": "https://data.g2.com/api/v1/questions/119/relationships/answers", "related": "https://data.g2.com/api/v1/questions/119/answers" } } } }, { "id": "120", "type": "questions", "links": { "self": "https://data.g2.com/api/v1/questions/120" }, "attributes": { "title": "Product Direction", "text_template": "simplistic", "is_required": null, "description": null, "question_type": "direction", "input_type": "dropdown" }, "relationships": { "survey_responses": { "links": { "self": "https://data.g2.com/api/v1/questions/120/relationships/survey-responses", "related": "https://data.g2.com/api/v1/questions/120/survey-responses" } }, "answers": { "links": { "self": "https://data.g2.com/api/v1/questions/120/relationships/answers", "related": "https://data.g2.com/api/v1/questions/120/answers" } } } } ], "meta": { "record_count": 3, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/questions?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/questions?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
filter[question_type] | Internal name for the question |
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page |
filter[updated_at_gt] | Min time for when a record was last updated. Using rfc3339 format. |
filter[updated_at_lt] | Max time for when a record was last updated. Using rfc3339 format. |
Response Fields
title | Internal name of the question. |
text_template | Text value of the question |
is_required | True/False whether this question is required to be answered by the reviewer |
description | The actual question of the question model |
question_type | Internal name for the question. |
input_type | How the question should be displayed, can only be one of the following categories, comment, company_domain, dropdown, editions, email, employment_position, expertises, feature, field_tags, product_search, simple_7, slider_nps, product_integration, product_provider, text_field, suite_products, upload |
data | Returns the results as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
Show
Endpoint
GET /api/v1/questions/:id
Curl Request
curl -g "data.g2.com/api/v1/questions/112" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "112", "type": "questions", "links": { "self": "https://data.g2.com/api/v1/questions/112" }, "attributes": { "title": "Industry", "text_template": "What is your industry when using this product?", "is_required": null, "description": null, "question_type": "industry", "input_type": "dropdown" }, "relationships": { "survey_responses": { "links": { "self": "https://data.g2.com/api/v1/questions/112/relationships/survey-responses", "related": "https://data.g2.com/api/v1/questions/112/survey-responses" } }, "answers": { "links": { "self": "https://data.g2.com/api/v1/questions/112/relationships/answers", "related": "https://data.g2.com/api/v1/questions/112/answers" } } } } }
Parameters
filter[question_type] | Internal name for the question |
Response Fields
title | Internal name of the question. |
text_template | Text value of the question |
is_required | True/False whether this question is required to be answered by the reviewer |
description | The actual question of the question model |
question_type | Internal name for the question. |
input_type | How the question should be displayed, can only be one of the following categories, comment, company_domain, dropdown, editions, email, employment_position, expertises, feature, field_tags, product_search, simple_7, slider_nps, product_integration, product_provider, text_field, suite_products, upload |
RESThooks
This is an implementation of the RESThooks pattern, that you can read about at resthooks.org. You can subscribe a webhook endpoint to be notified of specific events within G2. A JSON message will be delivered to the endpoint that you provide, describing the event and including relevant attributes.
List
Endpoint
GET /api/v1/resource-subscriptions
Curl Request
curl -g "data.g2.com/api/v1/resource-subscriptions" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "12", "type": "resource_subscriptions", "links": { "self": "https://data.g2.com/api/v1/resource-subscriptions/12" }, "attributes": { "post_url": "http://www.example.com", "subscribed_resource": "leads", "updated_at": "2024-04-26T09:15:19.675-05:00", "product_uuid": "b6e7cb54-f61b-4bad-a45d-feec13773086", "product_id": 182 } } ], "meta": { "record_count": 1, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/resource-subscriptions?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/resource-subscriptions?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page |
filter[updated_at_gt] | Min time for when a record was last updated. Using rfc3339 format. |
filter[updated_at_lt] | Max time for when a record was last updated. Using rfc3339 format. |
Response Fields
post_url | URL where we should post the RESThook event |
subscribed_resource | The type of event we should post to the post_url |
product_uuid | UUID of the product to which you are subscribed |
product_id | ID of the product to which you are subscribed |
data | Returns the results as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
Show
Endpoint
GET /api/v1/resource-subscriptions/:id
Curl Request
curl -g "data.g2.com/api/v1/resource-subscriptions/8" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "8", "type": "resource_subscriptions", "links": { "self": "https://data.g2.com/api/v1/resource-subscriptions/8" }, "attributes": { "post_url": "http://www.example.com", "subscribed_resource": "leads", "updated_at": "2024-04-26T09:15:18.808-05:00", "product_uuid": "f64d4170-9af4-4fae-863a-f1ddd04faa0a", "product_id": 176 } } }
Response Fields
post_url | URL where we should post the RESThook event |
subscribed_resource | The type of event we should post to the post_url |
product_uuid | UUID of the product to which you are subscribed |
product_id | ID of the product to which you are subscribed |
Subscribe
Endpoint
POST /api/v1/resource-subscriptions
Curl Request
curl "data.g2.com/api/v1/resource-subscriptions" -d '{"data":{"type":"resource_subscriptions","attributes":{"subscribed_resource":"leads","post_url":"http://requestb.in"}}}' -X POST \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Request
POST /api/v1/resource-subscriptions HTTP/1.1 Authorization: Token token=secret Content-Type: application/vnd.api+json { "data": { "type": "resource_subscriptions", "attributes": { "subscribed_resource": "leads", "post_url": "http://requestb.in" } } }
Response
Simulated ResponseHTTP/1.1 201 Created Content-Type: application/vnd.api+json { "data": { "id": "10", "type": "resource_subscriptions", "links": { "self": "https://data.g2.com/api/v1/resource-subscriptions/10" }, "attributes": { "post_url": "http://requestb.in", "subscribed_resource": "leads", "updated_at": "2024-04-26T09:15:19.216-05:00", "product_uuid": "5d71e50e-6424-4cd6-841b-238b8327614a", "product_id": 177 } } }
Parameters
data[type] required | JSONAPI requires this value to be `resource_subscriptions` |
data[attributes][subscribed_resource] required | One of `leads`, `survey_responses`, or `attribution_tracking/remote_conversion` |
data[attributes][post_url] | Webhook target. When a new resource is created, we will emit a webhook to this URL |
Response Fields
post_url | URL where we should post the RESThook event |
subscribed_resource | The type of event we should post to the post_url |
product_uuid | UUID of the product to which you are subscribed |
product_id | ID of the product to which you are subscribed |
Un-subscribe
Endpoint
DELETE /api/v1/resource-subscriptions/:id
Curl Request
curl "data.g2.com/api/v1/resource-subscriptions/7" -d '' -X DELETE \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 204 No Content
Response Fields
post_url | URL where we should post the RESThook event |
subscribed_resource | The type of event we should post to the post_url |
product_uuid | UUID of the product to which you are subscribed |
product_id | ID of the product to which you are subscribed |
Reviews
A G2 Review is a denormalized object built from a series of Questions and Answers written by a G2 User, about a G2 Product.
List
Endpoint
GET /api/v1/survey-responses
Curl Request
curl -g "data.g2.com/api/v1/survey-responses" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "40", "type": "survey_responses", "links": { "self": "https://data.g2.com/api/v1/survey-responses/40" }, "attributes": { "default_sort": 0.0, "product_name": "test product 4", "is_public": true, "slug": "test-product-4-review-40", "percent_complete": null, "star_rating": 2.5, "title": "Review title", "comment_answers": { "love": { "text": "What do you like best?", "value": "I like..." }, "hate": { "text": "What do you dislike?", "value": "I dislike..." }, "recommendations": { "text": "What recommendations would you have?", "value": "I recommend..." }, "benefits": { "text": "What benefits have you realized?", "value": "I benefit..." } }, "secondary_answers": { }, "verified_current_user": false, "is_business_partner": false, "review_source": "Organic review. This review was written entirely without invitation or incentive from G2, a seller, or an affiliate.", "votes_up": 0, "votes_down": 0, "votes_total": 0, "user_id": "6a33185a-c2a9-4ca7-9072-ce23d8b7d7d7", "user_name": "alex smith", "user_image_url": null, "country_name": "United States", "regions": [ "North America" ], "submitted_at": "2024-04-26T09:15:05.616-05:00", "updated_at": "2024-04-26T09:15:05.600-05:00", "moderated_at": null, "product_id": "d6f29b13-6c45-4588-ada8-ccd1282abe5d", "reference_user_consent": "accepted", "status": "approved" }, "relationships": { "product": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/40/relationships/product", "related": "https://data.g2.com/api/v1/survey-responses/40/product" } }, "questions": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/40/relationships/questions", "related": "https://data.g2.com/api/v1/survey-responses/40/questions" } }, "answers": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/40/relationships/answers", "related": "https://data.g2.com/api/v1/survey-responses/40/answers" } } } } ], "meta": { "record_count": 1, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/survey-responses?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/survey-responses?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
filter[submitted_at_gt] | Min time for when a review was completed. Using rfc3339 format. |
filter[submitted_at_lt] | Max time for when a review was completed. Using rfc3339 format. |
filter[moderated_at_gt] | Min time for when a review was published. Using rfc3339 format. |
filter[moderated_at_lt] | Max time for when a review was published. Using rfc3339 format. |
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page |
filter[updated_at_gt] | Min time for when a record was last updated. Using rfc3339 format. |
filter[updated_at_lt] | Max time for when a record was last updated. Using rfc3339 format. |
Response Fields
default_sort | |
product_name | Name of the product |
is_public | True/False whether the reviewer permitted the review to be attributed to them |
slug | URL slug of the review. e.g. https://www.g2.com/products/:product_slug/reviews/:review_slug |
percent_complete | The percentage complete all Review Questions are |
star_rating | Rating between 0-5 |
title | Title of the Review |
comment_answers | Primary review question answers |
secondary_answers | Secondary review question answers |
verified_current_user | True/False whether the reviewer is verified |
is_business_partner | True/False whether the reviewer has a business relationship with the product |
review_source | Was the review organic or incentivised |
votes_up | Total votes indicating the review was helpful |
votes_down | Total votes indicating the review was not helpful |
votes_total | Total votes on the review |
user_id | Internal UUID of the Reviewer |
user_name | Name of the Reviewer |
country_name | Reviewer's country |
regions | Reviewer's geographical region(s) |
user_image_url | URL of reviewer's avatar |
submitted_at | Date review was submitted |
updated_at | Date review was last edited |
moderated_at | Date review was moderated |
product_id | UUID of the product the review was referencing |
reference_user_consent | Has the Reviewer provided permission to use this review content |
data | Returns the results as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
Show
Endpoint
GET /api/v1/survey-responses/:id
Curl Request
curl -g "data.g2.com/api/v1/survey-responses/46" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "46", "type": "survey_responses", "links": { "self": "https://data.g2.com/api/v1/survey-responses/46" }, "attributes": { "default_sort": 0.0, "product_name": "test product 8", "is_public": true, "slug": "test-product-8-review-46", "percent_complete": null, "star_rating": 2.5, "title": "Review title", "comment_answers": { "love": { "text": "What do you like best?", "value": "I like..." }, "hate": { "text": "What do you dislike?", "value": "I dislike..." }, "recommendations": { "text": "What recommendations would you have?", "value": "I recommend..." }, "benefits": { "text": "What benefits have you realized?", "value": "I benefit..." } }, "secondary_answers": { }, "verified_current_user": false, "is_business_partner": false, "review_source": "Organic review. This review was written entirely without invitation or incentive from G2, a seller, or an affiliate.", "votes_up": 0, "votes_down": 0, "votes_total": 0, "user_id": "e740b570-3d55-41e1-b227-0eb1d5e3aaf7", "user_name": "alex smith", "user_image_url": null, "country_name": "United States", "regions": [ "North America" ], "submitted_at": "2024-04-26T09:15:07.185-05:00", "updated_at": "2024-04-26T09:15:07.170-05:00", "moderated_at": null, "product_id": "d84ae122-5511-4f18-9bfd-e99f3d83a477", "reference_user_consent": "accepted", "status": "approved" }, "relationships": { "product": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/46/relationships/product", "related": "https://data.g2.com/api/v1/survey-responses/46/product" } }, "questions": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/46/relationships/questions", "related": "https://data.g2.com/api/v1/survey-responses/46/questions" } }, "answers": { "links": { "self": "https://data.g2.com/api/v1/survey-responses/46/relationships/answers", "related": "https://data.g2.com/api/v1/survey-responses/46/answers" } } } } }
Parameters
filter[submitted_at_gt] | Min time for when a review was completed. Using rfc3339 format. |
filter[submitted_at_lt] | Max time for when a review was completed. Using rfc3339 format. |
filter[moderated_at_gt] | Min time for when a review was published. Using rfc3339 format. |
filter[moderated_at_lt] | Max time for when a review was published. Using rfc3339 format. |
Response Fields
default_sort | |
product_name | Name of the product |
is_public | True/False whether the reviewer permitted the review to be attributed to them |
slug | URL slug of the review. e.g. https://www.g2.com/products/:product_slug/reviews/:review_slug |
percent_complete | The percentage complete all Review Questions are |
star_rating | Rating between 0-5 |
title | Title of the Review |
comment_answers | Primary review question answers |
secondary_answers | Secondary review question answers |
verified_current_user | True/False whether the reviewer is verified |
is_business_partner | True/False whether the reviewer has a business relationship with the product |
review_source | Was the review organic or incentivised |
votes_up | Total votes indicating the review was helpful |
votes_down | Total votes indicating the review was not helpful |
votes_total | Total votes on the review |
user_id | Internal UUID of the Reviewer |
user_name | Name of the Reviewer |
country_name | Reviewer's country |
regions | Reviewer's geographical region(s) |
user_image_url | URL of reviewer's avatar |
submitted_at | Date review was submitted |
updated_at | Date review was last edited |
moderated_at | Date review was moderated |
product_id | UUID of the product the review was referencing |
reference_user_consent | Has the Reviewer provided permission to use this review content |
Syndication::AnswerDistributions
Show
Endpoint
GET /api/2018-01-01/syndication/questions/:question_id/answer-distributions/:id
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/questions/177/answer-distributions/ce85d61e-6a09-47a7-a0ac-5fbb446297ec?category_id=ff3789a6-a4d5-4b06-9de7-d4fb76df4436" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": { "id": "ce85d61e-6a09-47a7-a0ac-5fbb446297ec", "type": "review_aggregates-answer_distributions", "attributes": { "z_score": -0.7071067811865475, "percentile": 23, "review_count": 30, "product_count": 2, "question": { "id": 177, "title": "NPS Question", "question_type": "nps", "description": null, "text": "How likely is it that you would recommend Product One to a friend or colleague?" }, "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" }, "category": { "ff3789a6-a4d5-4b06-9de7-d4fb76df4436": { "name": "test", "slug": "test", "description": "test", "product_count": 0 } } } } }
Parameters
id | The UUID of the reviewed product |
category_id | The UUID of the review category |
question_id | The ID of the question being answered |
Response Fields
data[attributes][id] | Returns the product ID |
data[attributes][attributes] | Returns statistical data about answer distributions and data about the product and question |
Syndication::Competitors
Show
Endpoint
GET /api/2018-01-01/syndication/products/:product_id/competitors
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/products/29777098-0af6-426d-b93a-b82197d5ef2c/competitors" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": [ { "id": "ee768234-4258-4c32-931f-46ef529285ea", "type": "software", "attributes": { "product": { "name": "test product 34", "domain": "example.com", "slug": "test-product-34", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": null, "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/test-product-34/reviews", "write_review_url": "https://www.g2.com/products/test-product-34/take_survey" }, "main_category": { "d567bdb1-3a6d-4f00-916f-c99229978a5c": { "name": "test", "slug": "test", "description": "test", "product_count": 0 } }, "categories": { "d567bdb1-3a6d-4f00-916f-c99229978a5c": { "name": "test", "slug": "test", "description": "test", "product_count": 0 } }, "relationships": { "product_ratings": { "links": { "self": "https://data.g2.com/api/syndication/products/ee768234-4258-4c32-931f-46ef529285ea/product_ratings" } } } } } ] }
Parameters
product_id | The UUID of the product |
per | Number of competitors to list |
Response Fields
data | Returns the competitor products as an array |
Syndication::IntegrationReviews
List
Endpoint
GET /api/2018-01-01/syndication/integration_reviews
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/integration_reviews?filter[product_id]=b50e2782-6723-4d26-a780-a2f524523401&filter[primary_product_id]=129d5ab1-a234-44ec-8e62-df895d639392" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": [ { "id": "4", "type": "integration_reviews", "attributes": { "product_name": "Product One", "primary_product_name": "Product Two", "submitted_at": "2024-04-19T09:15:17.743-05:00", "published_at": "2024-04-26T09:15:17.548-05:00", "answers": { "benefits": { "text": "What business problem are you solving with Product One's integration with Product Two? What benefits have you realized?", "value": "The benefits of integrating with Product Two are..." } }, "star_rating": 1.5, "user": { "industry": "Fishery", "company_segment": null, "name": "alex s.", "image": null, "title": null, "company": "ACME" }, "review": { "id": 65, "title": "Review Title", "g2crowd_url": "https://www.g2.com/survey_responses/product-one-review-65", "review_incentive": false, "verified_current_user": true } } } ], "links": { "self": "https://data.g2.com/api/2018-01-01/syndication/integration_reviews?filter%5Bprimary_product_id%5D=129d5ab1-a234-44ec-8e62-df895d639392&filter%5Bproduct_id%5D=b50e2782-6723-4d26-a780-a2f524523401&page%5Bnumber%5D=1&page%5Bsize%5D=10", "first": "https://data.g2.com/api/2018-01-01/syndication/integration_reviews?filter%5Bprimary_product_id%5D=129d5ab1-a234-44ec-8e62-df895d639392&filter%5Bproduct_id%5D=b50e2782-6723-4d26-a780-a2f524523401&page%5Bnumber%5D=1&page%5Bsize%5D=10", "prev": null, "next": null, "last": "https://data.g2.com/api/2018-01-01/syndication/integration_reviews?filter%5Bprimary_product_id%5D=129d5ab1-a234-44ec-8e62-df895d639392&filter%5Bproduct_id%5D=b50e2782-6723-4d26-a780-a2f524523401&page%5Bnumber%5D=1&page%5Bsize%5D=10" }, "meta": { "aggregates": [ { "filter_name": "nps_score", "nested_filter_name": null, "collection": [ { "id": 5, "text": "5 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 4, "text": "4 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 3, "text": "3 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 2, "text": "2 star", "count": 1, "checked": false, "nested_boxes": [ ] }, { "id": 1, "text": "1 star", "count": 0, "checked": false, "nested_boxes": [ ] } ], "expanded": true } ], "record_count": 1, "page_count": 1, "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": null, "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" } } }
Parameters
filter[product_id] required | The UUID of the product the integration reviews belong to |
filter[primary_product_id] required | The UUID of the primary product the product integrates with |
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page (default: 1) |
filter[nps_score][] | Valid Options: [1, 2, 3, 4, 5] |
filter[company_segment][] | Valid options are returned under aggregates |
Response Fields
data | Returns the integration reviews as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if there you are on the first or last page respectively. |
meta[aggregates] | This contains the data necessary for building filters.
[
{
filter_name: the parameter name of the filter to apply i.e.
filter[FILTER_NAME][]= ,
collection: [
{
"id": The id used for filtering i.e.
filter[FILTER_NAME][]=ID
Multiple values are permitted i.e.
filter[FILTER_NAME][]=ID&filter[FILTER_NAME][]=ID2 ,
"text": Human readable name of the filter option,
"count": # of review that match this filter,
"checked": True if the results are currently filtered by this option
}
]
}
]
|
meta[record_count] | Number of total reviews available |
meta[page_count] | Number of total pages of reviews available |
meta[product] | Details of the product the integration reviews belong to |
Syndication::ProductRatings
Show
Endpoint
GET /api/2018-01-01/syndication/products/:product_id/product_ratings
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/products/2e000472-2f23-4570-8412-69174e677428/product_ratings" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "ease_of_use": 0, "quality_of_support": 1.7, "ease_of_setup": 5.0 }
Parameters
product_id | The UUID of the reviewed product |
Response Fields
ease_of_use | Returns the average ease of use rating from 0-10 |
quality_of_support | Returns the average quality of support rating from 0-10 |
ease_of_setup | Returns the average ease of setup rating from 0-10 |
Syndication::Products
List
Endpoint
GET /api/2018-01-01/syndication/products?filter[product_id][]=:product_id&filter[product_id][]=:product2_id&vendor=true
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/products?filter[product_id][]=d2c8bdf8-3ebb-46fe-87b7-9caac01aa3cf&filter[product_id][]=d303519c-25f2-4de2-92aa-b7bb87d2e163&vendor=true" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": [ { "id": "d2c8bdf8-3ebb-46fe-87b7-9caac01aa3cf", "type": "software", "attributes": { "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" }, "main_category": { "71de4ec0-524b-4ebd-80ad-4e17e935c59e": { "name": "Example Category", "slug": "example-category", "description": "Example Category is...", "product_count": 1 } }, "categories": { "7fcca374-a1fd-412b-8e20-71683e318f53": { "name": "test", "slug": "test", "description": "test", "product_count": 0 }, "71de4ec0-524b-4ebd-80ad-4e17e935c59e": { "name": "Example Category", "slug": "example-category", "description": "Example Category is...", "product_count": 1 } }, "vendor": { "id": "4a4ff1f8-408e-463a-8955-ef74f909eb8c", "name": "Test Vendor", "slug": "test-vendor" }, "relationships": { "product_ratings": { "links": { "self": "https://data.g2.com/api/syndication/products/d2c8bdf8-3ebb-46fe-87b7-9caac01aa3cf/product_ratings" } } } } }, { "id": "d303519c-25f2-4de2-92aa-b7bb87d2e163", "type": "software", "attributes": { "product": { "name": "Product Two", "domain": "example.com", "slug": "product-two", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description Two", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-two/reviews", "write_review_url": "https://www.g2.com/products/product-two/take_survey" }, "main_category": { "43005f31-8ab3-4f09-b086-c7ff80caaa83": { "name": "test", "slug": "test-cc7b3fb9-eb8f-4dd8-bb2c-eee5cd742229", "description": "test", "product_count": 0 } }, "categories": { "43005f31-8ab3-4f09-b086-c7ff80caaa83": { "name": "test", "slug": "test-cc7b3fb9-eb8f-4dd8-bb2c-eee5cd742229", "description": "test", "product_count": 0 } }, "vendor": { "id": "e9e6b73d-1d42-4d31-83b7-71b712a60323", "name": "Test Vendor", "slug": "test-vendor-e62061b9-973f-4a8c-b0d9-14a782c0b03a" }, "relationships": { "product_ratings": { "links": { "self": "https://data.g2.com/api/syndication/products/d303519c-25f2-4de2-92aa-b7bb87d2e163/product_ratings" } } } } } ], "links": { "self": "https://data.g2.com/api/2018-01-01/syndication/products?filter%5Bproduct_id%5D%5B%5D=d2c8bdf8-3ebb-46fe-87b7-9caac01aa3cf&filter%5Bproduct_id%5D%5B%5D=d303519c-25f2-4de2-92aa-b7bb87d2e163&page%5Bnumber%5D=1&page%5Bsize%5D=10&vendor=true", "first": "https://data.g2.com/api/2018-01-01/syndication/products?filter%5Bproduct_id%5D%5B%5D=d2c8bdf8-3ebb-46fe-87b7-9caac01aa3cf&filter%5Bproduct_id%5D%5B%5D=d303519c-25f2-4de2-92aa-b7bb87d2e163&page%5Bnumber%5D=1&page%5Bsize%5D=10&vendor=true", "prev": null, "next": null, "last": "https://data.g2.com/api/2018-01-01/syndication/products?filter%5Bproduct_id%5D%5B%5D=d2c8bdf8-3ebb-46fe-87b7-9caac01aa3cf&filter%5Bproduct_id%5D%5B%5D=d303519c-25f2-4de2-92aa-b7bb87d2e163&page%5Bnumber%5D=1&page%5Bsize%5D=10&vendor=true" }, "meta": { "aggregates": [ { "filter_name": "star_rating", "collection": [ { "id": 0, "text": "Unrated", "count": 0 }, { "id": 1, "text": "1 Star", "count": 0 }, { "id": 2, "text": "2 Stars", "count": 0 }, { "id": 3, "text": "3 Stars", "count": 2 }, { "id": 4, "text": "4 Stars", "count": 0 }, { "id": 5, "text": "5 Stars", "count": 0 } ] } ], "record_count": 2, "page_count": 1 } }
Parameters
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page (default: 1) |
filter[star_rating][] | Valid Options: [1, 2, 3, 4, 5] |
filter[product_id][] | Filter products by ID |
filter[category_id][] | Filter products by category ID |
filter[vendor_name] | Filter products by name of company |
filter[review_count_gteq] | Filter products by review count equal to or greater than |
filter[slug] | Filter products to a specific slug |
vendor | Show vendor information (default: false) |
Response Fields
data | Returns the syndicated products as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
meta[aggregates] | This contains the data necessary for building filters.
[
{
filter_name: the parameter name of the filter to apply i.e.
filter[FILTER_NAME][]= ,
collection: [
{
"id": The id used for filtering i.e.
filter[FILTER_NAME][]=ID
Multiple values are permitted i.e.
filter[FILTER_NAME][]=ID&filter[FILTER_NAME][]=ID2 ,
"text": Human readable name of the filter option,
"count": # of review that match this filter,
"checked": True if the results are currently filtered by this option
}
]
}
]
|
meta[record_count] | Number of total products available |
meta[page_count] | Number of total pages of products available |
Show
Endpoint
GET /api/2018-01-01/syndication/products/:id?vendor=true
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/products/1ce1f4f2-e7bd-424b-b45c-04c6c855a366?vendor=true" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": { "id": "1ce1f4f2-e7bd-424b-b45c-04c6c855a366", "type": "software", "attributes": { "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" }, "main_category": { "caa1bc70-6311-4937-84c4-5a0d3dc5e34b": { "name": "Example Category", "slug": "example-category", "description": "Example Category is...", "product_count": 1 } }, "categories": { "7b8bed3b-28bb-4467-bf02-4312f48fe172": { "name": "test", "slug": "test", "description": "test", "product_count": 0 }, "caa1bc70-6311-4937-84c4-5a0d3dc5e34b": { "name": "Example Category", "slug": "example-category", "description": "Example Category is...", "product_count": 1 } }, "vendor": { "id": "be5c299e-858b-4277-84ce-21e845b67833", "name": "Test Vendor", "slug": "test-vendor" }, "relationships": { "product_ratings": { "links": { "self": "https://data.g2.com/api/syndication/products/1ce1f4f2-e7bd-424b-b45c-04c6c855a366/product_ratings" } } } } } }
Parameters
vendor | Show vendor information (default: false) |
Syndication::Reviews
List
Endpoint
GET /api/2018-01-01/syndication/reviews
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/reviews?filter[product_id]=64cd56b1-25fe-48ac-929f-11d77fa077cc" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": [ { "id": "48", "type": "survey_responses", "attributes": { "default_sort": 0.0, "is_public": true, "slug": "product-one-review-48", "percent_complete": 84.0, "submitted_at": "2024-04-06T09:15:08.081-05:00", "user_updated_at": "2024-04-26T09:15:08.090-05:00", "title": "Review title", "url": "https://www.g2.com/products/product-one/reviews/product-one-review-48", "answers": { "love": { "text": "What do you like best?", "value": "I like..." }, "hate": { "text": "What do you dislike?", "value": "I dislike..." }, "recommendations": { "text": "What recommendations would you have?", "value": "I recommend..." }, "benefits": { "text": "What benefits have you realized?", "value": "I benefit..." } }, "published_at": "2024-04-16T09:15:08.081-05:00", "regions": [ ], "country_name": null, "product_name": "Product One", "source": "Organic review. This review was written entirely without invitation or incentive from G2, a seller, or an affiliate.", "review_incentive": false, "star_rating": 2.5, "user": { "industry": "Internet", "name": "alex s.", "image": null, "company": "Test Co.", "title": "CEO at Test Co.", "company_segment": "Small-Business (50 or fewer emp.)" }, "verified_current_user": false, "comment_present": false, "official_response_present": false, "attribution": { "text": "Verified by G2", "url": "https://www.g2.com/products/product-one/reviews/product-one-review-48", "logo": "http://www.lvh.me:63479/assets/g2-logo-rorange.svg" } } } ], "meta": { "aggregates": [ { "filter_name": "nps_score", "nested_filter_name": null, "collection": [ { "id": 5, "text": "5 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 4, "text": "4 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 3, "text": "3 star", "count": 1, "checked": false, "nested_boxes": [ ] }, { "id": 2, "text": "2 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 1, "text": "1 star", "count": 0, "checked": false, "nested_boxes": [ ] } ], "expanded": true }, { "filter_name": "company_segment", "nested_filter_name": null, "collection": [ { "id": 32, "text": "Small-Business (50 or fewer emp.)", "count": 1, "checked": false, "nested_boxes": [ ] } ], "expanded": false }, { "filter_name": "industry", "nested_filter_name": null, "collection": [ { "id": 31, "text": "Accounting", "count": 1, "checked": false, "nested_boxes": [ ] } ], "expanded": false }, { "filter_name": "industry", "nested_filter_name": null, "collection": [ { "id": 31, "text": "Accounting", "count": 1, "checked": false, "nested_boxes": [ ] } ], "expanded": false } ], "record_count": 1, "page_count": 1, "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" }, "rating": null } }
Parameters
filter[product_id] required | The UUID id of the product the reviews belong to |
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page (default: 1) |
filter[nps_score][] | Valid Options: [1, 2, 3, 4, 5] |
filter[company_segment][] | Valid options are returned under aggregates |
filter[industry][] | Valid options are returned under aggregates |
filter[category_ids][] | Valid options are returned under aggregates |
filter[role][] | Valid options are returned under aggregates |
filter[regions][] | |
filter[country_name][] | |
filter[updated_at_gt] | Filters to all reviews updated since the date. (Format: "2019-01-01") |
filter[updated_at_lt] | Filters to all reviews updated before the date. (Format: "2019-01-01") |
filter[comment_answer_values_exclude] | Exclude reviews that contain the keywords passed in the filter |
Response Fields
data | Returns the reviews as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
meta[aggregates] | This contains the data necessary for building filters.
[
{
filter_name: the parameter name of the filter to apply i.e.
filter[FILTER_NAME][]= ,
collection: [
{
"id": The id used for filtering i.e.
filter[FILTER_NAME][]=ID
Multiple values are permitted i.e.
filter[FILTER_NAME][]=ID&filter[FILTER_NAME][]=ID2 ,
"text": Human readable name of the filter option,
"count": # of review that match this filter,
"checked": True if the results are currently filtered by this option
}
]
}
]
|
meta[record_count] | Number of total reviews available |
meta[page_count] | Number of total pages of reviews available |
meta[rating] | Average rating of the product |
meta[product] | Details of the product the reviews belong to |
Syndication::Reviews::Comments
Archive
Only comments created through this API can be updated through this API.
Endpoint
DELETE /api/2018-01-01/syndication/reviews/comments/:id
Curl Request
curl "data.g2.com/api/2018-01-01/syndication/reviews/comments/b27309e9-1481-46cc-a560-f0dd44a83f95" -d '{"format":"json"}' -X DELETE \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Request
DELETE /api/2018-01-01/syndication/reviews/comments/b27309e9-1481-46cc-a560-f0dd44a83f95 HTTP/1.1 Authorization: Token token=secret Content-Type: application/vnd.api+json { "format": "json" }
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/json
List
Endpoint
GET /api/2018-01-01/syndication/reviews/comments
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/reviews/comments?filter[product_id]=7556d0e2-ba90-43e5-8453-295618b22d06" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": [ { "id": "4d7f890a-4a28-492a-beba-152309c23994", "type": "comments", "attributes": { "title": "example comment", "content": "lorum ipsum getsum", "is_public": true, "is_vendor_response": false, "api_comment": false, "responding_product_id": "d3ed6a66-694e-44c1-ac0e-771c3ee704ea", "survey_response": { "id": 69, "product_id": "d3ed6a66-694e-44c1-ac0e-771c3ee704ea" }, "user": { "name": "Verified User in Internet" }, "archived": false } } ], "meta": { "record_count": 1, "page_count": 1, "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" } } }
Parameters
filter[product_id] required | The UUID id of the product whose reviews are being commented on. |
filter[review_id] | The UUID of the review being commented on. |
filter[my_api_responses] | Limit search to or exclude comments submitted via this API account. (true or false) |
filter[vendor_responses] | Limit search to or exclude official vendor responses. (true or false) |
page[size] | Pagination size. (default: 10, max: 100) |
page[number] | Pagination page. (default: 1) |
Response Fields
data | Returns the comments as an array. |
meta[record_count] | Number of total comments available. |
meta[page_count] | Number of total pages of comments available. |
meta[rating] | Average rating of the product. |
meta[product] | Details of the product. |
Submit
Comments created through this endpoint will be marked as official responses.
Endpoint
POST /api/2018-01-01/syndication/reviews/:review_id/comments
Curl Request
curl "data.g2.com/api/2018-01-01/syndication/reviews/70/comments" -d '{"comment":{"content":"This is content","title":"Test title","user_id":"251b71d3-b1f9-4a8c-9ba1-48c9bd50bf84"},"format":"json"}' -X POST \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Request
POST /api/2018-01-01/syndication/reviews/70/comments HTTP/1.1 Authorization: Token token=secret Content-Type: application/vnd.api+json { "comment": { "content": "This is content", "title": "Test title", "user_id": "251b71d3-b1f9-4a8c-9ba1-48c9bd50bf84" }, "format": "json" }
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": { "id": "e07ec67e-a9ec-4549-a9bd-327a69484406", "type": "comments", "attributes": { "title": "Test title", "content": "lorum ipsum getsum", "is_public": true, "is_vendor_response": true, "api_comment": false, "responding_product_id": "0a04d737-0d33-45d1-b5f2-aba9568ff573", "survey_response": { "id": 70, "product_id": "0a04d737-0d33-45d1-b5f2-aba9568ff573" }, "user": { "name": "Verified User in Internet" }, "archived": false } }, "meta": { "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" } } }
Parameters
review_id required | The UUID of the review being commented on. |
comment[content] required | Comment content. |
comment[title] | Comment title. |
comment[user_id] | UUID of the user attached to the comment. (defaults to product owner) |
Response Fields
data | Returns the created comment. |
meta[product] | Details of the product. |
Update
Only comments created through this API can be updated through this API.
Endpoint
PUT /api/2018-01-01/syndication/reviews/comments/:id
Curl Request
curl "data.g2.com/api/2018-01-01/syndication/reviews/comments/95eb0674-7909-47b4-b302-b688e7fab037" -d '{"format":"json","comment":{"title":"Test title","content":"This is content"}}' -X PUT \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Request
PUT /api/2018-01-01/syndication/reviews/comments/95eb0674-7909-47b4-b302-b688e7fab037 HTTP/1.1 Authorization: Token token=secret Content-Type: application/vnd.api+json { "format": "json", "comment": { "title": "Test title", "content": "This is content" } }
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": { "id": "95eb0674-7909-47b4-b302-b688e7fab037", "type": "comments", "attributes": { "title": "Test title", "content": "This is content", "is_public": true, "is_vendor_response": false, "api_comment": true, "responding_product_id": "856f9413-cdae-4d38-8fd0-c6074d725413", "survey_response": { "id": 67, "product_id": "856f9413-cdae-4d38-8fd0-c6074d725413" }, "user": { "name": "Verified User in Internet" }, "archived": false } }, "meta": { "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" } } }
Parameters
comment[content] required | Comment content. |
comment[title] | Comment title. |
Response Fields
data | Returns the updated comment. |
meta[product] | Details of the product. |
Syndication::Snippets
List
Endpoint
GET /api/2018-01-01/syndication/snippets
Curl Request
curl -g "data.g2.com/api/2018-01-01/syndication/snippets?filter[product_id]=0b10678e-5212-4c3b-9091-001b643c03de" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json; charset=utf-8 { "data": [ { "id": "3", "type": "snippets", "attributes": { "content": "This is my Comment", "review": { "id": 36, "default_sort": 0.0, "is_public": true, "slug": "product-one-review-36", "percent_complete": null, "submitted_at": "2024-04-26T09:15:02.373-05:00", "user_updated_at": "2024-04-26T09:15:02.338-05:00", "title": "Review title", "url": "https://www.g2.com/products/product-one/reviews/product-one-review-36", "answers": { "love": { "text": "What do you like best?", "value": "I like..." }, "hate": { "text": "What do you dislike?", "value": "I dislike..." }, "recommendations": { "text": "What recommendations would you have?", "value": "I recommend..." }, "benefits": { "text": "What benefits have you realized?", "value": "I benefit..." } }, "published_at": null, "regions": [ ], "country_name": null, "product_name": "Product One", "source": "Organic review. This review was written entirely without invitation or incentive from G2, a seller, or an affiliate.", "review_incentive": false, "star_rating": 2.5, "user": { "industry": "Internet", "name": "alex s.", "image": null, "company": null, "title": null, "company_segment": " " }, "verified_current_user": false, "comment_present": false, "official_response_present": false, "attribution": { "text": "Verified by G2", "url": "https://www.g2.com/products/product-one/reviews/product-one-review-36", "logo": "http://www.lvh.me:63479/assets/g2-logo-rorange.svg" } } } } ], "links": { "self": "https://data.g2.com/api/2018-01-01/syndication/snippets?filter%5Bproduct_id%5D=0b10678e-5212-4c3b-9091-001b643c03de&page%5Bnumber%5D=1&page%5Bsize%5D=10", "first": "https://data.g2.com/api/2018-01-01/syndication/snippets?filter%5Bproduct_id%5D=0b10678e-5212-4c3b-9091-001b643c03de&page%5Bnumber%5D=1&page%5Bsize%5D=10", "prev": null, "next": null, "last": "https://data.g2.com/api/2018-01-01/syndication/snippets?filter%5Bproduct_id%5D=0b10678e-5212-4c3b-9091-001b643c03de&page%5Bnumber%5D=1&page%5Bsize%5D=10" }, "meta": { "aggregates": [ { "filter_name": "nps_score", "nested_filter_name": null, "collection": [ { "id": 5, "text": "5 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 4, "text": "4 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 3, "text": "3 star", "count": 1, "checked": false, "nested_boxes": [ ] }, { "id": 2, "text": "2 star", "count": 0, "checked": false, "nested_boxes": [ ] }, { "id": 1, "text": "1 star", "count": 0, "checked": false, "nested_boxes": [ ] } ], "expanded": true } ], "record_count": 1, "page_count": 1, "product": { "name": "Product One", "domain": "example.com", "slug": "product-one", "product_type": "Software", "star_rating": 2.5, "avg_rating": "5.0", "detail_description": "Description", "review_count": 0, "image_url": null, "public_detail_url": null, "g2crowd_url": "https://www.g2.com/products/product-one/reviews", "write_review_url": "https://www.g2.com/products/product-one/take_survey" } } }
Parameters
filter[product_id] required | The UUID id of the product the snippets belong to |
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page (default: 1) |
filter[nps_score][] | Valid Options: [1, 2, 3, 4, 5] |
filter[company_segment][] | Valid options are returned under aggregates |
filter[industry][] | Valid options are returned under aggregates |
filter[category_ids][] | Valid options are returned under aggregates |
filter[role][] | Valid options are returned under aggregates |
filter[tags][] | Valid options are returned under aggregates |
Response Fields
data | Returns the snippets as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
meta[aggregates] | This contains the data necessary for building filters.
[
{
filter_name: the parameter name of the filter to apply i.e.
filter[FILTER_NAME][]= ,
collection: [
{
"id": The id used for filtering i.e.
filter[FILTER_NAME][]=ID
Multiple values are permitted i.e.
filter[FILTER_NAME][]=ID&filter[FILTER_NAME][]=ID2 ,
"text": Human readable name of the filter option,
"count": # of review that match this filter,
"checked": True if the results are currently filtered by this option
}
]
}
]
|
meta[record_count] | Number of total reviews available |
meta[page_count] | Number of total pages of reviews available |
meta[product] | Details of the product the snippets belong to |
Vendors
A G2 Seller is a company that owns more than two published G2 Products.
List
Endpoint
GET /api/v1/vendors
Curl Request
curl -g "data.g2.com/api/v1/vendors" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": [ { "id": "faec9108-9e81-4d0d-9c25-94a0f51a6628", "type": "vendors", "links": { "self": "https://data.g2.com/api/v1/vendors/faec9108-9e81-4d0d-9c25-94a0f51a6628" }, "attributes": { "name": "Test Vendor", "description": null, "company_website": null, "slug": "test-vendor-79cebf4a-8007-4933-845b-b63271935f79", "public_products_count": 0, "updated_at": "2024-04-26T09:15:09.147-05:00" }, "relationships": { "products": { "links": { "self": "https://data.g2.com/api/v1/vendors/faec9108-9e81-4d0d-9c25-94a0f51a6628/relationships/products", "related": "https://data.g2.com/api/v1/vendors/faec9108-9e81-4d0d-9c25-94a0f51a6628/products" } } } } ], "meta": { "record_count": 1, "page_count": 1 }, "links": { "first": "https://data.g2.com/api/v1/vendors?page%5Bnumber%5D=1&page%5Bsize%5D=10", "last": "https://data.g2.com/api/v1/vendors?page%5Bnumber%5D=1&page%5Bsize%5D=10" } }
Parameters
page[size] | Pagination size (default: 10, max: 100) |
page[number] | Pagination page |
filter[updated_at_gt] | Min time for when a record was last updated. Using rfc3339 format. |
filter[updated_at_lt] | Max time for when a record was last updated. Using rfc3339 format. |
Response Fields
name | Name of the Seller |
description | Description of Seller's company |
company_website | URL of seller's website |
slug | URL slug of the seller. e.g. https://g2.com/vendors/:slug |
public_products_count | Number of Products the Seller has published on G2 |
updated_at | Date seller last updated |
data | Returns the results as an array |
links | This contains the links for remaining result pages with the same parameters. Returned as self, prev, first, next, and last. next and prev may be blank if you are on the first or last page respectively. |
Show
Endpoint
GET /api/v1/vendors/:id
Curl Request
curl -g "data.g2.com/api/v1/vendors/7c3d6d31-f57a-47be-aeef-66ba2a550f0f" -X GET \ -H "Version: HTTP/1.0" \ -H "Authorization: Token token=secret" \ -H "Content-Type: application/vnd.api+json" \ -H "Host: data.g2.com" \ -H "Cookie: "
Response
Simulated ResponseHTTP/1.1 200 OK Content-Type: application/vnd.api+json { "data": { "id": "7c3d6d31-f57a-47be-aeef-66ba2a550f0f", "type": "vendors", "links": { "self": "https://data.g2.com/api/v1/vendors/7c3d6d31-f57a-47be-aeef-66ba2a550f0f" }, "attributes": { "name": "Test Vendor", "description": null, "company_website": null, "slug": "test-vendor-a26702dc-f7b3-44fe-b040-af84d93aead9", "public_products_count": 0, "updated_at": "2024-04-26T09:15:08.648-05:00" }, "relationships": { "products": { "links": { "self": "https://data.g2.com/api/v1/vendors/7c3d6d31-f57a-47be-aeef-66ba2a550f0f/relationships/products", "related": "https://data.g2.com/api/v1/vendors/7c3d6d31-f57a-47be-aeef-66ba2a550f0f/products" } } } } }
Response Fields
name | Name of the Seller |
description | Description of Seller's company |
company_website | URL of seller's website |
slug | URL slug of the seller. e.g. https://g2.com/vendors/:slug |
public_products_count | Number of Products the Seller has published on G2 |
updated_at | Date seller last updated |