### SDK Example (JavaScript) Source: https://www.thecompaniesapi.com/api/count-companies Example of how to use the JavaScript SDK to count companies. ```APIDOC ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.countCompanies({ query: [ { attribute: 'about.industries', operator: 'or', sign: 'equals', values: ['computer-software'] } ] }) const count = response.data // Number of companies that match the query ``` ``` -------------------------------- ### JavaScript SDK Example Source: https://www.thecompaniesapi.com/api/fetch-openapi Example of how to fetch the OpenAPI specification using the JavaScript SDK. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchOpenApi() const openapi = response.data // The OpenAPI specification ``` -------------------------------- ### Fetching Company Data Source: https://www.thecompaniesapi.com/api/authentication Examples demonstrating how to fetch company data using the SDK, a GET parameter, or an Authorization header. ```APIDOC ## Fetching Company Data ### Description Examples demonstrating how to fetch company data using the SDK, a GET parameter, or an Authorization header. ### SDK Example (JavaScript) ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchCompany({ domain: 'thecompaniesapi.com' }) const company = response.data // The company profile ``` ### GET Parameter Example ``` https://api.thecompaniesapi.com/v2/companies/thecompaniesapi.com?token=YOUR_API_TOKEN ``` ### Authorization Header Example ``` fetch('https://api.thecompaniesapi.com/v2/companies/thecompaniesapi.com', { headers: { 'Authorization': 'Basic YOUR_API_TOKEN' } }) ``` ``` -------------------------------- ### JavaScript SDK Example Source: https://www.thecompaniesapi.com/api/search-technologies Example of how to use the JavaScript SDK to search for technologies. ```APIDOC ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchTechnologies({ search: 'shopify', size: 10 }) const technologies = response.data.technologies // Technologies that match the keyword const meta = response.data.meta // Meta information ``` ``` -------------------------------- ### Search Industries using SDK Source: https://www.thecompaniesapi.com/api/search-industries Example of how to search for industries using the provided JavaScript SDK. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchIndustries({ search: 'software', size: 10 }) const industries = response.data.industries // Industries that match the keyword const meta = response.data.meta // Meta information ``` -------------------------------- ### Fetch Full Company Profile with Real-time Refresh (Paid) Source: https://www.thecompaniesapi.com/api/enrich-company-from-domain This example fetches a full company profile and triggers a real-time data refresh, including website crawling and social media analysis. This operation incurs an additional 10 credits. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) // Example 2 : Fetch the full company profile (paid) and trigger real-time data refresh const response = await tca.fetchCompany({ domain: 'thecompaniesapi.com', refresh: true, }) const companyRefreshed = response.data ``` -------------------------------- ### Search Companies with Criteria Source: https://www.thecompaniesapi.com/use-cases/companies-search-engine Use this GET request to search for companies based on specified criteria. The `query` parameter accepts an array of conditions, each with an attribute, operator, and sign for filtering. ```bash https://api.thecompaniesapi.com/v2/companies ``` -------------------------------- ### Count Companies using GET Source: https://www.thecompaniesapi.com/api/count-companies Count companies matching your query using a GET request. The query parameters must be stringified and encoded. ```APIDOC ## GET /v2/companies/count ### Description Counts the number of companies that match the provided query parameters. ### Method GET ### Endpoint https://api.thecompaniesapi.com/v2/companies/count ### Parameters #### Query Parameters - **query** (string) - Required - An array of conditions the companies must match. Must be stringified and encoded. - **searchstring** (string) - Optional - An additional search query applied to the company name or domain. - **searchFields[]** (array) - Optional - Define the fields to search. Possible values: `about.name`, `domain.domain`. ### Response #### Success Response (200) - **count** (number) - The number of companies matching the conditions. ### Response Example ```json { "count": 150 } ``` ``` -------------------------------- ### Fetch Company Data using JavaScript SDK Source: https://www.thecompaniesapi.com/ Initialize the SDK with your API key and use the `fetchCompany` method to retrieve detailed information about a company by its domain. The response includes general information, analytics, assets, financial data, and more. ```javascript import { createClient } from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_KEY', }) const { data, errors } = await tca.fetchCompany({ domain: 'apple.com', }) console.log(data) // { about: { name: 'Apple', ... }, ... } ``` -------------------------------- ### Fetch OpenAPI Specification using SDK Source: https://www.thecompaniesapi.com/api/fetch-openapi Use the SDK to fetch the OpenAPI specification. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchOpenApi() const openapi = response.data // The OpenAPI specification ``` -------------------------------- ### Authenticate with GET Parameter (JavaScript) Source: https://www.thecompaniesapi.com/api/authentication Authenticate requests by appending your API token as a `GET` parameter. This method is often used for quick endpoint testing. ```javascript const response = await fetch('https://api.thecompaniesapi.com/v2/companies/thecompaniesapi.com?token=YOUR_API_TOKEN') const company = response.data // The company profile ``` -------------------------------- ### Fetch Company Data by Email using JavaScript SDK Source: https://www.thecompaniesapi.com/use-cases/enrich-users-signup Initialize the SDK with your API token and use the `fetchCompanyByEmail` method to retrieve company information based on a user's email. Set `refresh: true` to trigger a real-time data analysis, which incurs extra credits. ```javascript // To install our JavaScript SDK with TypeScript compatibility, run: // npm install @thecompaniesapi/sdk import createClient from '@thecompaniesapi/sdk' try { // Initialize our client const tca = createClient({ apiToken: 'XXXXXX', // Your api token from your dashboard }) // Your new registered user let user = { email: 'julien@thecompaniesapi.com', name: 'Julien', } // Retrieve the company for the new registered user const response = await tca.fetchCompanyByEmail({ email: user.email, }) // If you want to trigger a real-time refresh of the company data // You can set the refresh parameter to true // This will crawl the website, analyze social media, and enrich the data with our AI // const response = await tca.fetchCompanyByEmail({ // email: user.email, // refresh: true // }) const company = response.data.company const email = response.data.email // The company data has been successfully retrieved // All datapoints: https://www.thecompaniesapi.com/api/datapoints if (company) { if (company.about) { user.companyName = company.about.name user.companyIndustry = company.about.industry user.companyEmployees = company.about.totalEmployees } if (company.assets) { user.companyLogo = company.assets.logoSquare } if (company.finances) { user.companyRevenue = company.finances.revenue } if (company.urls) { user.companyWebsite = company.urls.website } } // Additional information about the user if (email) { user.fullName = email.fullName user.freeEmail = email.isFree user.disposableEmail = email.isDisposable } console.log(user) } catch (error) { console.error(error) } ``` -------------------------------- ### Ask a question about a company Source: https://www.thecompaniesapi.com/ Get answers to specific questions about a company using AI. This new feature allows for dynamic data retrieval based on queries. ```APIDOC ## POST /companies/:domain/ask ### Description Ask a question about a specific company and receive an AI-generated answer. This new endpoint provides dynamic data retrieval based on user queries related to a company. ### Method POST ### Endpoint /companies/:domain/ask ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name of the company to ask a question about. #### Request Body - **question** (string) - Required - The question to ask about the company. ### Request Example ```json { "question": "What is the company's primary business focus?" } ``` ### Response #### Success Response (200) - **answer** (string) - The AI-generated answer to the question. #### Response Example ```json { "answer": "The company's primary business focus is on developing and marketing computer software, consumer electronics, and personal computers." } ``` ``` -------------------------------- ### Search Similar Companies with SDK Source: https://www.thecompaniesapi.com/api/search-similar-companies Use the SDK to search for companies similar to a list of domains. Specify the number of results to return. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchSimilarCompanies({ domains: ['crisp.chat', 'intercom.com'], size: 25 }) const companies = response.data.companies // Companies that are similar to the domains const meta = response.data.meta // Meta information ``` -------------------------------- ### Find Similar Industries Source: https://www.thecompaniesapi.com/api/find-similar-industries Get a list of similar industries by providing an industry name or code. This endpoint is useful for discovering related sectors for business expansion or marketing. ```APIDOC ## GET /v2/industries/similar ### Description Identify related sectors and expand your business opportunities by finding similar industries. ### Method GET ### Endpoint https://api.thecompaniesapi.com/v2/industries/similar ### Parameters #### Query Parameters - **industries** (array) - Required - The industries to compare with (max: 10). - **page** (number) - Optional - The page to fetch (default to 1). - **size** (number) - Optional - The number of industries to be returned (between 1 and 100). Default to 25. ### Response #### Success Response (200) - **industries** (array) - The industries that match your conditions. - **meta** (object) - The metas information. ### Request Example ``` https://api.thecompaniesapi.com/v2/industries/similar?industries[]=saas&industries[]=fintech&page=1&size=10 ``` ### Response Example ```json { "industries": [ { "name": "Fintech", "id": "fintech" }, { "name": "SaaS", "id": "saas" } ], "meta": { "page": 1, "size": 10, "total": 2 } } ``` ``` -------------------------------- ### Search Companies by Prompt using SDK Source: https://www.thecompaniesapi.com/api/search-companies-prompt Use the SDK to search for companies based on a prompt. Specify the prompt and desired size for the results. The response contains the list of companies and meta information. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchCompaniesByPrompt({ prompt: 'SaaS Companies in the United States with more than 100 employees', size: 25 }) const companies = response.data.companies // Companies that match the prompt const meta = response.data.meta // Meta information ``` -------------------------------- ### Fetch Company Email Patterns Source: https://www.thecompaniesapi.com/api/fetch-company-email-patterns Send a domain name to the API to get all email patterns associated with that company and their respective usage percentages. This can be used to optimize email verification processes. ```APIDOC ## GET /v2/companies/:domain/email-patterns ### Description Retrieves all email patterns used by a company for a given domain, along with their usage percentages. ### Method GET ### Endpoint https://api.thecompaniesapi.com/v2/companies/:domain/email-patterns ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name of the company (e.g., "microsoft.com"). ### Response #### Success Response (200) - **patterns** (array) - An array of email patterns used by the company. ### Request Example ``` GET https://api.thecompaniesapi.com/v2/companies/microsoft.com/email-patterns ``` ### Response Example ```json { "patterns": [ "*@microsoft.com", "*@outlook.com" ] } ``` ``` -------------------------------- ### Export Companies Analytics Source: https://www.thecompaniesapi.com/api/export-companies-analytics Export analytics data for companies. You can choose specific attributes to export or get a full export of all analytics attributes. The endpoint returns a file download in your chosen format. ```APIDOC ## GET /v2/companies/analytics/export ### Description Export analytics data about companies in various formats. ### Method GET ### Endpoint https://api.thecompaniesapi.com/v2/companies/analytics/export ### Parameters #### Query Parameters - **actionId** (number) - Optional - The action ID to filter analytics. - **attributes** (array) - Optional - An array of analytics attributes to export. Required if full is not true. - **format** (string) - Optional - The format of the exported file (defaults to json). Possible values: csv, json, txt, xls, xml. - **full** (boolean) - Optional - Whether to export all analytics attributes. - **listId** (number) - Optional - Filter analytics to a specific list. - **query** (array) - Optional - An array of conditions to filter the companies. Make sure this parameter is stringified and encoded. - **size** (number) - Optional - The number of results to return. - **sort** (string) - Optional - The sort order of the results. Possible values: asc, desc ### Response #### Success Response (200) - **data** (object) - An array of analytics data points containing counts and percentages for each value. - **meta** (object) - Additional metadata about the results. ### Example ``` https://api.thecompaniesapi.com/v2/companies/analytics/export?query=%5B%7B%22attribute%22%3A%22about.industries%22%2C%22operator%22%3A%22or%22%2C%22sign%22%3A%22equals%22%2C%22values%22%3A%5B%22retail%22%2C%22internet%22%2C%22services%22%5D%7D%2C%7B%22attribute%22%3A%22locations.headquarters.country.code%22%2C%22operator%22%3A%22or%22%2C%22sign%22%3A%22equals%22%2C%22values%22%3A%5B%22us%22%2C%22fr%22%2C%22gb%22%5D%7D%5D&token=XXXXXX ``` ``` -------------------------------- ### Request an action for companies using JavaScript SDK Source: https://www.thecompaniesapi.com/api/request-action Use the SDK to request an action, such as enriching companies, for a list of domains. Track the triggered actions via `fetchActions`. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.requestAction({ domains: ['microsoft.com', 'apple.com'], job: 'enrich-companies', estimate: false }) const actions = response.data.actions // Track this via fetchActions const meta = response.data.meta // Meta information ``` -------------------------------- ### Create a New Company List - JavaScript SDK Source: https://www.thecompaniesapi.com/api/create-list Use the SDK to create a new list of companies. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.createList({ name: 'My SaaS List', }) const newList = response.data // The new list ``` -------------------------------- ### Authenticate with SDK (JavaScript) Source: https://www.thecompaniesapi.com/api/authentication Use the JavaScript SDK to authenticate requests by initializing the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchCompany({ domain: 'thecompaniesapi.com' }) const company = response.data // The company profile ``` -------------------------------- ### Fetch Company by Email using JavaScript SDK Source: https://www.thecompaniesapi.com/api/enrich-company-from-email Use the SDK to fetch a company profile by providing an email address. Ensure you have your API token configured. This operation consumes 1 credit per request. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchCompanyByEmail({ email: 'jack@openai.com' }) const company = response.data // The company profile ``` -------------------------------- ### Fetch Lists using JavaScript SDK Source: https://www.thecompaniesapi.com/api/fetch-lists Use this snippet to retrieve all lists associated with your account. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchLists() const lists = response.data.lists // Lists that match the query const meta = response.data.meta // Meta information ``` -------------------------------- ### Search Technologies with JavaScript SDK Source: https://www.thecompaniesapi.com/api/search-technologies Use the JavaScript SDK to search for technologies by name. Ensure you have initialized the client with your API token. The response contains the matching technologies and meta information. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchTechnologies({ search: 'shopify', size: 10 }) const technologies = response.data.technologies // Technologies that match the keyword const meta = response.data.meta // Meta information ``` -------------------------------- ### Ask Company using JavaScript SDK Source: https://www.thecompaniesapi.com/api/ask-company Use the SDK to ask questions about a company. Specify the domain, question, model, and optionally fields for structured responses. The large model offers more detailed answers. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.askCompany({ domain: 'microsoft.com', question: 'What products does this company offer?', model: 'large', // 'small' is also available fields: [ { key: 'products', type: 'array|string', description: 'The products that the company offers' } ] }) const answer = response.data.answer // Structured AI response const meta = response.data.meta // Meta information ``` -------------------------------- ### Search Companies by Industry and Size (JavaScript SDK) Source: https://www.thecompaniesapi.com/api/search-companies Use the SDK to search for companies matching specific industries and employee size. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) // Search companies by industry and size await tca.searchCompanies({ query: [ { attribute: 'about.industries', operator: 'or', sign: 'equals', values: ['computer-software'] }, { attribute: 'about.totalEmployees', operator: 'or', sign: 'equals', values: ['10-50'] } ], size: 25 }) const companies = response.data.companies // Companies that match the query const meta = response.data.meta // Meta information ``` -------------------------------- ### Fetch Company Context using SDK Source: https://www.thecompaniesapi.com/api/fetch-company-context Use the SDK to retrieve AI-generated insights about a company by providing its domain. Ensure you have your API token configured. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchCompanyContext({ domain: 'microsoft.com' }) const context = response.data.context // Includes market, model, differentiators, etc. const meta = response.data.meta // Meta information ``` -------------------------------- ### Find Similar Industries with JavaScript SDK Source: https://www.thecompaniesapi.com/api/find-similar-industries Use the JavaScript SDK to find industries similar to 'saas' and 'fintech'. Ensure you have your API token configured. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchIndustriesSimilar({ industries: ['saas', 'fintech'] }) const similar = response.data.industries // Industries that are similar to the given ones const meta = response.data.meta // Meta information ``` -------------------------------- ### Fetch Team Details using JavaScript SDK Source: https://www.thecompaniesapi.com/api/fetch-team Use the JavaScript SDK to retrieve your team's details, such as credits and subscription status. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchTeam() const team = response.data // Your team details ``` -------------------------------- ### Fetch Company Email Patterns with JavaScript SDK Source: https://www.thecompaniesapi.com/api/fetch-company-email-patterns Use the JavaScript SDK to fetch email patterns for a given company domain. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchCompanyEmailPatterns({ domain: 'apple.com' }) const patterns = response.data // The company email patterns ``` -------------------------------- ### Fetch Companies in a List (JavaScript SDK) Source: https://www.thecompaniesapi.com/api/fetch-companies-in-list Use the SDK to fetch companies from a specific list. Provide your API token and the list ID. The response contains the companies and meta information. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchCompaniesInList({ listId: 1234 }) const companies = response.data.companies // Companies that match the list const meta = response.data.meta // Meta information ``` -------------------------------- ### Count Companies with SDK Source: https://www.thecompaniesapi.com/api/count-companies Use the SDK to count companies matching specific industry criteria. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.countCompanies({ query: [ { attribute: 'about.industries', operator: 'or', sign: 'equals', values: ['computer-software'] } ] }) const count = response.data // Number of companies that match the query ``` -------------------------------- ### Create List Source: https://www.thecompaniesapi.com/api/create-list You can create lists to organize and group companies according to your needs. Lists make it easy to categorize companies and quickly retrieve them for future use. ```APIDOC ## POST https://api.thecompaniesapi.com/v2/lists ### Description Creates a new list of companies. Lists can be dynamic (updated automatically) or static. ### Method POST ### Endpoint https://api.thecompaniesapi.com/v2/lists ### Parameters #### Query Parameters - **dynamic** (boolean) - Optional - If the list is dynamic. When set to true, the list will be updated automatically when new companies are added to the database. - **name** (string) - Required - The name of the list. - **type** (string) - Required - The type of list to create. Possible values: `companies`. ### Response #### Success Response (200) - **list.analytics** (object) - The analytics of the list. - **list.createdAt** (date) - When the list was created. - **list.dynamic** (boolean) - If the list is dynamic or static. - **list.id** (number) - The id of the list. - **list.imported** (boolean) - If the list has been imported. - **list.integrations** (array) - The integrations associated with the list. - **list.name** (string) - The name of the list. - **list.processActive** (boolean) - The process active status of the list (for internal use). - **list.processInitialized** (boolean) - The process initialized flag (for internal use). - **list.processingAt** (date) - When the list is being processed. - **list.query** (array) - The query used to generate the list. #### Response Example ```json { "analytics": { ... }, "createdAt": "2022-04-01T13:07:14.000+00:00", "dynamic": false, "id": 4246, "imported": false, "integrations": [], "name": "SaaS with 100k+ MRR", "processActive": false, "processInitialized": true, "processingAt": "2022-04-01T13:07:15.000+00:00", "query": [] } ``` ``` -------------------------------- ### Search Cities using JavaScript SDK Source: https://www.thecompaniesapi.com/api/search-cities Use the SDK to search for cities by name and specify the number of results. The response contains the matching cities and meta information. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchCities({ search: 'new york', size: 5 }) const cities = response.data.cities // Cities that match the name const meta = response.data.meta // Meta information ``` -------------------------------- ### Search Industries with SDK Source: https://www.thecompaniesapi.com/api/search-industries Use the SDK to search for industries by name and specify the number of results. Ensure you replace 'YOUR_API_TOKEN' with your actual API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchIndustries({ search: 'software', size: 10 }) const industries = response.data.industries // Industries that match the keyword const meta = response.data.meta // Meta information ``` -------------------------------- ### Fetch Simplified Company Profile (Free) Source: https://www.thecompaniesapi.com/api/enrich-company-from-domain Retrieve a simplified version of the company data for free. No credits are deducted for this operation. The domain is required. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) // Example 3 : Fetch the simplified company profile (free) const response = await tca.fetchCompany({ domain: 'thecompaniesapi.com', simplified: true, }) const companySimplified = response.data ``` -------------------------------- ### Search States with JavaScript SDK Source: https://www.thecompaniesapi.com/api/search-states Use the searchStates method from the SDK to find states by name and limit the results. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.searchStates({ search: 'california', size: 5 }) const states = response.data.states // States that match the name const meta = response.data.meta // Meta information ``` -------------------------------- ### Fetch Company Profile by LinkedIn URL using JavaScript SDK Source: https://www.thecompaniesapi.com/api/enrich-company-from-social-network-url Use the SDK to fetch a company's profile by providing its LinkedIn URL. Ensure you have initialized the client with your API token. ```javascript import createClient from '@thecompaniesapi/sdk' const tca = createClient({ apiToken: 'YOUR_API_TOKEN' }) const response = await tca.fetchCompanyBySocial({ linkedin: 'https://www.linkedin.com/company/apple' }) const company = response.data // The company profile ``` -------------------------------- ### Fetch the context of a company Source: https://www.thecompaniesapi.com/ Retrieve the full textual summary or context of a company. This new feature provides a comprehensive overview of the company. ```APIDOC ## GET /companies/:domain/context ### Description Fetch the full textual summary or context of a company. This new endpoint provides a comprehensive overview, including descriptions and mission statements. ### Method GET ### Endpoint /companies/:domain/context ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name of the company to fetch the context for. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **context** (string) - The full textual summary or context of the company. #### Response Example ```json { "context": "Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services. Headquartered at the Microsoft Redmond campus located in Redmond, Washington, United States. Our mission is to empower every person and every organization on the planet to achieve more." } ``` ```