Skip to main content

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:

ParameterTypeRequiredDescriptionExample
company_namestringOptional*Name of the company"example"
company_usernamestringOptional*LinkedIn company username (found in company URL after /company/)"example"
company_websitestringOptional*Official website URL of the company"https://www.example.com"
webhook_urlstringNoYour 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, or company_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)

  1. 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"}'
  1. 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.