<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rohit Shisode on Medium]]></title>
        <description><![CDATA[Stories by Rohit Shisode on Medium]]></description>
        <link>https://medium.com/@shisoderohit?source=rss-c1b6476c22cf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TIl1eWE0VBGNisY7FtJ2Hw.jpeg</url>
            <title>Stories by Rohit Shisode on Medium</title>
            <link>https://medium.com/@shisoderohit?source=rss-c1b6476c22cf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:32:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shisoderohit/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Faceting & Auto-Complete]]></title>
            <link>https://medium.com/marketcheck-apis/faceting-auto-complete-4916c61cb7f4?source=rss-c1b6476c22cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/4916c61cb7f4</guid>
            <category><![CDATA[automotive]]></category>
            <category><![CDATA[webapi]]></category>
            <category><![CDATA[facet]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[cars]]></category>
            <dc:creator><![CDATA[Rohit Shisode]]></dc:creator>
            <pubDate>Thu, 25 Mar 2021 04:43:46 GMT</pubDate>
            <atom:updated>2021-03-25T04:43:46.547Z</atom:updated>
            <content:encoded><![CDATA[<p>To auto-complete the user input or show various configuration available on a VIN or car you can use faceting feature in Marketcheck API. Using faceting you can fetch unique values / terms / tokens for a field. By extending this faceting feature we’ve provided another endpoint that lets developers autocomplete the end users input strings. To understand more about this useful feature of Marketcheck API and how to use it, please read on…</p><h3>What is Faceting in Marketcheck API?</h3><p>Faceting in Marketcheck search and auto-complete APIs allows developers to fetch unique values / terms / tokens for a field. So if you want all unique values of all car make then you need to fetch facets on make field. The API response will contain all values for make field (like Ford, Chevrolet, Nissan etc).</p><p>As Marketcheck API contains live inventory data for all of US and Canada market, we are also able to provide counts / inventory levels of each configuration via facets. For example — When you request facets on make, Marketcheck API along with unique terms for that field (in this case — make) also returns the active counts of cars for sale of that make. So you would also be able to see the counts of all Fords, Chevrolets and Nissans that are up for sale.</p><h3>How to use facets feature?</h3><p>Facets are available in mainly two modes —</p><ol><li>Plain facets with counts. Like in search APIs</li><li>Auto-complete facets with just terms. Like in Taxonomy autocomplete APIs</li></ol><h3>Facets in Search APIs</h3><p>In search APIs you can request facets on various fields, here you would get all unique terms plus the counts of those facet terms. You can find list of all the fields on which facets are allowed on API docs — <a href="https://apidocs.marketcheck.com/#8f2b5cec-52fa-498c-a55c-36b22820a274">https://apidocs.marketcheck.com/#8f2b5cec-52fa-498c-a55c-36b22820a274</a></p><p>To request facets on a field you need to include <strong><em>facets</em></strong> parameter in your URL, with it’s value being the field name for which you want facets.</p><p>Example — To request facet on field - make</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=0&amp;facets=make">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=0<strong>&amp;facets=make</strong></a></pre><blockquote><strong>Note : </strong>Replace {{api_key}} in above request with your API key. To obtain a new API key, sign up at <a href="https://www.marketcheck.com/">Marketcheck developer portal — https://www.marketcheck.com/</a></blockquote><h4>Pagination &amp; facets on multiple fields</h4><p>By default API returns top 20 terms (sorted on count) for any facet field. You can request more terms in a single API call and also paginate the result if there are more unique terms. To request more terms in a single API call, you need to provide offset and limit / terms count along with field name, separated by pipe, Like —</p><pre>facets={{field_name}}|{{offset}}|{{limit}}</pre><p>Here <em>field name</em> can be any field on which facets are allowed and <em>offset</em> and <em>limit</em> are numeric numbers. So if in first call you requested 100 facet terms from start with <em>offset</em> and <em>limit</em> being 0 and 100, in next API call to paginate the result you need to provide <em>offset</em> as 100 and <em>limit</em> as 100 and in next <em>offset</em> as 200 and <em>limit</em> as 100 and so on. More on this <a href="https://apidocs.marketcheck.com/#f296ea3e-a125-4fba-a578-739fb0b90cd6">here</a>.</p><p>The <strong>maximum value of limit is 1000</strong>. You can not get more than 1000 unique terms for a field in single API call. If any field has more than 1000 terms then you need to use offset to paginate the results in increments of 1000.</p><p>For example, To fetch all terms of make field (beyond top 20), provide value of facets parameter like —</p><pre>facets=make|0|100</pre><p>You can also request facets on multiple fields in one API call by mentioning all field names in <strong><em>facets</em></strong> parameters value, separated by comma.</p><p>So suppose to get all year values as well (along with make) you can make an API request like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=0&amp;facets=make|0|100,year|0|100">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=0<strong>&amp;facets=make|0|100,year|0|100</strong></a></pre><h4>Filtering the results first</h4><p>One of the most important use case of facets is you can request facets on a field after filtering the result set first. So if user has selected some make as his preferred one and now you want to show him model’s of that make, you can do so with Marketcheck search API. You can use <strong><em>make</em></strong> parameter of the search API to filter the results for one particular make and then use <strong><em>facets</em></strong> parameter to fetch it’s models, like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=50&amp;make=ford&amp;facets=model|0|1000">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=50&amp;<strong>make=ford&amp;facets=model|0|1000</strong></a></pre><blockquote>Note : Here assuming user has requested Ford cars, and now you make API call to fetch all ford cars and use <strong>rows=50</strong> to get ford listings, you can request facets on model in same API call to show in your drill downs</blockquote><p>There are numerous parameters available in search API that you can use to filter the result set. You can find out all the available parameters at <a href="https://apidocs.marketcheck.com/#f0d1f6e0-e5f0-4e51-93bf-ffb1f36ef03c">Marketcheck API documentation</a>.</p><p>For example, if you want to filter the results to your (users) local market only (Suppose Houston Texas) then you can do so like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=50&amp;make=ford&amp;facets=model|0|1000&amp;city=Houston">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=50&amp;make=ford&amp;facets=model|0|1000<strong>&amp;city=Houston</strong></a></pre><p>Or by using a geo-location parameters like zip or lat-long and radius —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=50&amp;make=ford&amp;facets=model|0|1000&amp;zip=77034&amp;radius=5">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=50&amp;make=ford&amp;facets=model|0|1000<strong>&amp;zip=77034&amp;radius=5</strong></a></pre><h4>Sorting</h4><p>Facet results are always sorted on <strong>count by default</strong>. As mentioned earlier, in Search APIs we also have live inventory counts of each configuration and results are sorted on these inventory counts. So any make that has most cars for sale in the market will appear at top of the facets results. Similar is the case for all other fields as well, like if you request facets on models of ford then in result you would get model terms sorted on their inventory count.</p><p>There is one more sort available in facets and that is by <strong>index </strong>(alphabetically). With index sort you can sort results alphabetically (Ascending only). To change facet sort you need to use <strong><em>facet_sort</em></strong> parameter with its value being either <em>count</em> or <em>index</em></p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=0&amp;facets=make&amp;facet_sort=index">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key={{api_key}}&amp;rows=0&amp;facets=make<strong>&amp;facet_sort=index</strong></a></pre><h3>Autocomplete APIs</h3><p>By extending this facets feature internally we’ve provided one more API endpoint — auto-complete to provide car taxonomy auto completion feature. Here in Autocomplete API you only get terms of that field that <strong>match the user input so far.</strong></p><p>As user might input make first and the type first few letters of model name, in Autocomplete API we’ve provided combination fields to handle such inputs as well. You can find out list of all fields on which autocomplete is allowed <a href="https://apidocs.marketcheck.com/#bdddf6b8-5bdc-432d-9b1e-49807140df22">here in documentation</a>. You’ll also see that there are combination fields like ymm (year-make-model) and mm(make-model) on which autocomplete is allowed.</p><p>You need to provide a field name (on which autocomplete is needed) and input string (the text user has entered so far) in request url. For example —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/auto-complete?api_key={{api_key}}&amp;&amp;field=mm&amp;input=ford%20f-">https://marketcheck-prod.apigee.net/v2/search/car/auto-complete?api_key={{api_key}}<strong>&amp;field=mm&amp;input=ford f-</strong></a></pre><p>Please refer to <a href="https://apidocs.marketcheck.com/">Marketcheck API’s documentation</a> for more details on Autocomplete APIs</p><h3>Facets in Taxonomy/Decoder APIs</h3><p>The facets in search APIs are mainly about the inventory levels of each car configuration. They are perfect for any car search portal that shows cars for sale in US and CA. But if you want terms / values of a field regardless if any car with that specification is up for sale or not then these Taxonomy Facets API are perfect for you.</p><p>Here the facets you get are sourced from our entire decoder database and not the inventory data that we crawl, as such this data is bit raw but provides you every possible value of a field. As this data does not have inventory level counts attached to it, the results are always sorted alphabetically (ASC)</p><p>For example to fetch all make terms —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/specs/car/terms?api_key={{api_key}}&amp;field=make">https://marketcheck-prod.apigee.net/v2/<strong>specs/car/terms</strong>?api_key={{api_key}}<strong>&amp;field=make</strong></a></pre><blockquote>Please note the change in endpoint as well</blockquote><p>You can also request facets on multiple fields in one go and paginate the results if there are too many terms for a field, just like with facets in search API. You can read more details about this on <a href="https://apidocs.marketcheck.com/#ecdd58f8-3ec3-4cb8-8272-b0f5951d1d3e">documentation</a></p><h3>Conclusion</h3><p>Facets are really useful feature of search API and you can use them in variety of manners. If you foresee any new scenario where facets can be used or want any assist with using them in your application, please feel free to reach out to us at — api@marketcheck.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4916c61cb7f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marketcheck-apis/faceting-auto-complete-4916c61cb7f4">Faceting &amp; Auto-Complete</a> was originally published in <a href="https://medium.com/marketcheck-apis">Marketcheck APIs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Buyer Intelligence Widget by Marketcheck Cars, Inc.]]></title>
            <link>https://medium.com/marketcheck-apis/buyer-intelligence-widget-by-marketcheck-cars-inc-b84ea466553c?source=rss-c1b6476c22cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b84ea466553c</guid>
            <category><![CDATA[automotive-website-design]]></category>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[widget]]></category>
            <category><![CDATA[cars]]></category>
            <dc:creator><![CDATA[Rohit Shisode]]></dc:creator>
            <pubDate>Mon, 08 Feb 2021 13:03:02 GMT</pubDate>
            <atom:updated>2021-02-08T13:03:02.329Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Buyers Intelligence Widget" src="https://cdn-images-1.medium.com/max/754/1*E8dTJbtY5D3yoDRZmKSQsg.png" /><figcaption>Buyers Intelligence Widget</figcaption></figure><h3>What are Marketcheck Widgets?</h3><p><a href="https://widgets.marketcheck.com/collection"><strong><em>Marketcheck Widgets</em></strong></a> are web widgets for automotive websites powered by <a href="https://www.marketcheck.com/apis"><strong><em>Marketcheck APIs</em></strong></a>. Marketcheck widgets allow you to enrich your auto website using data from various Marketcheck APIs. The Marketcheck’s widget playground lets you modify the look and feel of your widgets and provides ready to use code snippets that you could simply copy-paste to embed the widget in your existing website or create a <em>car search portal </em>from scratch.</p><h3>Buyers Intelligence Widget</h3><p>Buyer Intelligence displays a relative comparison of your published listing price with active similar car&#39;s price average and history similar car’s average price. It also displays the days on the market of your car. You just need to provide a VIN and your listing price and the widget shall connect to Marketcheck’s <a href="https://apidocs.marketcheck.com/#0cb5b2a9-62cb-4189-a259-9c9cd06e9971">VIN History API</a> and render the stats.</p><p>You could customise the Buyers Intelligence widget at Marketcheck’s Widgets <a href="https://widgets.marketcheck.com/widgets/buyer-intelligence">Playground</a>. Please refer to <a href="https://medium.com/p/10a6fdb5c56b/edit">this</a> article on how to customise and embed widgets on your website.</p><h3>Conclusion</h3><p>This widget is a good fit for your Search result pages and Vehicle details pages. Your website users would love the transparency you have shown by proactively providing details on where your listing stands as compared to the market and recent past published pricing.</p><p>For suggestions or queries, you can reach us at <a href="/service/mailto:widgets@marketcheck.com"><strong><em>widgets@marketcheck.com</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b84ea466553c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marketcheck-apis/buyer-intelligence-widget-by-marketcheck-cars-inc-b84ea466553c">Buyer Intelligence Widget by Marketcheck Cars, Inc.</a> was originally published in <a href="https://medium.com/marketcheck-apis">Marketcheck APIs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Car History Widget by Marketcheck Cars, Inc.]]></title>
            <link>https://medium.com/marketcheck-apis/car-history-widget-by-marketcheck-cars-inc-e6d815f6a310?source=rss-c1b6476c22cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6d815f6a310</guid>
            <category><![CDATA[automotive-website-design]]></category>
            <category><![CDATA[automobile]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[widget]]></category>
            <dc:creator><![CDATA[Rohit Shisode]]></dc:creator>
            <pubDate>Mon, 08 Feb 2021 13:02:38 GMT</pubDate>
            <atom:updated>2021-02-08T13:02:38.721Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Car history widget showing historical records of a car’s online presence" src="https://cdn-images-1.medium.com/max/1024/1*Q_PRgFDruzh-cV359D89hA.png" /><figcaption>Car history widget showing historical records of a car’s online presence</figcaption></figure><h3><strong>What are Marketcheck Widgets?</strong></h3><p><a href="https://widgets.marketcheck.com/collection"><strong><em>Marketcheck Widgets</em></strong></a> are web widgets for automotive websites powered by <a href="https://www.marketcheck.com/apis"><strong><em>Marketcheck APIs</em></strong></a>. Marketcheck widgets allow you to enrich your auto website using data from Marketcheck APIs. The <a href="https://widgets.marketcheck.com/collection">portal</a> playground allows you to modify the look and feel of your widgets and provides ready to use code snippets that you could simply copy-paste to embed the widget in your existing website or create a <em>car search portal </em>from scratch.</p><h3>Car History Widget</h3><p>This widget shows the historical records of a car’s online presence. You just need to provide a VIN and a few other parameters and the widget shall connect to Marketcheck’s <a href="https://apidocs.marketcheck.com/#0cb5b2a9-62cb-4189-a259-9c9cd06e9971">VIN History API</a> and render the output in a chronological order to show how the car was traded in the past.</p><p>As you could see from the title image of this article, the widget lists down:</p><ul><li>all periods when the car was online</li><li>which dealer was trading the car</li><li>at what price</li><li>what was the mileage at that time</li><li>highlights the ups and downs in price and miles</li></ul><p>You could customise the Car History widget’s number of columns, rows and over all look and feel using Marketcheck’s Widgets <a href="https://widgets.marketcheck.com/widgets/car-history">Playground</a>. You can refer to <a href="https://medium.com/marketcheck-apis/marketcheck-widgets-playground-how-to-use-10a6fdb5c56b">this</a> article on how to customise and embed widgets on your website.</p><h3>Conclusion</h3><p>This widget shall add one important dimension of transparency to your car’s details page as you would be proactively showing past trends on the car which your users would appreciate. The reference links to various dealers on the widget could serve as a lead generator.</p><p>For suggestions or queries, you can reach us at <a href="/service/mailto:widgets@marketcheck.com"><strong><em>widgets@marketcheck.com</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6d815f6a310" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marketcheck-apis/car-history-widget-by-marketcheck-cars-inc-e6d815f6a310">Car History Widget by Marketcheck Cars, Inc.</a> was originally published in <a href="https://medium.com/marketcheck-apis">Marketcheck APIs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marketcheck API Security — OAuth 2.0]]></title>
            <link>https://medium.com/marketcheck-apis/marketcheck-api-security-oauth-2-0-1c84ad4bc2c7?source=rss-c1b6476c22cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c84ad4bc2c7</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[market-check]]></category>
            <dc:creator><![CDATA[Rohit Shisode]]></dc:creator>
            <pubDate>Mon, 21 Sep 2020 12:47:38 GMT</pubDate>
            <atom:updated>2020-09-21T18:09:05.917Z</atom:updated>
            <content:encoded><![CDATA[<h3>Marketcheck API Security — OAuth 2.0</h3><p>Marketcheck APIs support two modes of authenticating your application with the API</p><ol><li>API Key</li><li>OAuth 2.0 access token</li></ol><p>In this article we will discuss how to obtain and use both of them.</p><h3>API Key</h3><p>When you login and have subscribed to one of packages at <a href="https://www.marketcheck.com/">https://marketcheck.com </a>you can navigate to “My Account &gt; API_KEY” page to get your api key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-pp93Cdhi7Vutyy5jul3dg.png" /><figcaption><a href="https://www.marketcheck.com/api_key">https://www.marketcheck.com/api_key</a></figcaption></figure><p>You can use this API key to make API calls, by providing this API key in request url as a query string parameter.</p><pre>curl --request GET &#39;<a href="https://marketcheck-test.apigee.net/v2/search/car/active?api_key=p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz&amp;car_type=used&#39;">https://marketcheck-prod.apigee.net/v2/search/car/active?<strong>api_key=p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz</strong>&amp;car_type=used&#39;</a></pre><p>This is an easier interface to authenticate with API, specially if your API key is going to be used or deployed in a secure environment and only handful of people have access to it.</p><p>However if your API key is not secure and is used on client side in the browser or some application then it becomes a risk, as it can be read in various ways and used to make API calls which then you’ll be charged for. Such compromised API key can be rotated but this solves the problem temporarily. And once API key is rotated it has to be changed in all instances of your application, which is not efficient. Here the OAuth 2.0 type authentication fits better.</p><h3>OAuth 2.0</h3><p>In this type of authentication you can exchange your API key and Client Secret for an access_token, which you can then use to make API calls. This access_token is valid for limited time and can be easily deleted to block the API access with it.</p><h4>Generate an access_token</h4><p>First you’d need to acquire an access_token. For acquiring token you need a valid API key and client secret. Both can be obtained after logging into your account at <a href="https://www.marketcheck.com/api_key">https://www.marketcheck.com/api_key</a>.</p><p>When you make an API call to request a token, it’s a good practice, and is recommended by the OAuth 2.0 specification to pass the api_key and client_secret values as an HTTP-Basic Authentication header, as described in <a href="https://tools.ietf.org/html/rfc2617#section-2">IETF RFC 2617</a>. To do this, you must base64-encode the result of joining the two values together with a colon separating them.</p><p>In pseudo-code:</p><pre>result = Base64Encode(concat(&#39;p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz&#39;, &#39;:&#39;, &#39;MPWdRQasReGyQwKl&#39;))</pre><p>So the curl would look like —</p><pre>curl --location --request POST &#39;<a href="http://marketcheck-test.apigee.net/oauth/token/access&#39;">http://marketcheck-</a><a href="https://marketcheck-test.apigee.net/v2/search/car/active?api_key=p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz&amp;car_type=used&#39;">prod</a><a href="http://marketcheck-test.apigee.net/oauth/token/access&#39;">.apigee.net/oauth/token/access&#39;</a> \<br>--header &#39;Authorization: Basic cDdvbFJVN2VLYUtYSVFMZXRJYmJUcXhNWW5SRkExa3o6TVBXZFJRYXNSZUd5UXdLbA==&#39; \<br>--header &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>--data-urlencode &#39;grant_type=client_credentials&#39; \<br>--data-urlencode &#39;expires_in=600000&#39;</pre><p>Or without base64 encoding them, it would look like —</p><pre>curl --location --request POST &#39;<a href="http://marketcheck-test.apigee.net/oauth/token/access&#39;">http://marketcheck-</a><a href="https://marketcheck-test.apigee.net/v2/search/car/active?api_key=p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz&amp;car_type=used&#39;">prod</a><a href="http://marketcheck-test.apigee.net/oauth/token/access&#39;">.apigee.net/oauth/token/access&#39;</a> \<br><strong>-u &#39;p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz:MPWdRQasReGyQwKl&#39;</strong> \<br>--header &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>--data-urlencode &#39;grant_type=client_credentials&#39; \<br>--data-urlencode &#39;expires_in=600000&#39;</pre><p>Here request body has 2 parameters — grant_type and expires_in.</p><p>Per the OAuth 2.0 specification, the grant type must be supplied with requests for access tokens. So it must be x-www-form-urlencoded and specified in the request body. Marketecheck API supports only one grant_type at the moment and that is client_credentials</p><p>expires_in indicates how long the token should remain valid for (in milliseconds). This is an optional parameter. The default value of this is 1800000 (30 minutes). It is not recommended to have very high expiry time on these tokens as well. An access_token can at max be valid for 6 hrs. Any value beyond that in expires_in parameter results in token expiry set at 6 hrs.</p><p>On success you would get a response that would look like following —</p><pre>{<br>&quot;organization_name&quot;:&quot;marketcheck&quot;,<br>&quot;token_type&quot;:&quot;BearerToken&quot;,<br>&quot;issued_at&quot;:&quot;1600685261822&quot;,<br><strong>&quot;access_token&quot;:&quot;6gnJwuAF8WATCrIjQtLiEUo7pjn5&quot;,</strong><br>&quot;scope&quot;:&quot;&quot;,<br>&quot;expires_in&quot;:&quot;599&quot;,<br>&quot;status&quot;:&quot;approved&quot;<br>}</pre><p>Here in the response you get an access_token which you can use to access the API. You also get the expires_in — time remaining (in seconds) till this token expires.</p><h4>Access the API</h4><p>Once you have the access_token, you can use it in the Authorization header to access the API —</p><pre>curl --location --request GET &#39;<a href="https://marketcheck-test.apigee.net/oauth/v2/search/car/active?car_type=used&#39;">https://marketcheck-</a><a href="https://marketcheck-test.apigee.net/v2/search/car/active?api_key=p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz&amp;car_type=used&#39;">prod</a><a href="https://marketcheck-test.apigee.net/oauth/v2/search/car/active?car_type=used&#39;">.apigee.net<strong>/oauth</strong>/v2/search/car/active?car_type=used&#39;</a> \<br><strong>--header &#39;Authorization: Bearer 6gnJwuAF8WATCrIjQtLiEUo7pjn5&#39;</strong></pre><blockquote>Please note : OAuth 2.0 authentication API requests are served via a proxy with a base path of <strong>/oauth. </strong>Please take a note of the change in the base path of the request above.</blockquote><p>The response would contain few useful headers like —</p><ol><li>token_status — Describing current token status used in the request</li><li>expires_in — Number of seconds this token is still valid for</li></ol><h4>Delete an access_token</h4><p>If the token has served its purpose and its expiry is long away or its compromised and you need to block it then you can invoke this endpoint to delete the said token</p><pre>curl --location --request POST &#39;<a href="http://marketcheck-test.apigee.net/oauth/token/delete&#39;">http://marketcheck-</a><a href="https://marketcheck-test.apigee.net/v2/search/car/active?api_key=p7olRU7eKaKXIQLetIbbTqxMYnRFA1kz&amp;car_type=used&#39;">prod</a><a href="http://marketcheck-test.apigee.net/oauth/token/delete&#39;">.apigee.net/oauth/token/delete&#39;</a> \<br>--header &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>--data-urlencode <strong>&#39;access_token=6gnJwuAF8WATCrIjQtLiEUo7pjn5&#39;</strong></pre><p>POST the access_token to /delete endpoint in x-www-form-urlencoded request body. Once a token is deleted, it would take API approximately 180 sec to completely block the access for said token.</p><h3>Conclusion</h3><p>These OAuth tokens are light weight than the API key to block / delete. So using them instead of API keys in an insecure environment makes sense. To further secure your access to the API, you can have a reverse proxy on your end that controls API access or does the session management to invalidate the suspicious requests.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c84ad4bc2c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marketcheck-apis/marketcheck-api-security-oauth-2-0-1c84ad4bc2c7">Marketcheck API Security — OAuth 2.0</a> was originally published in <a href="https://medium.com/marketcheck-apis">Marketcheck APIs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marketcheck API — Listing Dates Explained]]></title>
            <link>https://medium.com/marketcheck-apis/marketcheck-api-listing-dates-explained-ec67477ee800?source=rss-c1b6476c22cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec67477ee800</guid>
            <category><![CDATA[status-date]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[inventory]]></category>
            <category><![CDATA[scraped-at-date]]></category>
            <category><![CDATA[cars]]></category>
            <dc:creator><![CDATA[Rohit Shisode]]></dc:creator>
            <pubDate>Thu, 12 Sep 2019 04:52:15 GMT</pubDate>
            <atom:updated>2019-10-16T05:38:54.260Z</atom:updated>
            <content:encoded><![CDATA[<h3>Marketcheck API — Listing Dates Explained</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g0i2YKb6OjCOIGx4" /><figcaption>Photo by <a href="https://unsplash.com/@adders?utm_source=medium&amp;utm_medium=referral">Adam Tinworth</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There are two main date fields in a Marketcheck API listing, here in this post I will try to explain those along with few important ones that you might need while developing an application with the API.</p><p>This post will also explain how and when a new listing is inserted from a particular source</p><h3>Fields</h3><ol><li>Price*— Price of the car as listed on VDP (Vehicle Details Page) on dealers / source website</li><li>First seen / Scraped at — These fields contain Datetime when this listing was first crawled on a dealers website</li><li>Last seen / Status date — These fields contain Datetime when this listing was last crawled on a dealer website</li></ol><h3>New Listing Insert</h3><p>When a new listing (VIN) is found on the dealer website, obviously a new listing is inserted for that VIN on that source. Its subsequent updation depends on its price.</p><p>That same listing will be updated in subsequent crawls as long as its price remain same. So in next crawls mostly last seen / status date of a listing is updated along with changes in all other non critical fields</p><p>When Marketcheck’s crawler — <strong>Autobot</strong>, detects a change in value of price of the car and there is already a existing listing from that source, then a new listing is created with new attributes. But other fields remain same or are calculated from VINs first appearance on that source. Like for example DOM fields</p><p>A new listing is also inserted for that VIN if it had gone offline for significant (more than 5) number of days and then came back online some time in future with all the attributes still being same as last time. In such cases we insert new listing for VIN on that source, as it had been offline and there might be changes in all or some of the field values</p><p>In Search API usually the most recent listing from a source is shown, as it is the one that is active right now. But in other historic endpoints like History API and Recents Search API, you might see these multiple listings for a VIN on the same source with different listing ID. Usually these listings will have different price.</p><h3>Listing Update</h3><p>After new listing has been inserted, in next crawls if there are no changes in values of price then same listing is updated. Any update to other fields is merged into the existing listing only. So, any change in exterior color value, stock number, carfax attributes, options, features etc. is updated in existing listing only</p><h3>Reference Price &amp; Miles</h3><p>You might have noticed ref_price and ref_miles keys in API listing, these are sort of debug fields, which can be used in case actual price and miles are not present, if listings price and miles are not critical component and their older values are acceptable to you.</p><p>Usually ref_price is last known price of that car from that particular dealer / source, same is the case with ref_miles. These can be really old as well, like if car came back to the same dealer for resale, then these fields might have values that are few years older</p><h3>Get Active Listings in Date Range</h3><p>Because in each crawl <em>status_date</em> is updated and so it moves forward and <em>scraped_at</em> date remains the same, So getting all the listings that were active on a particular day or were active within a date range is a bit tricky.</p><p>Assume if we want to get all the listings that were active between 2nd June 2019 and 10th June 2019 then we have 2 kinds of listings that are of interest to us —</p><ol><li>Listings that came online on or before 10th June (scraped_at ≤ 10 June 2019)</li><li>Listings that have been online since 2nd June (status_date ≥ 2 June 2019)</li></ol><p>Below diagram shows these possibilities on x-axis, and to get active listings within given date range, we are interested in red section of that x-axis</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*JkQiylRBt2G1jnNiI-3Jaw.png" /><figcaption>x-axis : Time</figcaption></figure><p>Let me explain why we have to fetch those ranges to get active listings —</p><ol><li>Listing must have came online on or before the upper bound of our date range, as then only we can say that it was active within given range</li><li>Same goes for <em>status_date</em> — Listing must have remained online on or after the lower bound of our date range</li></ol><p>So to satisfy these criteria we have apply these two conditions to any Marketcheck historic data set, be it from Data Feed, Recents Search API or History API — to get active listings within a date range</p><p>Similar conditions can be used to get active listings for a single day as well, Say to get active listings from 25th June 2019, You would need to filter listings that have their <em>scraped_at</em> date less than or equal to 25th and <em>status_date</em> greater than or equal to 25th</p><h3>Conclusion</h3><p>This explanation should help in better understanding Marketcheck API listings and may help you in finding new and exciting use cases for Recents Search API. You can checkout our other posts that go deep into explaining all the caveats of the Recents Search API for better understanding of it</p><p>Email to us at <a href="http://api@marketcheck.com/">api@marketcheck.com</a> for any issues or inquiry</p><p>Developer Portal — <a href="https://www.marketcheck.com/">https://www.marketcheck.com</a></p><p>API Docs — <a href="https://apidocs.marketcheck.com/">https://apidocs.marketcheck.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec67477ee800" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marketcheck-apis/marketcheck-api-listing-dates-explained-ec67477ee800">Marketcheck API — Listing Dates Explained</a> was originally published in <a href="https://medium.com/marketcheck-apis">Marketcheck APIs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Find Similar Cars — Marketcheck API]]></title>
            <link>https://medium.com/marketcheck-apis/find-similar-cars-marketcheck-api-ab7898cc3312?source=rss-c1b6476c22cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab7898cc3312</guid>
            <category><![CDATA[similar-cars-for-sale]]></category>
            <category><![CDATA[cars-search-api]]></category>
            <category><![CDATA[dealer-inventory]]></category>
            <dc:creator><![CDATA[Rohit Shisode]]></dc:creator>
            <pubDate>Tue, 30 Oct 2018 04:22:37 GMT</pubDate>
            <atom:updated>2021-03-23T10:40:44.613Z</atom:updated>
            <content:encoded><![CDATA[<h3>Find Similar Cars — Marketcheck API</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t13uzRXOA7YQOYun" /><figcaption>“green sedan and orange station wagon beside building” by <a href="https://unsplash.com/@nkachanovskyyy?utm_source=medium&amp;utm_medium=referral">Nikita Kachanovsky</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Sometimes, with all the features and parameters available with Marketcheck search API, It gets confusing for users to decide how to use different parameters to get what they want.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FvsZF2hC9cH0Mo%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FvsZF2hC9cH0Mo%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FvsZF2hC9cH0Mo%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e118537d64460d013bf4445815854a5/href">https://medium.com/media/9e118537d64460d013bf4445815854a5/href</a></iframe><p>One similar situation is when you want to find similar cars to your current car.</p><p>Here in this article we will try and reduce this complexity by explaining various parameters available with API and their proper usage. Lets start by explaining few terminology we will be using.</p><h3>VIN</h3><p>VIN means vehicle identification number. A VIN is composed of 17 characters (digits and capital letters) that acts as a unique identifier for each vehicle. A VIN displays the car’s unique features, specifications and manufacturer. The VIN can be used to track recalls, registrations, warranty claims, thefts and insurance coverage. To read more about VIN and significance of each letter in it visit this <a href="https://en.wikipedia.org/wiki/Vehicle_identification_number">wikipedia page</a>.</p><h3>Taxonomy VIN</h3><p>A VIN has 17 digits out of which last 6 letters are for vehicle serial number and do not signify any specifications. So when you remove those last 6 digits and 9th digit(security check digit) what you are left with is 10 digit taxonomy vin aka Squish VIN, that tells you a lot about specification of the car. For example for this VIN <strong>3FADP4BJ</strong>6<strong>HM</strong>166161 its corresponding taxonomy vin will be <em>3FADP4BJHM</em>.</p><p>Now lets take a look at various API parameters that will allow you to search similar cars based on the VIN.</p><p>It is assumed here on that you have a single/ multiple car VINs with you and want to find exactly those car/s or similar cars.</p><h3>Find Exact VIN</h3><p>Suppose the VIN you are querying the API with is currently active in the market i.e. car is available for sale. And you want the listings that are listed online for the given VIN. In this case you want listings that have the same exact VIN which you are providing, and not the similar cars. For this purpose you can use <strong>vin </strong>parameter of the API, that lets you fetch the exact VIN. For example —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vin=1FTEW1EG9HKC35917">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used<strong>&amp;vin</strong>=1FTEW1EG9HKC35917</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*zl7R8BM1unRnRv4hSMqY4Q.png" /><figcaption>Sample response — 1</figcaption></figure><p>(Note :- Depending upon when you are reading this article, this particular VIN 1FTEW1EG9HKC35917 may or may not be active in the market. If its not active then replace this VIN with any other that’s currently active)</p><p>This API call returns one active listing for this VIN (See <strong>num_found: 1</strong>) that is deduped by Marketcheck. So it is possible that this VIN is listed online across many sites and if you want all those available listings for this VIN then you can tell API to skip the deduping using <strong>nodedup=true</strong> parameter, Like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vin=1FTEW1EG9HKC35917&amp;nodedup=true">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;<strong>vin</strong>=1FTEW1EG9HKC35917&amp;<strong>nodedup=true</strong></a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*dbWBB2nwfsuW90daapq1KA.png" /><figcaption>Sample response — 2</figcaption></figure><p>As you can see, at the time of writing this article, the total number of active listings for this VIN are 12.</p><h3>Find Similar cars — vins, taxonomy_vins</h3><p>Okay now you don’t want only that particular car, but other similar cars also. And what you want to find similar cars based on is all the specifications of the car. As stated above, specifications of a car are represented in its taxonomy_vin, which you can derive from its full VIN.</p><p>So to find similar cars matching on all the taxonomy specifications of the car, you can use <strong>vins</strong> or <strong>taxonomy_vins</strong> parameters of the API, Like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used<strong>&amp;vins=</strong>1FTEW1EG9HKC35917</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*oRKmhzMb56go9iE-JNhiBA.png" /><figcaption>Sample response — 3</figcaption></figure><p>Or using taxonomy_vins parameter like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;taxonomy_vins=1FTEW1EGHK">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used<strong>&amp;taxonomy_vins</strong>=1FTEW1EGHK</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*FIhfH8yOruPfhXnTwooiCw.png" /><figcaption>Sample response — 4</figcaption></figure><p>As many of you might be wondering the VIN is same in both urls (taxonomy_vin is just a squished version of given vin), but the responses are different! This creates confusion, and lets remove that confusion by explaining whats happening behind the scenes here.</p><p>Lets look at the VIN again — 1FTEW1EG9HKC35917. Here when we remove last 6 digits and 9th one we get this taxonomy vin — 1FTEW1EGHK. Every digit in this taxonomy_vin is representing a car specification. In particular the last digit of taxonomy_vin (and 11th digit of VIN) — <strong>K </strong>in our vin, is indicating the plant code at which this particular car was manufactured. This information while matching car on its specifications is kinda useless, and we don’t want to consider this digit while searching for similar cars because cars manufactured by single make will have same specifications regardless of actual plant or factory where the car was manufactured.</p><p>So when you search with <strong>vins</strong> parameter this particular 11th digit, the <strong>plant code is ignored</strong> and hence more number of similar cars match to our given vin, and hence higher <strong>num_found</strong>. Internally the API transforms given VIN from this 1FTEW1EG9HKC35917 to this taxonomy_vin <strong>1FTEW1EGH?</strong> (Replacing last digit K in taxonomy_vin with “?”).</p><p>But if you want to consider this last digit of taxonomy_vin also, while searching for similar cars, then you can use <strong>taxonomy_vins</strong> parameter in API call, as this will match cars that have same exact taxonomy_vin, including the plant code.</p><p>(Note : — Notice here in both parameters there is <strong>s </strong>at the end. Like <strong>vins </strong>and not vin, <strong>taxonomy_vins</strong> and not taxonomy_vin).</p><h3>Find Similar cars — vins &amp; match parameters</h3><p>Most of the times users want this to find similar cars. In previous examples when you use only vins parameter, even though it omits plant code from taxonomy specifications it still considers all other specifications for matching the car. Most of the times you just want to match the car on year, make, model and/or trim of the given car. And here comes the duo of vins and match (FYI — match only works with <strong>vins</strong> and not with vin). The value of match can be either <em>year,make,model</em> or <em>year,make,model,trim</em>. Telling the API exactly on which all specifications to match the similar cars. Below is sample API call —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917&amp;match=year,make,model">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917&amp;match=year,make,model</a></pre><p>Its response —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*PRpHciXGFsgFp9C1HxXNkQ.png" /><figcaption>Sample API response — 5</figcaption></figure><p>Or with match on <em>year,make,model,trim</em> like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917&amp;match=year,make,model,trim">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917&amp;match=year,make,model,trim</a></pre><p>Its response —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*IzJacuxXJ1ZHDqpM4NSw0Q.png" /><figcaption>Sample API response — 6</figcaption></figure><p>As you can see when you add trim to list of matching specifications the num_found comes down.</p><p>As I said earlier this is what most users want when they say “I want to find similar cars for a given vin”. Just use vins with match and you’ll be good to go.</p><p>FYI — You can give multiple vins to find the similar cars of different year, make, model. Just add more vins to the value of <strong>vins</strong> parameter, separated by comma like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917,3FADP4BJ6HM166161&amp;match=year,make,model">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917,3FADP4BJ6HM166161&amp;match=year,make,model</a></pre><p>You can pass in any number of vins here, separated by comma.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*Thf2y9oFZdT2KCZ0WsDMXQ.gif" /><figcaption>Are we done?</figcaption></figure><h3>Similar cars — Nearby</h3><p>As you can see we are not done yet! All the above calls gave us the similar cars on national level, which is may or may not be what you want, depending on your requirements. So if you want to find similar cars locally or near by to the given location, you can use geo-spatial query feature of the API.</p><p>To get more geo-specific results use latitude, longitude and radius parameters of the API, like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917,3FADP4BJ6HM166161&amp;match=year,make,model&amp;latitude=34.02&amp;longitude=-118.28&amp;radius=50">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917,3FADP4BJ6HM166161&amp;match=year,make,model<strong>&amp;latitude=34.02&amp;longitude=-118.28&amp;radius=50</strong></a></pre><p>Just append these params at the end.</p><p>Or instead of using latitude and longitude, you can directly provide zip and radius for searching similar cars around zip 90007 like —</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917,3FADP4BJ6HM166161&amp;match=year,make,model&amp;zip=90007&amp;radius=50">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG9HKC35917,3FADP4BJ6HM166161&amp;match=year,make,model<strong>&amp;zip=90007&amp;radius=50</strong></a></pre><p>The one more added benefit of searching similar local cars using geo spatial queries is you get the distance of given listing from your current location in <strong>dist </strong>key<strong> </strong>at the bottom of each listing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*gkHEOpfgyGdnvL9UVF4g0Q.png" /></figure><p>Of-course you can sort these results any way you want using APIs <strong>sort_by </strong>and <strong>sort_order</strong> parameters. Many such parameters and detailed documentation of API can be found at our official docs page — <a href="https://apidocs.marketcheck.com/">https://apidocs.marketcheck.com/</a></p><h3>Conclusion</h3><p>Marketcheck’s search API is a feature rich solution which has many facets that can be used to fulfil your requirements. Hope this article has been useful to you. If you have any questions or want our input on any API related query you might have, please feel free to contact us at api@marketcheck.com we’d be happy to assist you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab7898cc3312" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marketcheck-apis/find-similar-cars-marketcheck-api-ab7898cc3312">Find Similar Cars — Marketcheck API</a> was originally published in <a href="https://medium.com/marketcheck-apis">Marketcheck APIs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marketcheck API — Market Comparisons]]></title>
            <link>https://medium.com/marketcheck-apis/marketcheck-api-market-comparisons-533e9a6a1d8a?source=rss-c1b6476c22cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/533e9a6a1d8a</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[cars]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Rohit Shisode]]></dc:creator>
            <pubDate>Thu, 18 Oct 2018 11:36:39 GMT</pubDate>
            <atom:updated>2021-03-23T10:22:44.795Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cars Market Comparison Scatter plot with Marketcheck API</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PEr3ebNp4fmXpF1R" /><figcaption>“selective focus photography of assorted-color vehicles” by <a href="https://unsplash.com/@sooprun?utm_source=medium&amp;utm_medium=referral">Alex Suprun</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>You can build various market comparison reports/widgets/graphs based on data provided by Marketcheck API. Like few you can <a href="https://cars.marketcheck.com/vdp/5NPE34AF2FH249340">see here</a> that show time on market of the car, and Market comparison of car based on its price and miles compared with similar cars.</blockquote><p>In this article I will show you the necessary components/features of Marketcheck API that you will need to create such reports/graphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vGg8lnnBUCTSACkm9thTow.png" /><figcaption>Market Comparison Scatter Plot</figcaption></figure><p>From here on you’ll see lots of API calls that you can make, all of which contain an <strong>api_key</strong> parameter. This is a required parameter in Marketcheck API (used for authentication purposes) which you can obtain by singing up at Marketcheck’s developer portal at <a href="https://developer.marketcheck.com/"><em>https://developer.marketcheck.com/</em></a></p><h3>API Calls</h3><p>Okay now lets turn our attention to actual API calls that you will need to make to get the data needed for such scatter plots and graphs.</p><p>Suppose you have a car whose VIN (Vehicle Identification Number), price, and miles are known to you, then to find similar cars based on that VIN you can make API call like this -</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG8HFA58169&amp;match=year,make,model,trim&amp;plot=true&amp;stats=price,miles">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG8HFA58169&amp;match=year,make,model,trim&amp;plot=true&amp;stats=price,miles</a></pre><p>Now lets dissect this API call (we’ll discuss various parameters used and their meaning) —</p><ol><li><strong>car_type</strong> — This param is used to indicate car condition, i.e. whether it is a new or used car. Accordingly the value of this parameter can be used or new.</li><li><strong>vins</strong> — To search similar cars you can use <em>vins </em>param here, the value of this param can be the 17 digit VIN of a car. (Note :- Be sure to use <em>vins</em> and not <em>vin</em> here!). To search similar cars for multiple VINs (cars), you can provide multiple values to this param separated by comma like — <a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=%3Cyour_api_key%3E&amp;car_type=used&amp;vins=1FTEW1EG8HFA58169,1N6AD0EV2JN714176&amp;match=year,make,model"><em>vins=1FTEW1EG8HFA58169,1N6AD0EV2JN714176</em></a></li><li><strong>match</strong> — What do you want similar cars to match on? The value of this parameter can be year, make, model, trim OR year, make, model. This parameter works in combination with vins param to get you similar cars based on given vin matching on year, make, model and/or trim</li><li><strong>plot</strong> — By default Marketcheck API returns only 10 listings per API call with lots of fields, all of which are not be needed for our scatter plot. So to get more number of listings in one go with only the fields that matter (like price, miles, DOM and VIN), use this plot param whose value can be either true or false. With plot you can get upto <strong>1000 listings in one go</strong> with limited number of fields. We can use all these listings and their price and miles for plotting all the similar cars on the graph</li><li><strong>stats</strong> — Marketcheck API also provides stats on matched set of listings to your search criteria. Like with our example, say API returns listings for1500 for sale cars that are similar to our car, then by just appending <em>stats</em> param at the end you can request stats on various numeric fields like price, miles, DOM etc. As you can see with this API call you can request stats on multiple fields in one go just by specifying them as value to stats param, separated by comma like <em>stats=price,miles,dom</em></li></ol><p>And there you have it! With this single API fetch you have similar cars and all the necessary data points required for creating scatter plot shown above in the image. Below is the sample response —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*ktLYp6uo1bQFsnVW-sRB5g.png" /><figcaption>Sample API response — 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*xOlxrA1yYcie6CEUHnksHw.png" /><figcaption>Sample API response — 2</figcaption></figure><p>This is the type of response you will see with above API call,</p><ol><li><strong>num_found</strong> :- Tells you the number of similar cars found</li><li><strong>listings</strong> :- Array that actually contains all the listings.</li><li><strong>stats</strong> :- Object with all the fields as key on which stats were requested, In our case price and miles.</li></ol><p>So, from this API response you can use <strong>price and miles of each listing</strong> to plot similar car on scatter plot, with miles on x-axis and price on y-axis. Depending on the library that you use for generating scatter plot, you can iterate over listings array, that will contain all the similar cars. From value of stats key in JSON response you can use <strong>mean of price and miles</strong> to plot national average of the similar cars (Shown in special colour — green in our example).<br>As mentioned above it is assumed you have prior knowledge of price, miles and VIN of your car, So now you can use those <strong>price and miles to plot your car</strong> as well on the scatter plot (Again shown in special colour — red in our example)</p><h4>Similar cars near me?</h4><p>Obviously this only found similar cars on national level ( i.e. for entire US). You can go one step further and get similar cars that are near you using geo-spatial query with API and plot only those and display their averages as an extra data point on the scatter plot. To make geo specific query to API, you can just append corresponding latitude, longitude, and radius to the API call like-</p><pre><a href="https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG8HFA58169&amp;match=year,make,model&amp;plot=true&amp;stats=price,miles&amp;latitude=34.02&amp;longitude=-118.28&amp;radius=100">https://marketcheck-prod.apigee.net/v2/search/car/active?api_key=&lt;your_api_key&gt;&amp;car_type=used&amp;vins=1FTEW1EG8HFA58169&amp;match=year,make,model&amp;plot=true&amp;stats=price,miles&amp;latitude=34.02&amp;longitude=-118.28&amp;radius=100</a></pre><p>With this API you will get similar cars that are nearby given latitude, longitude and within specified radius and plot those.</p><h3>Conclusion</h3><p>Marketcheck API has many such features that can be used for analytics and many more things. More detailed documentation of Marketcheck API can be found at — <a href="https://apidocs.marketcheck.com/">https://apidocs.marketcheck.com/</a></p><p>Hope you find it useful. If you have any queries regarding API please feel free to contact us at — api@marketcheck.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=533e9a6a1d8a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marketcheck-apis/marketcheck-api-market-comparisons-533e9a6a1d8a">Marketcheck API — Market Comparisons</a> was originally published in <a href="https://medium.com/marketcheck-apis">Marketcheck APIs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>