Queries
Every query below runs on datacircle.json as you download it. Each one works on datacircle.csv too.
DuckDB
Section titled “DuckDB”An API’s plans under $50, cheapest per 1,000 first:
SELECT provider, plan, billing, pay, perThousand, score, pageFROM 'datacircle.json'WHERE api = 'Employee email' AND pay > 0 AND pay <= 50 AND perThousand IS NOT NULLORDER BY perThousand LIMIT 10;An API’s best scored plans, with each part of the score:
SELECT provider, plan, score, priceScore, dataScore, costToGetStartedScore, bundleScore, performanceScoreFROM 'datacircle.json'WHERE api = 'Employee profile' AND score IS NOT NULLORDER BY score DESC LIMIT 10;One provider’s plans:
SELECT api, plan, billing, pay, perThousandFROM 'datacircle.json'WHERE provider ILIKE '%fetchin%'ORDER BY api, perThousand;The cheapest paid plan per 1,000 of each API:
SELECT api, arg_min(provider || ', ' || plan, perThousand) AS plan, min(perThousand) AS perThousandFROM 'datacircle.json'WHERE pay > 0 AND perThousand IS NOT NULLGROUP BY api ORDER BY api;The APIs under one category:
SELECT subcategory, sheet, api, count(*) AS plansFROM 'datacircle.json'WHERE category = 'Contact'GROUP BY ALL ORDER BY subcategory, sheet;jq '[.[] | select(.api == "Employee email" and .pay > 0 and .pay <= 50 and .perThousand != null)] | sort_by(.perThousand) | .[:10] | map({provider, plan, pay, perThousand, score, page})' datacircle.jsonPython
Section titled “Python”import json
rows = json.load(open("datacircle.json"))found = sorted( (r for r in rows if r["api"] == "Employee email" and r["perThousand"] is not None), key=lambda r: r["perThousand"],)for r in found[:10]: print(r["provider"], r["plan"], r["perThousand"], r["page"])