API v2 Documentation

Endpoints Code Lookup

← All endpoints

social

All data services

A query to this endpoint without an id parameter will return all social accounts in reverse chronological order of last post. Results can be filtered by team, limit (team or player accounts only) and search. Passing an id parameter (a social handle, case insensitive) will return all posts for that account in reverse chronological order. Results can be filtered by date or date range (start-end; last).

Stephen Curry Posts
https://api.natstat.com/v1/social/NBA/?key=XXXX-XXXXXX&format=xml&id=StephenCurry30 Download sample

Parameters

Path

NameRequiredTypeDescription
level required string The competition level to retrieve information for. A full glossary can be found in the Path Parameters section

Query

NameRequiredTypeDescription
key required string A valid API key in XXXX-XXXXXX format
format optional string The preferred data format: xml, json or php (presented as a SimpleXML object). The default is json
max optional number The number of results per page to return. The default value is 100, and the maximum allowed parameter value is 1000. This value is echoed back as Max_Results in the meta block
page optional number The pagination page number. This value is echoed back as Page in the meta block. The meta block also contains the Total_Results of the query. If there are further results, a fully-formed Next_Page URI containing a pre-filled &page=X value will be returned
id optional string A valid social media account handle, which returns details for that account (A list of available accounts can be retrieved from this endpoint by not passing an ID code.) Case insensitive
team optional number A valid team ID code. A list of teams can be retrieved from the teams endpoint
limit optional string The two valid values for this filter are =team and =player, to show only social media accounts for either type
search optional string For general search of endpoint contents. Queries of four characters or less will be ignored
player optional number A valid player ID code. A list of teams can be retrieved from the players endpoint
game optional number A valid game ID code. A list of games can be retrieved from the games endpoint
date optional string The date to limit matched results to. The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred
start optional string The start date from which to include matched results (inclusive). The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred
end optional string The end date to which to include matched results (inclusive). The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred

Response

NameRequiredTypeDescription
Type string The type of media
LastTweet string The text of the most recent tweet from this account
LastPost_Time date The last post time for the account, in YYYY-MM-DD format
Source string The source of the media content
team object Includes teams metadata about the relevant team
ID number The unique identifier for the record
Name string The full name of the account
Abbrev string The two to seven-letter team abbreviation, available via the teams endpoint
player object Includes players metadata for the social media account, if applicable
posts object Includes metadata of relevant posts
Tweet_ID number The Twitter ID of the relevant tweet
Post string The text of the relevant post
Post_URL string The full URL of the relevant post
Media1_URL string The URL of the first piece of media attached to the tweet
Retweet boolean Whether the post is a retweet, in Y/N format
QuoteTweet_Text string The text of the quote tweet, if available
QTURL string The URL of the quote tweet