SDKs
Available SDKs
• TypeScript SDK
• Python SDK
For AI agents (Cursor / Claude / Codex / ChatGPT / Copilot)
Don't guess operation names — read the canonical agent-facing docs first:
Routing index + critical rules: llms.txt
Per-operation markdown:
https://api.fiber.ai/ai-docs/<operationId>.md(e.g. companySearch, syncQuickContactReveal)Operation index: ai-docs/index.md
OpenAPI spec: openapi.json
MCP server: mcp.fiber.ai/mcp/v2
TypeScript SDK
Official TypeScript/JavaScript SDK for the Fiber AI API.
Installation
npm install @fiberai/sdk # or yarn add @fiberai/sdk # or pnpm add @fiberai/sdk
Requires Node.js 18.0.0 or higher.
Authentication
All API requests require an API key. Get yours at fiber.ai/app/api.
POST requests — pass
apiKeyin the request bodyGET requests — pass
apiKeyas a query parameter
Store your API key in an environment variable:
# .env FIBERAI_API_KEY=your_api_key_here
Quick Start
import { companySearch } from '@fiberai/sdk'; const result = await companySearch({ body: { apiKey: process.env.FIBERAI_API_KEY!, searchParams: { industriesV2: { anyOf: ['Software'] }, // employeeCountV2 bounds are bucketed. // Allowed values: 0 | 1 | 10 | 50 | 200 | 500 | 1000 | 5000 | 10000 | null employeeCountV2: { lowerBoundExclusive: 50, upperBoundInclusive: 500, }, headquartersCountryCode: { anyOf: ['USA'] }, }, pageSize: 10, }, }); console.log(`Found ${result.data?.output.data.length} companies`); console.log('Cost:', result.data?.chargeInfo);
Examples
People Search
Find decision-makers with precise targeting by job title and country.
import { peopleSearch } from '@fiberai/sdk'; const people = await peopleSearch({ body: { apiKey: process.env.FIBERAI_API_KEY!, searchParams: { jobTitleV2: { anyOf: [ { type: 'term', term: 'CEO' }, { type: 'term', term: 'CTO' }, { type: 'static-groups', groups: ['c-suite'] }, ], }, country3LetterCode: { anyOf: ['USA'] }, }, pageSize: 25, }, }); people.data?.output.data.forEach((profile) => { console.log(`${profile.name} — ${profile.headline}`); });
Contact Enrichment
Reveal work emails and phone numbers for a LinkedIn profile (sync, fast).
import { syncQuickContactReveal } from '@fiberai/sdk'; const result = await syncQuickContactReveal({ body: { apiKey: process.env.FIBERAI_API_KEY!, linkedinUrl: 'https://www.linkedin.com/in/example', enrichmentType: { getWorkEmails: true, getPersonalEmails: false, getPhoneNumbers: true, }, }, }); console.log('Emails:', result.data?.output.profile.emails); console.log('Phones:', result.data?.output.profile.phoneNumbers); console.log('Cost:', result.data?.chargeInfo);
For deeper coverage at higher latency or cost, use syncTurboContactEnrichment or the async waterfall triggerExhaustiveContactEnrichment + pollExhaustiveContactEnrichmentResult. For 1k+ rows, use startBatchContactEnrichment + pollBatchContactEnrichment.
Live LinkedIn Enrichment
Pull a fresh company snapshot directly from LinkedIn by slug, organization ID, or URL.
import { companyLiveEnrich } from '@fiberai/sdk'; const company = await companyLiveEnrich({ body: { apiKey: process.env.FIBERAI_API_KEY!, type: 'slug', value: 'stripe', }, }); console.log(company.data?.output);
Check Credits
Check your organization's remaining credit balance (free — no credits charged).
import { getOrgCredits } from '@fiberai/sdk'; const credits = await getOrgCredits({ query: { apiKey: process.env.FIBERAI_API_KEY! }, }); console.log(`Available: ${credits.data?.output.available}`); console.log(`Used: ${credits.data?.output.used}`);
Error Handling
SDK functions return { data, error, response }. Check error before reading data:
const result = await companySearch({ body: { apiKey: process.env.FIBERAI_API_KEY!, searchParams: { /* ... */ } }, }); if (result.error) { console.error(`HTTP ${result.response.status}:`, result.error); } else { console.log(`${result.data.output.data.length} companies`); }
Pass throwOnError: true to throw on non-2xx responses instead:
const result = await companySearch({ body: { /* ... */ }, throwOnError: true, }); // `result.data` is now non-nullable
Common error codes:
Code | Meaning | What to do |
|---|---|---|
401 | Unauthorized | Check your API key |
402 | Payment Required | Top up credits at fiber.ai/app/api |
429 | Too Many Requests | Slow down — you've hit the rate limit |
500 | Server Error | Contact support |
Resources
Python SDK — if you prefer Python
=====================================================================
Python SDK
Official Python SDK for the Fiber AI API.
Installation
pip install fiberai
Requires Python 3.9 or higher.
Authentication
All API requests require an API key. Get yours at fiber.ai/app/api.
The API key is passed in the request body for POST requests and as a query parameter for GET requests.
Store your API key in an environment variable:
export FIBERAI_API_KEY=your_api_key_here
Quick Start
import os from fiberai import Client from fiberai.api.search import company_search from fiberai.models import CompanySearchBody from fiberai.models.company_search_response_200 import CompanySearchResponse200 client = Client(base_url="https://api.fiber.ai") body = CompanySearchBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "searchParams": { "industriesV2": {"anyOf": ["Software"]}, # employeeCountV2 bounds are bucketed. # Allowed: 0, 1, 10, 50, 200, 500, 1000, 5000, 10000, None "employeeCountV2": { "lowerBoundExclusive": 50, "upperBoundInclusive": 500, }, "headquartersCountryCode": {"anyOf": ["USA"]}, }, "pageSize": 10, }) result = company_search.sync(client=client, body=body) if isinstance(result, CompanySearchResponse200): for company in result.output.data: print(company.preferred_name) print("Cost:", result.charge_info.to_dict()) else: print("error:", result.to_dict() if result else "no body")
Async Usage
Every operation has sync and async variants. Use .sync() for synchronous calls and .asyncio() for async:
import asyncio import os from fiberai import Client from fiberai.api.search import company_search from fiberai.models import CompanySearchBody async def main(): client = Client(base_url="https://api.fiber.ai") body = CompanySearchBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "searchParams": {"industriesV2": {"anyOf": ["Software"]}}, "pageSize": 10, }) result = await company_search.asyncio(client=client, body=body) print(result) asyncio.run(main())
Examples
People Search
Find decision-makers with precise targeting by job title and country.
from fiberai.api.search import people_search from fiberai.models import PeopleSearchBody from fiberai.models.people_search_response_200 import PeopleSearchResponse200 body = PeopleSearchBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "searchParams": { "jobTitleV2": { "anyOf": [ {"type": "term", "term": "CEO"}, {"type": "term", "term": "CTO"}, {"type": "static-groups", "groups": ["c-suite"]}, ], }, "country3LetterCode": {"anyOf": ["USA"]}, }, "pageSize": 25, }) result = people_search.sync(client=client, body=body) if isinstance(result, PeopleSearchResponse200): for profile in result.output.data: print(f"{profile.name} — {profile.headline}")
Contact Enrichment
Reveal work emails and phone numbers for a LinkedIn profile (sync, fast).
from fiberai.api.contact_details import sync_quick_contact_reveal from fiberai.models import SyncQuickContactRevealBody body = SyncQuickContactRevealBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "linkedinUrl": "https://www.linkedin.com/in/example", "enrichmentType": { "getWorkEmails": True, "getPersonalEmails": False, "getPhoneNumbers": True, }, }) result = sync_quick_contact_reveal.sync(client=client, body=body)
For deeper coverage, use sync_turbo_contact_enrichment or the async waterfall trigger_exhaustive_contact_enrichment + poll_exhaustive_contact_enrichment_result. For 1k+ rows, use start_batch_contact_enrichment + poll_batch_contact_enrichment.
Live LinkedIn Enrichment
Pull a fresh company snapshot directly from LinkedIn by slug, organization ID, or URL.
from fiberai.api.live_fetch import company_live_enrich from fiberai.models import CompanyLiveEnrichBody body = CompanyLiveEnrichBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "type": "slug", "value": "stripe", }) result = company_live_enrich.sync(client=client, body=body)
Check Credits
Check your organization's remaining credit balance (free — no credits charged).
from fiberai.api.account import get_org_credits credits = get_org_credits.sync( client=client, api_key=os.environ["FIBERAI_API_KEY"], )
Error Handling
The non-detailed call returns a discriminated union covering every documented status. Type-narrow with isinstance to dispatch:
from fiberai.api.search import company_search from fiberai.models.company_search_response_200 import CompanySearchResponse200 from fiberai.models.company_search_response_401 import CompanySearchResponse401 from fiberai.models.company_search_response_402 import CompanySearchResponse402 from fiberai.models.company_search_response_429 import CompanySearchResponse429 result = company_search.sync(client=client, body=body) if isinstance(result, CompanySearchResponse200): companies = result.output.data elif isinstance(result, CompanySearchResponse401): raise RuntimeError("invalid API key") elif isinstance(result, CompanySearchResponse402): raise RuntimeError("out of credits") elif isinstance(result, CompanySearchResponse429): raise RuntimeError("rate limited; back off and retry")
To raise on undocumented status codes (e.g. transient 502/503):
client = Client( base_url="https://api.fiber.ai", raise_on_unexpected_status=True, )
Common error codes:
Code | Meaning | What to do |
|---|---|---|
401 | Unauthorized | Check your API key |
402 | Payment Required | Top up credits at fiber.ai/app/api |
429 | Too Many Requests | Slow down — you've hit the rate limit |
500 | Server Error | Contact support |
Available API Modules
Module | What's in it |
|---|---|
| Company, people, investor, investment, and job posting search (+ |
| Real-time LinkedIn fetches: |
| Email + phone reveal: |
| LLM-powered text-to-search: |
| AI-powered domain & identity lookup |
| Bulk identifier-based company & profile lookup |
| Google Maps business search (async) |
| Reverse email lookup (email → LinkedIn profile) |
| Company & prospect exclusion lists |
| Saved search lifecycle |
| Email bounce detection |
|
|
| Industries, NAICS, regions, languages, accelerators, tags, time zones |
| Company & location typeaheads |
|
|
Resources
TypeScript SDK — if you prefer TypeScript/JavaScript