Skip to main content
Answered

How to filter company api


I’d like to retrieve changes or additions to the company data from yesterday or last month in batch.

Since I have not seen a way of filtering the api query to companies I wonder how to best achieve this. From what I see I have to use the “Scroll over all companies” or “List all companies” API retrieving all Companies and filter the result according my needs.

Any other suggestions are very well appreciated, thanks.

Best answer by Jacob Cox

Hi @pheld2000 !

You are correct that there isn’t currently a search call for the /companies endpoint. You’ll need to retrieve a list of all of your companies and then filter them based on the updated_at attribute on your end. It would be great to have this search ability built into the API itself. I’ll flag this as a Feature Request with our team! Thanks for reaching out!

View original
Did this topic help you find an answer to your question?

2 replies

Jacob Cox
Intercom Team
Forum|alt.badge.img+5
  • Sr. Technical Support Engineer
  • 441 replies
  • Answer
  • October 31, 2023

Hi @pheld2000 !

You are correct that there isn’t currently a search call for the /companies endpoint. You’ll need to retrieve a list of all of your companies and then filter them based on the updated_at attribute on your end. It would be great to have this search ability built into the API itself. I’ll flag this as a Feature Request with our team! Thanks for reaching out!


Forum|alt.badge.img

If the API you're working with does not have direct query filters for changes or additions by date, you're correct that you'll need to use an approach like “Scroll over all companies” or “List all companies.” Once you have the full list, you can filter the results programmatically by comparing the date of each company’s data (e.g., last modified date) against the specific time range you're interested in (yesterday or last month).

Another option is to explore whether your data provider offers an incremental update feature, which can allow you to fetch only the changes since your last request. For example, Global Database offers various ways to query and download business data api, and they might have built-in support for retrieving data updated within a specific timeframe. If they support it, setting up a system to automatically pull data based on the “updated” timestamp could be a more efficient solution than retrieving all data and filtering it afterward.

If you’re still looking for ways to optimize this process, I suggest reviewing the API documentation for any possible parameters or endpoints specific to data updates or incremental batches.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings