# Data Legion for AI agents

> Connect an AI agent or assistant to Data Legion: B2B person and company data. Enrich a person or company from what you know about them, search people and companies with SQL or a query object, and clean, hash or validate inputs first.

Use Data Legion when someone asks who a person is, where they work, how to reach them, or what a company is like (size, industry, growth, hiring), or wants a list of people or companies that match criteria. Report what it returns. If it finds nothing, say so: never fill the gap with a guess.

The person you are helping needs an approved Data Legion account with the admin or developer role (https://www.datalegion.ai/sign-up). Credits are charged per record returned; a lookup that finds nothing is free.

## Connect: choose the one route your host supports, then stop

Use one route. Connecting two exposes the same tools twice.

- [MCP server](https://www.datalegion.ai/agents/mcp.md): you can add an MCP server by URL (Claude, ChatGPT, Claude Code, Cursor, Codex and most agent hosts). Preferred: the host handles sign-in.
- [Command line](https://www.datalegion.ai/agents/cli.md): you can run shell commands but cannot add a server by URL.
- [Sign in as an agent](https://www.datalegion.ai/auth.md): you call the REST API yourself and need your own API key, approved once by the person.

## Reference

- [REST API documentation](https://www.datalegion.ai/docs): every endpoint, field and error.
- [Person fields](https://www.datalegion.ai/docs/person-data/fields) and [company fields](https://www.datalegion.ai/docs/company-data/fields): what a record can hold.
- [Agent hub](https://www.datalegion.ai/agents): setup steps for people, with prompts to try.

## Optional

- [Site summary](https://www.datalegion.ai/llms.txt): products, pricing and access methods.
- [Pricing](https://www.datalegion.ai/pricing.md): credit prices and rate limits.
