💼

companies

Comprehensive business entity information including corporate details, financial metrics, organizational structure, and contact information. Used for company profiles, directories, and business intelligence.

🎯 Request Builder

https://api.mockly.codes/companies?page=1&limit=10&count=10
📡

Configure your request and click Send Request to see the response here.

Endpoints

GET/companies

Get a collection of companies

Alternative: /business/companies
GET/companies/:id

Get a single company by ID

Alternative: /business/companies/:id
GET/companies/meta

Get resource metadata and schema

Alternative: /business/companies/meta
🔍

How to Use Search

The search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.

1. Basic Search

Search across all text fields:

Basic Search
GET https://api.mockly.codes/companies?q=laptop

2. Search Specific Fields

Field-Specific Search
GET https://api.mockly.codes/companies?q=laptop&search_fields=name,description

💡 Pro Tips

  • Search is case-insensitive and performs partial matching
  • Without search_fields, all text fields are searched
  • Combine with pagination to handle large result sets efficiently

Code Examples

JavaScript

Fetch Collection
// Get 10 companies
fetch('https://api.mockly.codes/companies?count=10')
  .then(res => res.json())
  .then(data => console.log(data));

Python

Fetch with Requests
import requests

response = requests.get(
    'https://api.mockly.codes/companies?count=10'
)
data = response.json()

cURL

Command Line
curl "https://api.mockly.codes/companies?count=10"

Bypass Cache

Get Fresh Data
fetch('https://api.mockly.codes/companies?nocache=true')

Schema Properties

idinteger

Unique identifier for the company record

Gen:random_int
namestring

Official legal name of the company

Gen:company
sloganstring

Company tagline or marketing slogan that represents the brand

Gen:catch_phrase
descriptionstring

Detailed description of the company's business, mission, products, and services

Gen:paragraph
industrystring

Primary industry sector the company operates in (e.g., Software, Manufacturing, Retail)

Gen:industry
sizestring

Company size classification based on employee count (e.g., startup, small, medium, large, enterprise)

Gen:company_size
founded_yearinteger

Year the company was established or incorporated

Gen:founded_year
headquartersstring

City where the company's main headquarters or corporate office is located

Gen:city
countrystring

Country where the company is headquartered or primarily operates

Gen:country
websitestring

Official company website URL

Gen:urluri
emailstring

Primary corporate email address for general inquiries

Gen:emailemail
phonestring

Main corporate phone number for business inquiries

Gen:phone
revenuenumber

Annual revenue or total sales figure, typically in the company's primary currency

Gen:revenue
employeesinteger

Total number of employees working for the company worldwide

Gen:employees
logostring

URL to the company's official logo image

Gen:image_urluri

Query Parameters

countinteger

Number of items to return (default: 10, max: 100)

seedinteger

Seed for reproducible data generation

nocacheboolean

Bypass cache and generate fresh data on every request