Skip to content
Fiber AI Help Center
Fiber AI Help Center

SDKs

Available SDKs

• TypeScript SDK

• Python SDK

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 if required :

# .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: { lowerBoundExclusive: 50, upperBoundInclusive: 500 } }, pageSize: 10 } }); console.log(result.data.output.data.items);

Examples

Find decision-makers with precise targeting by title, seniority, and location.

import { peopleSearch } from '@fiberai/sdk'; const people = await peopleSearch({ body: { apiKey: process.env.FIBERAI_API_KEY, searchParams: { title: ['CEO', 'CTO', 'VP Engineering'], seniority: ['Executive'], location: { countries: ['USA'] } }, pageSize: 25 } }); people.data.output.data.items.forEach(profile => { console.log(`${profile.name} — ${profile.headline}`); });

Contact Enrichment

Reveal work emails and phone numbers for a LinkedIn profile.

import { syncContactEnrichment } from '@fiberai/sdk'; const result = await syncContactEnrichment({ body: { apiKey: process.env.FIBERAI_API_KEY, linkedinUrl: 'https://www.linkedin.com/in/example', dataToFetch: { workEmail: true, personalEmail: false, phoneNumber: true } } }); console.log('Emails:', result.data.output.profile.emails); console.log('Phones:', result.data.output.profile.phoneNumbers);

Company Info by Domain

Look up a company's details using its website domain.

import { companyByDomain } from '@fiberai/sdk'; const company = await companyByDomain({ query: { apiKey: process.env.FIBERAI_API_KEY, domain: 'stripe.com' } }); console.log(company.data.output.preferred_name); console.log(company.data.output.li_industry); console.log(company.data.output.employee_count);

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

const result = await companySearch({ body: { apiKey: process.env.FIBERAI_API_KEY, searchParams: { /* ... */ } } }); if (result.error) { console.error('API Error:', result.error); }

To throw on errors instead of checking result.error:

const result = await companySearch<true>({ body: { /* ... */ }, throwOnError: true }); // result.data is guaranteed to exist here

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 client = Client(base_url="https://api.fiber.ai") body = CompanySearchBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "searchParams": { "industriesV2": { "anyOf": ["Software"] }, "employeeCountV2": { "lowerBoundExclusive": 50, "upperBoundInclusive": 500 } }, "pageSize": 10 }) response = company_search.sync(client=client, body=body) print(response)

Async Usage

Every endpoint supports both sync and async. Use .sync() for synchronous calls and .asyncio() for async:

import asyncio 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 }) response = await company_search.asyncio(client=client, body=body) print(response) asyncio.run(main())

Examples

Find decision-makers with precise targeting by title, seniority, and location.

from fiberai.api.search import people_search from fiberai.models import PeopleSearchBody body = PeopleSearchBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "searchParams": { "title": ["CEO", "CTO", "VP Engineering"], "seniority": ["Executive"], "location": { "countries": ["USA"] } }, "pageSize": 25 }) response = people_search.sync(client=client, body=body)

Contact Enrichment

Reveal work emails and phone numbers for a LinkedIn profile.

from fiberai.api.contact_details import sync_contact_enrichment from fiberai.models import SyncContactEnrichmentBody body = SyncContactEnrichmentBody.from_dict({ "apiKey": os.environ["FIBERAI_API_KEY"], "linkedinUrl": "https://www.linkedin.com/in/example", "dataToFetch": { "workEmail": True, "personalEmail": False, "phoneNumber": True } }) response = sync_contact_enrichment.sync(client=client, body=body)

Company Info by Domain

Look up a company's details using its website domain.

from fiberai.api.company_info import company_by_domain response = company_by_domain.sync( client=client, api_key=os.environ["FIBERAI_API_KEY"], domain="stripe.com" )

Check Credits

Check your organization's remaining credit balance (free — no credits charged).

from fiberai.api.account import get_org_credits response = get_org_credits.sync( client=client, api_key=os.environ["FIBERAI_API_KEY"] )

Error Handling

By default, the SDK returns the response without raising exceptions. Check response.status_code for errors:

response = company_search.sync_detailed(client=client, body=body) if response.status_code != 200: print(f"Error: {response.status_code}") else: print(response.parsed)

To automatically raise exceptions on errors:

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

Description

fiberai.api.search

Company, people, investor, and job posting search

fiberai.api.company_info

Company details by LinkedIn URL or domain

fiberai.api.contact_details

Emails, phone numbers, and contact enrichment

fiberai.api.live_fetch

Live LinkedIn enrichment for companies and people

fiberai.api.account

Organization credits and account info

fiberai.api.validation

Email and phone validation

fiberai.api.exclusions

Company and people exclusion lists

fiberai.api.saved_search

Saved search management

Resources