> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.jp/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get recently modified and created companies

> Returns a list of all companies sorted by the date the companies were most recently modified or created. This is particularly useful for ongoing syncs with HubSpot in which changes to companies must be captured in another system. Note: This endpoint will only return records modified or created in the last 30 days, or the 10K most recently modified and created records. If you need to get all of your companies, please use this endpoint.

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['crm.objects.companies.read', 'crm.objects.companies.write']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v2/crm-companies-v2.json GET /companies/v2/companies/recent/modified
openapi: 3.0.0
info:
  title: CRM Companies API v2
  version: 2.0.0
  description: Legacy CRM Companies API v2 - Auto-generated from MDX documentation
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /companies/v2/companies/recent/modified:
    get:
      summary: Get recently modified and created companies
      description: >-
        Returns a list of all companies sorted by the date the companies were
        most recently modified or created. This is particularly useful for
        ongoing syncs with HubSpot in which changes to companies must be
        captured in another system. Note: This endpoint will only return records
        modified or created in the last 30 days, or the 10K most recently
        modified and created records. If you need to get all of your companies,
        please use this endpoint.
      operationId: getcompaniesv2companiesrecentmodified
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            The number of records to return. Defaults to 100, has a maximum
            value of 250.
          schema:
            type: string
        - name: offset
          in: query
          required: false
          description: >-
            Used to page through the results. If there are more records in your
            portal than the `limit` parameter, you will need to use the offset
            returned in the first request to get the next set of results.
          schema:
            type: string
        - name: properties
          in: query
          required: false
          description: >-
            May be included multiple times. Used to include specific company
            properties in the results. By default, the results will only include
            the company ID, and will not include the values for any properties
            for your companies. Including this parameter will include the data
            for the specified property in the results. You can include this
            parameter multiple times to request multiple properties.Note:
            Companies that do not have a value set for a property will not
            include that property, even when you specify the property. A company
            without a value for the website property would not show the website
            property in the results, even with `&properties=website` in the URL.
          schema:
            type: string
        - name: propertiesWithHistory
          in: query
          required: false
          description: >-
            May be included multiple times. Works similarly to `properties`, but
            this parameter will include the history for the specified property,
            instead of just including the current value. Use this parameter when
            you need the full history of changes to a property's value.
          schema:
            type: string
        - name: includeMergeAudits
          in: query
          required: false
          description: >-
            Returns any merge history if a company has been previously merged
            with another company record. Defaults to false.
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example1:
                  summary: Get recently modified and created companies - Example 1
                  value:
                    - value: '0'
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: hs_analytics_num_visits
                          value: '0'
                          timestamp: 1419968066626
                          sourceVid: []
                    - value: '1419966041287'
                      timestamp: 1419966041656
                      source: null
                      sourceId: null
                      versions:
                        - name: first_deal_created_date
                          value: '1419966041287'
                          timestamp: 1419966041656
                          sourceVid: []
                    - value: '1419968097561'
                      timestamp: 1419968097561
                      source: null
                      sourceId: null
                      versions:
                        - name: hs_lastmodifieddate
                          value: '1419968097561'
                          timestamp: 1419968097561
                          sourceVid: []
                    - value: '1415689200000'
                      timestamp: 1419966061962
                      source: null
                      sourceId: null
                      versions:
                        - name: recent_deal_close_date
                          value: '1415689200000'
                          timestamp: 1419966061962
                          sourceVid: []
                    - value: '5000'
                      timestamp: 1419966061962
                      source: null
                      sourceId: null
                      versions:
                        - name: recent_deal_amount
                          value: '5000'
                          timestamp: 1419966061962
                          sourceVid: []
                    - value: '1415682000000'
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: closedate
                          value: '1415682000000'
                          timestamp: 1419968066626
                          sourceVid: []
                    - value: '1419966010576'
                      timestamp: 1419966010576
                      source: null
                      sourceId: null
                      versions:
                        - name: createdate
                          value: '1419966010576'
                          timestamp: 1419966010576
                          sourceVid: []
                    - value: '1419966010576'
                      timestamp: 1419966010576
                      source: null
                      sourceId: null
                      versions:
                        - name: hubspot_owner_assigneddate
                          value: '1419966010576'
                          timestamp: 1419966010576
                          sourceVid: []
                    - value: '1419965931323'
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: first_contact_createdate
                          value: '1419965931323'
                          timestamp: 1419968066626
                          sourceVid: []
                    - value: customer
                      timestamp: 1419966061791
                      source: null
                      sourceId: null
                      versions:
                        - name: lifecyclestage
                          value: customer
                          timestamp: 1419966061791
                          sourceVid: []
                    - value: '5000'
                      timestamp: 1419966061962
                      source: null
                      sourceId: null
                      versions:
                        - name: total_revenue
                          value: '5000'
                          timestamp: 1419966061962
                          sourceVid: []
                    - value: OFFLINE
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: hs_analytics_source
                          value: OFFLINE
                          timestamp: 1419968066626
                          sourceVid: []
                    - value: '0'
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: hs_analytics_num_page_views
                          value: '0'
                          timestamp: 1419968066626
                          sourceVid: []
                    - value: '1419965931323'
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: hs_analytics_first_timestamp
                          value: '1419965931323'
                          timestamp: 1419968066626
                          sourceVid: []
                    - value: madison Inc
                      timestamp: 1419966010576
                      source: null
                      sourceId: null
                      versions:
                        - name: name
                          value: madison Inc
                          timestamp: 1419966010576
                          sourceVid: []
                    - value: '1'
                      timestamp: 1419966011133
                      source: null
                      sourceId: null
                      versions:
                        - name: num_associated_contacts
                          value: '1'
                          timestamp: 1419966011133
                          sourceVid: []
                    - value: '70'
                      timestamp: 1419966010576
                      source: null
                      sourceId: null
                      versions:
                        - name: hubspot_owner_id
                          value: '70'
                          timestamp: 1419966010576
                          sourceVid: []
                    - value: '1'
                      timestamp: 1419966041656
                      source: null
                      sourceId: null
                      versions:
                        - name: num_associated_deals
                          value: '1'
                          timestamp: 1419966041656
                          sourceVid: []
                    - value: ''
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: hs_analytics_source_data_2
                          value: ''
                          timestamp: 1419968066626
                          sourceVid: []
                    - value: API
                      timestamp: 1419968066626
                      source: null
                      sourceId: null
                      versions:
                        - name: hs_analytics_source_data_1
                          value: API
                          timestamp: 1419968066626
                          sourceVid: []

````