-
Notifications
You must be signed in to change notification settings - Fork 2
CompanySearch
Alireza Kamali edited this page Jun 26, 2025
·
2 revisions
The CompanySearch class provides functionality to search for production companies and studios on IMDb, returning detailed information about each matching company.
Searches for production companies, studios, and other entertainment industry companies on IMDb. Returns comprehensive company data including ranking information, country of origin, and company types.
public function search(string $company, int $limit = 50): array| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
| company | string | YES | Company name to search for | |
| limit | int | 50 | NO | Maximum number of results to return |
$companySearch = new \Hooshid\ImdbScraper\CompanySearch();
$warnerResults = $companySearch->search("warner brothers");
$disneyResults = $companySearch->search("disney", 20);| Key | Type | Description |
|---|---|---|
| id | string | IMDb company ID |
| name | string | Official company name |
| rank | array | Ranking information with sub-fields |
| rank.current_rank | int|null | Current rank position |
| rank.change_direction | string|null | Direction of rank change (UP/DOWN) |
| rank.difference | int|null | Amount of rank change |
| country | string|null | Country of origin |
| types | string[] | Array of company types |
[
{
"id": "co0185428",
"name": "Warner Brothers Entertainment",
"rank": {
"current_rank": 1660,
"change_direction": "UP",
"difference": 1884
},
"country": "United States",
"types": [
"Production",
"Distributor",
"Special Effects"
]
}
]- Returns empty array when:
- Search term is empty after trimming
- No matching companies found
- API returns invalid data structure
- Throws Exception on:
- API request failures
- Network connectivity issues
- Search is case-insensitive
- Results include both active and inactive companies
- Some fields may be null if data is unavailable
- Company types vary and may include multiple categories
- Rank information is only available for some companies