API v2 Documentation

Endpoints Code Lookup

Data Formats

Data from the National Statistical API is available in three different formats. Users can specify which format to return with the format query parameter. If no data format is specified, the API will send JSON-formatted data by default.

https://api.natstat.com/v2/seasons/NBA/?key=XXXX-XXXXXX&format=xml

jsonJavaScript Object Notation (default)
xmlExtensible Markup Language
phpPHP SimpleXML Object

The comma-separated and tab-separated (CSV/TSV) options were removed in API v1, as they are unable to handle multi-dimensional array objects. The Excel option was removed in API v1. If you require spreadsheet-formatted data, please review Analysis Tools > Data Exports from any subsite navigation menu.

Please test any queries and attempt alternate formats to view any applicable errors or status messages before contacting support.