AppleScript : Set do script result as variable
You want the brand and the country_name from the JSON data, you can use a JSON parser.

Here is an example of parsing JSON in python

-- Get https://www.binlist.net/json/431940
set cc to the clipboard as string
set finalresult to do shell script "curl https://www.binlist.net/json/" &amp; cc &amp; "  |  /usr/bin/python -c 'import json, sys; obj=json.load(sys.stdin); print obj[\"brand\"],obj[\"country_name\"]' "
display notification "Result is " &amp; finalresult --&gt; "Result is VISA Ireland"