Prerequisites
- A Firecrawl account and API key
- An organization admin who has accepted Data Legion’s data terms in the Firecrawl dashboard (see Accept the data terms)
- The Firecrawl SDK:
pip install firecrawl-pyornpm install @mendable/firecrawl-js
Capabilities
Data Legion is listed under People and Company. The provider name isdatalegion.
A call is charged only when it returns a match. The credit cost of each capability is shown on the Data Legion listing in your Firecrawl dashboard.
Inputs
Theoptions object takes the same fields as the Data Legion enrich endpoints.
Person capabilities take email, email_hash, phone, social_url, or a name (full_name, or first_name and last_name) paired with one more detail such as company, school, job_title, or city. See the Person Enrichment API reference for every field.
Company capabilities take domain, name, linkedin_id, or ticker_symbol. See the Company Enrichment API reference for every field.
Calling a Capability
An Alexandria call is a Firecrawlscrape with an alexandria block instead of a URL.
"capability": "companies/enrich-base" with "options": {"domain": "hubspot.com"}.
Response
Each entry inalexandria has a data object with the standard Data Legion enrich response, plus the call’s credit cost (creditsCost in JavaScript, credits_cost in Python):
company in place of person. Field definitions are in the Person Schema and Company Schema.
A failed call returns an error object with a code and message instead of data. Check for it before reading the record.
Accept the Data Terms
Alexandria requires each Firecrawl organization to accept a provider’s data terms before calling it. Until an admin accepts them, requests fail with HTTP 403 and the codeTHIRD_PARTY_DATA_TERMS_REQUIRED, and the error’s requiresAction.url points to where an admin accepts them. Both SDKs raise this as an exception (ProviderTermsRequiredError in Python), so it never reaches the per-call error object.
Firecrawl’s guidance is that agents need explicit user authorization before accepting terms. Have a person accept them once in the Firecrawl dashboard rather than letting an agent do it.
Discovery
Agents don’t need the capability names hardcoded. Firecrawl’sfind_tools (findTools in JavaScript), or a search request with sources: ["alexandria"], returns matching providers with their capability paths, inputs, response contracts, and pricing. Discovery is free.
Alexandria or the Data Legion API
Alexandria covers enrichment, one record per call, on your Firecrawl key and bill. Search, natural-language discovery, bulk delivery, and higher rate limits are on the Data Legion API, which uses a Data Legion API key.Related
- Person Enrichment API
- Company Enrichment API
- MCP Server for connecting AI assistants directly
- Firecrawl documentation