agent-data
v0.9.0
Published
CLI tool for agents to discover and explore agent-data marketplace APIs
Readme
agent-data
CLI for AI agents to discover and call structured data endpoints — flights, restaurants, social-news feeds, AI-research blogs, and more.
agent-data is designed for non-interactive use by coding agents (Claude Code,
OpenClaw, Hermes, …) and humans alike. Output is JSON. Errors go to stderr.
Successful results go to stdout. Exit codes are honest: zero on success,
non-zero on any 4xx/5xx upstream response.
Install
npx -y agent-data initThis single command writes your API key to ~/.agent-data/config.json, installs
the CLI globally, and drops the discovery skill into the right place for your
coding agent. To install for a specific agent in one shot:
npx -y agent-data init --claude-code --api-key mtk_... --yesGet an API key at https://agent-data.motie.dev/settings/account (Google or GitHub sign-in; free tier includes 100 calls/month, no card required).
Commands
| Command | Description |
|---|---|
| agent-data search <query> | Semantic search across the published catalog. |
| agent-data list | Browse the catalog without ranking (paginated, ordered by published_at DESC). |
| agent-data docs <id> | Full route docs (params, schemas, example_cli) for a listing. |
| agent-data call <id> <slug> [--params...] | Invoke a route. Params auto-route to query/path/header/body based on the schema. |
| agent-data whoami | Print the resolved config (no billed call). |
| agent-data init | Set up API key + global install + agent skill. |
Example
# 1. Find an endpoint (search returns real listing ids)
agent-data search "restaurant reservations" --limit 1
# → { "listings": [ { "id": "<LISTING_ID>", "name": "Restaurant Availability API", … } ] }
# 2. Inspect its routes — the docs response is the contract (slugs, params, example_cli)
agent-data docs <LISTING_ID>
# → routes[*].slug, routes[*].parameters, routes[*].example_cli
# 3. Make the call, copying the example_cli that `docs` printed
agent-data call <LISTING_ID> <route-slug> --<param> <value>
# e.g.: agent-data call <LISTING_ID> search-restaurants --platform opentable --city "New York"Use --dry-run to preview the resolved request without spending credits, and
--verbose to log the resolved key/base URL to stderr.
Environment
| Variable | Purpose | Default |
|---|---|---|
| AGENT_DATA_API_KEY | API key (overrides the stored config). | unset |
| AGENT_DATA_BASE_URL | API base URL (use only for staging). | https://agent-data.motie.dev |
| AGENT_DATA_AGENT_TYPE | Identifies the calling agent for analytics. Set by init. | unset |
| AGENT_DATA_POSTHOG_ENABLED | Set to false to opt out of CLI usage telemetry. | telemetry on |
| AGENT_DATA_VERSION_CHECK_DISABLE | Set to 1 to skip the daily npm-registry version check. | check on |
The config file at ~/.agent-data/config.json is created with mode 0600.
Telemetry redacts API keys, tokens, and Authorization headers before
transmission.
Links
- Dashboard — https://agent-data.motie.dev
- Docs — https://docs.agent-data.dev
- Landing — https://agent-data.dev
- Changelog — CHANGELOG.md
