If you're reading this, you've installed Postman and are ready to start testing the Datafiniti API. This tutorial will focus on using the API to query product data.
How to run your first query using Datafiniti's API
Follow these steps to get ready for using the API:
- Open Postman in Chrome by clicking on the globe icon next to your address bar.
- Click on Collections to see your available Postman collections, and then click on the collection you uploaded.
- Click on "Product Data Get". Everything, including your unique account token, should populate in your Postman address bar, up to "q=". This is where your query starts.
For this tutorial, we're going to query the Datafiniti Product API with what dog food prices are available on Amazon.com. To do this:
- After 'q=', type 'prices:*'. This tells the API that I want all records that have some price. "*" is a wildcard, so it will match any record that has some value for prices.
- Next type ' AND categories:"dog food"', including the space before "AND". The quotes around dog food tell the API that I want an exact match on this phrase.
- Next type ' AND sourceURLs:*amazon.com*'. Using the same wildcard syntax, I'm doing a fuzzy match on amazon.com URLs.
If you're using a free trial account, you may want to limit the number of records you return so you don't exhaust your limit during the trial. Continuing from the above steps, do the following:
- Type '&records=1' to indicate you only want a single record returned. You can change this value to anything from 1 to 100.
Finally, hit enter or click "Send" in Postman to fetch the data from the API. You'll see sample data show up in Postman. That's it!
For more advanced queries, refer to the Product Schema to understand which fields are searchable. You can also construct more complicated search operators to get more targeted data.
If you run into any trouble, just email email@example.com!