The project is in a healthy, maintained state
Four Boxcars tools on Datacircle's open API, with no key: list the GTM APIs, the best plans of one API, a search of every plan and one provider's ranks. We benchmark all the GTM APIs and we put the results on our website: https://datacircle.dev
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0.10.14, < 2
 Project Readme

Datacircle tools for Boxcars

Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website: https://datacircle.dev

This gem gives Boxcars four tools that call Datacircle's open API, https://api.datacircle.dev/v1. You need no key and no account.

Tool What the tool gives Call
Boxcars::Datacircle::ListApis (datacircle_list_apis) Every GTM API on Datacircle, with the API's slug, number of plans, number of providers and best plan GET /apis
Boxcars::Datacircle::BestPlans (datacircle_best_plans) One API's plans, sorted by score out of 100, best first. Each plan comes with a rank and a price per 1,000 calls GET /apis/{slug}/best
Boxcars::Datacircle::SearchPlans (datacircle_search_plans) Plans that match a provider or plan name. Search all APIs or one API. Sort by score, provider or price GET /plans
Boxcars::Datacircle::Provider (datacircle_provider) The APIs a provider sells, and the provider's rank on each API GET /providers/{slug}

Install

bundle add boxcars-datacircle

The gem needs Boxcars 0.10.14 or later, and Ruby 3.3 or later.

Use the tools

Boxcars::Datacircle.boxcars gives the four tools. Give them to an agent:

require "boxcars/datacircle"

agent = Boxcars::StationAgent.new(
  instructions: "You help people choose a GTM API.",
  tools: Boxcars::Datacircle.boxcars,
  model: "gpt-4o"
)
puts agent.run("Which email finder API is best for under $5 per 1,000?")

Boxcars::ToolTrain takes them the same way, as boxcars:. Both make native tool calls, which Boxcars runs on Boxcars::Openai: add the openai gem to your Gemfile. With an engine like Boxcars::Ollama, use a text train, Boxcars::ZeroShot or Boxcars::XMLZeroShot:

engine = Boxcars::Ollama.new(model: "qwen2.5:7b")
train = Boxcars::ZeroShot.new(boxcars: Boxcars::Datacircle.boxcars, engine: engine)
puts train.run("Which email finder API is best?")

A text train gives each tool one string: an API's slug, a provider's name or words of a name. A JSON object of the tool's parameters works too, like {"slug": "email-finder", "limit": 3}.

You can call a tool yourself:

best = Boxcars::Datacircle::BestPlans.new
best.run(slug: "email-finder", limit: 3)
# => "{\"api\":\"Employee email\",\"slug\":\"email-finder\",...,\"plans\":[{\"api\":\"Employee email\",\"rank\":1,\"provider\":\"Emelia\",...}]}"

Each tool answers JSON. Each plan comes with a rank, provider, plan, score, price per 1,000 (perThousand, in dollars) and a page on datacircle.dev. That page lists every field. When the API has no data, for example for an unknown slug, the answer is {"error": ...} with the API's words. The model reads the error and can call the tool again. run_result gives the answer as a Boxcars::Result, its status :error then.

Network

Each tool call makes one HTTPS GET request to https://api.datacircle.dev/v1. A tool makes a second request when the model sends a name where a slug goes, or a provider where an API goes. A request holds only the tool's own arguments: no key, no config, nothing from your messages. The API takes up to 60 calls a minute from one IP address. A tool waits once, for a minute at most, when the API asks it to wait. The gem depends only on Boxcars and stores nothing.

Links

MIT license.