5. Follow 302 Redirect to Data File

Finally, your application should follow the HTTP 302 redirect from the previous step to get the data file.

Request

Path

GET {DATA_URL}

Path tokens

NameDescription
{DATA_URL}The URL provided in the previous step.

Response

The response will be a gzipped file containing the product sentiment insights data. The contents of each file will vary with the type of data. The following are incomplete examples provided to give a representative sample of what to expect:

{"id":"productsummary::792850903012","type":"productsummary","lastModificationTime":"2018-05-04T08:55:29.183Z","productExternalId": "792850903012","bestFeatures": \[, …}  
{"id":"productsummary::345634776343","type":"productsummary","lastModificationTime":"2018-05-04T08:55:29.183Z","productExternalId": "345634776343","bestFeatures": \[, …}  
…

In the example above, … indicates that there may be additional data.

{"id":"highlightedreview::2d040312-a401-5e9e-b86f-fdeaa023e032-73827-1","type":"highlightedreview","lastModificationTime": "2018-05-04T08:55:29.183Z","productExternalId":"792850903012","feature":"picture quality", … }  
{"id":"highlightedreview::3d050423-a502-6e1e-b97f-fdeaa134e143-84938-1","type":"highlightedreview","lastModificationTime": "2018-05-04T08:55:29.183Z","productExternalId":"345634776343","feature":"picture quality", … }  
…

In the example above, … indicates that there may be additional data.

Data files may have multiple JSON objects, each on its own line, as demonstrated above. However, the file itself is not valid JSON; Attempting to translate a whole file as JSON will fail. Instead, your application should read the files line-by-line, processing each object individually. To learn more about the data sets, refer to the reference page.