Company Data Request Parameters
Endpoint
https://gw.magicalapi.com/company-data
The Company Data service requires one of the following parameters in the request body:
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| company_name | string | Optional* | Name of the company | "example" |
| company_username | string | Optional* | LinkedIn company username (found in company URL after /company/) | "example" |
| company_website | string | Optional* | Official website URL of the company | "https://www.example.com" |
| webhook_url | string | No | Your webhook endpoint URL to receive results automatically. Must be from a whitelisted domain. See Webhook Guide | "https://yourdomain.com/webhook" |
Sample Request Bodies
Using Request ID (Polling)
Using company name:
{
"company_name": "example"
}
Using LinkedIn username:
{
"company_username": "example"
}
Using company website:
{
"company_website": "https://www.example.com"
}
Using Webhook
With company name:
{
"company_name": "example",
"webhook_url": "https://yourdomain.com/api/webhook"
}
With LinkedIn username:
{
"company_username": "example",
"webhook_url": "https://yourdomain.com/api/webhook"
}
tip
Important notes:
- You must provide at least one of:
company_name,company_username, orcompany_website - When using
company_username, use the exact username from the LinkedIn URL - For webhooks, ensure your domain is whttitelisted in the MagicalAPI Dashboard
Example Workflows
Using Request ID (Polling)
- Send Initial Request
curl -X POST "https://gw.magicalapi.com/company-data" \
-H "Content-Type: application/json" \
-H "api-key: YOUR-API-KEY" \
-d '{"company_name": "example"}'
- Check Status (using the same endpoint)
curl -X POST "https://gw.magicalapi.com/company-data" \
-H "Content-Type: application/json" \
-H "api-key: YOUR-API-KEY" \
-d '{"request_id": "abc123xyz"}'
Using Webhook
Send a single request and receive results automatically:
curl -X POST "https://gw.magicalapi.com/company-data" \
-H "Content-Type: application/json" \
-H "api-key: YOUR-API-KEY" \
-d '{
"company_name": "example",
"webhook_url": "https://yourdomain.com/api/webhook"
}'
Results will be automatically delivered to your webhook endpoint when processing is complete. Learn more about setting up webhooks.