Skip to content

Queries

Every query below runs on datacircle.json as you download it. Each one works on datacircle.csv too.

An API’s plans under $50, cheapest per 1,000 first:

SELECT provider, plan, billing, pay, perThousand, score, page
FROM 'datacircle.json'
WHERE api = 'Employee email' AND pay > 0 AND pay <= 50 AND perThousand IS NOT NULL
ORDER BY perThousand LIMIT 10;

An API’s best scored plans, with each part of the score:

SELECT provider, plan, score, priceScore, dataScore, costToGetStartedScore, bundleScore, performanceScore
FROM 'datacircle.json'
WHERE api = 'Employee profile' AND score IS NOT NULL
ORDER BY score DESC LIMIT 10;

One provider’s plans:

SELECT api, plan, billing, pay, perThousand
FROM '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 perThousand
FROM 'datacircle.json'
WHERE pay > 0 AND perThousand IS NOT NULL
GROUP BY api ORDER BY api;

The APIs under one category:

SELECT subcategory, sheet, api, count(*) AS plans
FROM 'datacircle.json'
WHERE category = 'Contact'
GROUP BY ALL ORDER BY subcategory, sheet;
Terminal window
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.json
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"])