Skip to content
Fiber AI Help Center
Fiber AI Help Center

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:

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 apiKey in the request body

  • GET requests — pass apiKey as 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

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

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

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

fiberai.api.search

Company, people, investor, investment, and job posting search (+ _count variants and sync_combined_search)

fiberai.api.live_fetch

Real-time LinkedIn fetches: profile_live_enrich, company_live_enrich, plus posts/comments/reactions

fiberai.api.contact_details

Email + phone reveal: sync_quick_contact_reveal, sync_turbo_contact_enrichment, exhaustive + batch waterfalls

fiberai.api.agentic_search

LLM-powered text-to-search: text_to_combined_search, multi_source_search, jd_to_profile_search

fiberai.api.ai_research

AI-powered domain & identity lookup

fiberai.api.kitchen_sink

Bulk identifier-based company & profile lookup

fiberai.api.google_maps

Google Maps business search (async)

fiberai.api.email_lookup

Reverse email lookup (email → LinkedIn profile)

fiberai.api.exclusions

Company & prospect exclusion lists

fiberai.api.saved_search

Saved search lifecycle

fiberai.api.validation

Email bounce detection

fiberai.api.account

get_org_credits, auto-topup settings, credit purchase

fiberai.api.enums

Industries, NAICS, regions, languages, accelerators, tags, time zones

fiberai.api.typeaheads

Company & location typeaheads

fiberai.api.utility

health_check, get_open_api (no API key)

Resources