Skip to main content

datacircle-haystack

Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website.

Our website: https://datacircle.dev

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

Tool Gives Call
datacircle_list_apis Every GTM API on Datacircle, with the API's slug, number of plans, number of providers and best plan GET /apis
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
datacircle_search_plans Plans that match a provider or plan name, on all APIs or on one API. You can sort them by score, provider or price GET /plans
datacircle_provider The APIs a provider sells, and the provider's rank on each API GET /providers/{slug}

Install

pip install datacircle-haystack

The package needs Haystack 2.15 or later (haystack-ai) and Python 3.10 or later.

Give the tools to an agent

from haystack.components.agents import Agent
from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.dataclasses import ChatMessage
from haystack_integrations.tools.datacircle import DatacircleToolset

agent = Agent(chat_generator=OpenAIChatGenerator(), tools=DatacircleToolset())
agent.warm_up()
result = agent.run(messages=[ChatMessage.from_user("Which email finder API is best for under $5 per 1,000?")])
print(result["last_message"].text)

OpenAIChatGenerator reads your key from OPENAI_API_KEY. Any Haystack chat generator that calls tools works the same way.

To give the agent fewer tools, list their names: DatacircleToolset(tool_names=["datacircle_best_plans"]).

You can also use the toolset in an Agent inside a pipeline. On Haystack 2, you can pass the toolset to a chat generator's tools and to a ToolInvoker. Set raise_on_failure=False on the ToolInvoker so the model sees the error message. Save a pipeline and Haystack stores the toolset as a list of tool names. Update this package, and the saved pipeline gets the new tools.

Call a tool yourself

Each tool returns our API's answer as a dict:

from haystack_integrations.tools.datacircle import datacircle_tool

print(datacircle_tool("datacircle_best_plans").invoke(slug="email-finder", limit=3))

Tool output for the model

The model gets each answer as 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.

You can give a provider's name in place of a slug. The tool turns Bright Data into bright-data.

If the model passes an unknown slug, the tool raises a DatacircleError with the API's error message. For an unknown API slug, the message lists every valid slug. The Agent gives the message to the model, and the model can call the tool again. The tool checks each number from the model before the API call. If a number is out of range, the tool skips the API call. The model gets an error message.

Network

Each tool call makes one HTTPS GET request to https://api.datacircle.dev/v1 and nothing else. The request holds only the tool's own arguments. The API takes up to 60 calls a minute from one IP address. When the API asks the tool to wait, the tool waits up to a minute. The tool waits once per call at most. All plans are in one file at https://datacircle.dev/datacircle.json.

MIT license.

Metadata

Release files for datacircle-haystack 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datacircle-haystack 0.1.0
File Size Uploaded Provenance Actions
datacircle_haystack-0.1.0.tar.gz 10.4 kB Without provenance Details for datacircle_haystack-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datacircle-haystack 0.1.0
File Interpreter ABI Platform Actions
datacircle_haystack-0.1.0-py3-none-any.whl Python 3 none any Details for datacircle_haystack-0.1.0-py3-none-any.whl

Total release size: 20.2 kB

Release files / datacircle_haystack-0.1.0.tar.gz

Download URL datacircle_haystack-0.1.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a87825de869cd08931aad270b77959dc6bcc93ebbc0d0f534d512f0fb43c1bbb
BLAKE2b-256 checksum
How to use checksums
9e79a76bf0f939380148c156f0913352630cb70d324fc3d650a86b837f487dac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / datacircle_haystack-0.1.0-py3-none-any.whl

Download URL datacircle_haystack-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53a607f166bbdf6e1a65c21abb003fae381701e1506c942abdcc56fb42ce9b44
BLAKE2b-256 checksum
How to use checksums
efe023976aab55ad741e1c05c27d0910313394f2c1a12cad35f4756f1517ec6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for datacircle-haystack 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page