# Search Company

{% tabs %}
{% tab title="Curl" %}

```bash
cURL 'https://api.enrich.so/v1/api/search-company' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Example Company",
  "website": "https://example.com",
  "tagline": "Innovation at its best",
  "type": "Private",
  "postal_code": "123456",
  "description": "A leading company in technology",
  "industries": ["Technology", "Software"],
  "location_country": "United States",
  "location_city": "San Francisco",
  "specialities": ["AI", "Cloud Computing"],
  "followers": 5000,
  "staff_count": 200,
  "page_size": 10,
  "current_page": 1
}'
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const axios = require('axios');

axios.post('https://api.enrich.so/v1/api/search-company', 
  {
    name: "Example Company",
    website: "https://example.com",
    tagline: "Innovation at its best",
    type: "Private",
    postal_code: "123456",
    description: "A leading company in technology",
    industries: ["Technology", "Software"],
    location_country: "United States",
    location_city: "San Francisco",
    specialities: ["AI", "Cloud Computing"],
    followers: 5000,
    staff_count: 200,
    page_size: 10,
    current_page: 1
  }, 
  {
    headers: {
      accept: 'application/json',
      Authorization: 'Bearer <token>',
      'Content-Type': 'application/json'
    }
  })
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.log(error.response ? error.response.data : error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = 'https://api.enrich.so/v1/api/search-company'
payload = {
    'name': 'Example Company',
    'website': 'https://example.com',
    'tagline': 'Innovation at its best',
    'type': 'Private',
    'postal_code': '123456',
    'description': 'A leading company in technology',
    'industries': ['Technology', 'Software'],
    'location_country': 'United States',
    'location_city': 'San Francisco',
    'specialities': ['AI', 'Cloud Computing'],
    'followers': 5000,
    'staff_count': 200,
    'page_size': 10,
    'current_page': 1
}
headers = {
    'accept': 'application/json',
    'authorization': 'Bearer <token>',
    'Content-Type': 'application/json'
}

resp = requests.post(url, json=payload, headers=headers)

print(resp.text)

```

{% endtab %}

{% tab title="Java" %}

```java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n" +
    "  \"name\": \"Example Company\",\n" +
    "  \"website\": \"https://example.com\",\n" +
    "  \"tagline\": \"Innovation at its best\",\n" +
    "  \"type\": \"Private\",\n" +
    "  \"postal_code\": \"123456\",\n" +
    "  \"description\": \"A leading company in technology\",\n" +
    "  \"industries\": [\"Technology\", \"Software\"],\n" +
    "  \"location_country\": \"United States\",\n" +
    "  \"location_city\": \"San Francisco\",\n" +
    "  \"specialities\": [\"AI\", \"Cloud Computing\"],\n" +
    "  \"followers\": 5000,\n" +
    "  \"staff_count\": 200,\n" +
    "  \"page_size\": 10,\n" +
    "  \"current_page\": 1\n" +
    "}");

Request request = new Request.Builder()
    .url("https://api.enrich.so/v1/api/search-company")
    .post(body)
    .addHeader("accept", "application/json")
    .addHeader("authorization", "Bearer <token>")
    .addHeader("Content-Type", "application/json")
    .build();

Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'uri'
require 'net/http'
require 'json'

url = URI("https://api.enrich.so/v1/api/search-company")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'

payload = {
  name: "Example Company",
  website: "https://example.com",
  tagline: "Innovation at its best",
  type: "Private",
  postal_code: "123456",
  description: "A leading company in technology",
  industries: ["Technology", "Software"],
  location_country: "United States",
  location_city: "San Francisco",
  specialities: ["AI", "Cloud Computing"],
  followers: 5000,
  staff_count: 200,
  page_size: 10,
  current_page: 1
}.to_json

request.body = payload

response = http.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="Php" %}

```php
<?php

$curl = curl_init();

$data = [
    "name" => "Example Company",
    "website" => "https://example.com",
    "tagline" => "Innovation at its best",
    "type" => "Private",
    "postal_code" => "123456",
    "description" => "A leading company in technology",
    "industries" => ["Technology", "Software"],
    "location_country" => "United States",
    "location_city" => "San Francisco",
    "specialities" => ["AI", "Cloud Computing"],
    "followers" => 5000,
    "staff_count" => 200,
    "page_size" => 10,
    "current_page" => 1
];

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.enrich.so/v1/api/search-company",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode($data),
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "authorization: Bearer <token>",
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}

1. staff\_count / staff\_count\_max will return team with size 0 to staff count provided.
2. staff\_count\_min will return with size greater than staff count min provided
3. staff\_count\_min and staff\_count\_max can be used for providing range.&#x20;

staff\_count will be prioritized over staff\_count\_min and staff\_count\_max.&#x20;
{% endhint %}

{% hint style="info" %}
&#x20;Use `location_country_list` or `location_city_list` to retrieve results based on multiple countries or cities, respectively.&#x20;

Please note that `location_country` and `location_city` will take priority over `location_country_list` and `location_city_list`, respectively.
{% endhint %}

## Example response

#### Status Code: <mark style="color:green;">200 OK</mark>

```json
{
    "success": true,
    "message": "Companies record found.",
    "data": {
        "current_page": 1,
        "total_page": 1,
        "page_size": 20,
        "companies": [
            {
                "company_name": "Maximise.ai",
                "tagline": "Identify anonymous visitors on your site. Automate personalized outreach via email, LinkedIn, and Phone calls.",
                "web_address": "maximise.ai",
                "zip_code": "",
                "city": "",
                "country": "",
                "geo_region": "",
                "industries": [
                    "Software Development"
                ],
                "expertise": [
                    "lead generation",
                    "website visitor identification",
                    "B2B Lead generation"
                ],
                "type": "Partnership",
                "profile_id": "104336610",
                "icon_url": "https://media.licdn.com/dms/image/v2/D4D0BAQH5LqFS9E_WmA/company-logo_400_400/company-logo_400_400/0/1722246140478/maximise_ai_logo?e=1732147200&v=beta&t=Z35YqQF-FORpOte1CQVVtPSEviGpoH7wuBnvXPdSQws",
                "summary": "Identify individuals and companies visiting your site. Automate personalized outreach via email, LinkedIn, and Phone calls. Immediate ROI Guaranteed.",
                "supporters": 5,
                "team_size": 0,
                "linkedin_profile": "https://www.linkedin.com/company/104336610/"
            }
        ]
    },
    "total_credits": 100000,
    "credits_used": 3174.05,
    "credits_remaining": 96825.95
}
```

#### Status code: <mark style="color:red;">404 NOT FOUND</mark>

```json
{
    "message": "We couldn't find results for this query"
}
```
