Data Endpoint (TRAC)

The Data Explorer allows you to pull data from TRAC. This section introduces how our queries function and some additional sample queries, along with any need to know details.

Sample Calls

Intro

Below are a handful of sample calls to help you understand how the TRAC Data Explorer functions

Each sample call will contain the query and variables in one tab, followed by the Response in the other.

We do this to keep formatting consistent with how most API testing environments would surface the blocks as groups.

For all queries, POST to this GraphQL endpoint URL:

https://data.pulsarplatform.com/graphql/trac

Getting Search Results from X (Posts Only)

The searchIds are unique to your searches. Find them on the Search Status pages on platform or use the TRAC Metadata endpoint to retrieve them.

query Results($filters:FilterInput!){
        results (filter:$filters){
                total
                results{
                        content
                        source
                        userName
                        publishedAt
                        impressions
                        sharesCount
                        likesCount
                        engagement
                        potentialReach
                        commentsCount
                        syndicationContentsCount
                        viewsCount
                        visibility
                }
        }
}
{
	"filters": {
		"dateFrom": "2024-02-01T00:00:00Z",
		"dateTo": "2024-02-28T23:59:59Z",
		"searchIds": [
			"88fffa8cf1aa11abc468f7522c71b932"
		],
		"contentType": "POST",
		"sources": [
			"X"
		]
	}
}

Using Aliases to get results batched into Posts and Reactions

Replace hashX with your search hash

query Results(
	$filter: FilterInput!
	$filter2: FilterInput!
	$options: ResultsOptionsInput
) {
	posts: results(
		filter: $filter
		options: $options
	) {
		total
		results {
			publishedAt
			source
			content
		}
	}
	reactions: results(
		filter: $filter2
		options: $options
	) {
		total
		results {
			publishedAt
			source
			content
		}
	}
}
{
	"filter": {
		"dateFrom": "2023-03-01T00:00:00Z",
		"dateTo": "2024-03-12T00:00:00Z",
		"searches": [
			"hashX"
		],
		"sources": ["X"]
	},
	"filter2": {
		"dateFrom": "2023-03-01T00:00:00Z",
		"dateTo": "2024-03-12T00:00:00Z",
		"searches": [
			"hashY"
		],
		"sources": ["X"]
	}
}

Getting Filtered Results by Hashtags & Country

Note how the results query is the same as a normal query, most of the changes are in the filter

A list of countries can be found here

query Results($filters:FilterInput!){
    results (filter:$filters){
		total
        results{
						content
					  source
						userName
            publishedAt
						impressions
						sharesCount
						likesCount
						engagement
						potentialReach
						commentsCount
						syndicationContentsCount
						viewsCount
						visibility
        }
    }
}
{
	"filters": {
		"dateFrom": "2024-02-01T00:00:00Z",
		"dateTo": "2024-02-28T23:59:59Z",
		"searchIds": [
			"88fffa8cf1aa11abc468f7522c71b932"
		],
		"countries": [
			"US"
		],
		"hashtags": "fashion"
	}
}

Last updated