APIs & Integrations

trong
Member

Search for companies by name

SOLVE

Hi all,

Is it possible to find companies by name instead of by domain or ID? It doesn’t appear to be in the API docs.

Thanks!

2 Accepted solutions
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Search for companies by name

SOLVE

Hello, all.

Welcome, @dallashuggins!

While @pmanca and I can and have passed this feedback along internally, the HubSpot Community Ideas Forum is the best place to share feature requests. Our product managers regularly review top voted/commented ideas and try to prioritize ideas which have the most engagement from and greatest potential impact on users.

I previously found this idea, but my upvote in October was the first. If you would like such an API endpoint added, please upvote and comment on the post with your use cases.

I recommend including as much detail as possible per these best practices. The more the product teams understand a feature's use case, the more accurate they will be when scoping the feature.

While there has been quite a bit of engagement on this thread, I don't think the feedback has been as visible to the decision makers on the CRM team as it could have been. That's on us for not moving the discussion over to the Ideas Forum sooner.

Thank you for your understanding. I will close this topic to maximize feedback on this idea.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
DevaVishnu
Solution
Member | Platinum Partner
Member | Platinum Partner

Search for companies by name

SOLVE

lmfao all these replies but nobody posted a solution
Here you go


        $json = [
            "filterGroups" => [
                [
                    "filters" => [
                        [
                            "operator" => "EQ",
                            "propertyName" => "name",
                            "value" => "VishCompany5"
                        ]
                    ]
                ]
            ]
        ];

        $response = $this->client->post(
            "https://api.hubapi.com/crm/v3/objects/companies/search",
            ["body" => json_encode($json)]
        );
        
        $results = json_decode($response->getBody(), true);

        dd($results);

//output
array:2 [▼
  "total" => 1
  "results" => array:1 [▼
    0 => array:5 [▼
      "id" => "10515190283"
      "properties" => array:5 [▶]
      "createdAt" => "2023-01-02T07:19:39.513Z"
      "updatedAt" => "2023-01-02T07:19:52.085Z"
      "archived" => false
    ]
  ]

View solution in original post

27 Replies 27
Not applicable

Search for companies by name

SOLVE

This is something we require too. Without the ability to search for a company by name, our integration with this product is going to be limited. For now, we will have to implement the get-all-companies call and iterate through all pages in the result, however, this does seem like a primitive way of doing things.

Can you confirm if this is something you will work on, please?

Thanks

0 Upvotes
gdsilva
Member

Search for companies by name

SOLVE

Is there a plan to implement this?

0 Upvotes
hughstephens
Member

Search for companies by name

SOLVE

@pmanca is there any update on this? it’s a pretty obvious use case (search companies by string) so it is quite strange that it is not in the API.

If my use case for an integration is for someone to find the relevant company (and then get contacts and deals), how do you recommend this is done?

3PETE
HubSpot Employee
HubSpot Employee

Search for companies by name

SOLVE

@hughstephens The API endpoint you are looking for still does not exist. You would need to pull back all of the companies and store their names in memory for you to then index into on your server.

You can always add your ideas for product improvements to the idea board for our product team to review.

http://ideas.hubspot.com/

0 Upvotes
hughstephens
Member

Search for companies by name

SOLVE

@pmanca surely you can understand that that’s actually a pretty bats**t crazy way of doing it? If I was going to sync the entire companies DB, I may as well build our own system from scratch.

Why can’t HubSpot simply allow use of the existing endpoint available in the web UI to developers when there is a use case that necessitates it? Without that, HubSpot’s utility to our business is severely decreased to be frank.

3PETE
HubSpot Employee
HubSpot Employee

Search for companies by name

SOLVE

@hughstephens My apologies if you don’t find our APIs as extensive as you need them to be at this time. I have passed along your idea internally as it is one that comes up from time to time. At the moment there isn’t a publicly available endpoint to search for companies.

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Search for companies by name

SOLVE

@trong At the moment we do not have an endpoint for that.

0 Upvotes