> ## 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.

# Search for contacts by email, name, phone number, or company

> The _search contacts_ endpoint is used to search for contacts by email, name, phone number, or company. This endpoint returns search results in a paginated format and accepts a query string to search across contact properties.

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.contacts.read', 'content', 'crm.objects.contacts.write']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v1/crm-contacts-v1.json GET /contacts/v1/search/query
openapi: 3.0.0
info:
  title: CRM Contacts API v1
  version: 1.0.0
  description: Use the contact lists API to create and manage contact lists.
  x-hubspot-introduction: Use the contact lists API to create and manage contact lists.
  x-hubspot-api-use-case: >-
    Retrieve a contact list by ID to bring that contact data into your external
    system.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /contacts/v1/search/query:
    get:
      summary: Search for contacts by email, name, phone number, or company
      description: >-
        The _search contacts_ endpoint is used to search for contacts by email,
        name, phone number, or company. This endpoint returns search results in
        a paginated format and accepts a query string to search across contact
        properties.
      operationId: getcontactsv1searchquery
      parameters:
        - name: q
          in: query
          required: true
          description: >-
            The search term for what you're searching for. You can use all of a
            word or just parts of a word as well. For example, if you were
            searching for contacts with "hubspot" in their name or email,
            searching for "hub" would also return contacts with "hubspot" in
            their email address.
          schema:
            type: string
        - name: count
          in: query
          required: false
          description: >-
            This parameter lets you specify the amount of contacts to return in
            your API call. The default for this parameter (if it isn't
            specified) is 20 contacts. The maximum amount of contacts you can
            have returned to you via this parameter is 100.
          schema:
            type: string
        - name: offset
          in: query
          required: false
          description: >-
            This parameter is used to page through the results. Every call to
            this endpoint will return an offset value. This value is used in the
            offset= parameter of the next call to get the next page of contacts.
          schema:
            type: string
        - name: property
          in: query
          required: false
          description: >-
            If you include the "property" parameter, then the properties in the
            "contact" object in the returned data will only include the property
            or properties that you request.
          schema:
            type: string
        - name: sort
          in: query
          required: false
          description: >-
            This parameter takes in an internal property name (e.g. vid) and
            sorts contact search results by that field.
          schema:
            type: string
        - name: order
          in: query
          required: false
          description: >-
            This parameter accepts `DESC` or `ASC` as values (defaults to
            `DESC`) to order results by the property specified in "sort"
            parameter. As such, this parameter will only work when used in
            conjunction with "sort".
          schema:
            type: string
      responses:
        '200':
          description: Successful response - Search results for contacts matching the query
          content:
            application/json:
              schema:
                type: object
              examples:
                example1:
                  summary: >-
                    Search for contacts by email, name, phone number, or company
                    - Example 1
                  value: >-
                    { "query": "testingapis", "offset": 1, "has-more": false,
                    "total": 1, "contacts": [ { "vid": 3234574, "canonical-vid":
                    3234574, "merged-vids": [ ], "portal-id": 62515,
                    "is-contact": true, "properties": { "hs_analytics_last_url":
                    { "value": "" }, "lead_source": { "value": "DiscoverOrg" },
                    "num_unique_conversion_events": { "value": "0" },
                    "hs_analytics_revenue": { "value": "0.0" }, "createdate": {
                    "value": "1484026585538" }, "hs_analytics_first_referrer": {
                    "value": "" }, "hs_email_optout": { "value": "true" },
                    "hs_predictivecontactscore": { "value": "50" },
                    "annualrevenue": { "value": "181900000" },
                    "hs_analytics_num_page_views": { "value": "0" }, "state": {
                    "value": "MA" }, "zip": { "value": "02139" },
                    "fortune_rank": { "value": "" },
                    "hs_predictivecontactscorebucket": { "value": "bucket_3" },
                    "hubspotscore": { "value": "0" }, "linkedinconnections": {
                    "value": "0" }, "hs_lifecyclestage_subscriber_date": {
                    "value": "1484026585538" },
                    "hs_analytics_average_page_views": { "value": "0" },
                    "lastname": { "value": "Test" }, "twitterhandle": { "value":
                    "ghidinelli" }, "phone": { "value": "555-122-2323" },
                    "num_conversion_events": { "value": "0" },
                    "currentlyinworkflow": { "value": "false" },
                    "hs_analytics_num_event_completions": { "value": "2" },
                    "followercount": { "value": "582" }, "hs_email_optout_2849":
                    { "value": "" }, "associatedcompanyid": { "value":
                    "184896670" }, "firstname": { "value": "HubSpot" }, "city":
                    { "value": "Cambridge" }, "hs_email_optout_354586": {
                    "value": "" }, "hs_social_num_broadcast_clicks": { "value":
                    "0" }, "hs_analytics_last_timestamp": { "value": "" },
                    "hs_analytics_num_visits": { "value": "0" }, "twitterbio": {
                    "value": "Racer, entrepreneur, world traveler. Crossfitter,
                    foodie, kitesurfing newbie. If racing is life, I'm building
                    a lifestyle business @MotorsportReg @RaceHeroApp" },
                    "hs_social_linkedin_clicks": { "value": "0" },
                    "hs_analytics_last_visit_timestamp": { "value": "" },
                    "hs_social_last_engagement": { "value": "" },
                    "hs_twitterid": { "value": "49019793" },
                    "associatedcompanylastupdated": { "value":
                    "13365279006997343" }, "hs_analytics_source": { "value":
                    "OFFLINE" }, "company": { "value": "HubSpot" }, "email": {
                    "value": "testingapis@hubspot.com" }, "linkedinbio": {
                    "value": "Racecar driver, entrepreneur, world traveler" },
                    "hs_analytics_first_url": { "value": " }, "website": {
                    "value": " }, "address": { "value": "25 First Street" },
                    "hs_analytics_first_visit_timestamp": { "value": "" },
                    "hs_analytics_first_timestamp": { "value": "1484026585538"
                    }, "lastmodifieddate": { "value": "1484859513090" },
                    "photo": { "value": " }, "hs_social_google_plus_clicks": {
                    "value": "0" }, "hs_analytics_last_referrer": { "value": ""
                    }, "kloutscoregeneral": { "value": "48" },
                    "hs_email_optout_230318": { "value": "" },
                    "hs_social_facebook_clicks": { "value": "0" },
                    "twitterprofilephoto": { "value": " },
                    "hs_analytics_source_data_2": { "value": "" },
                    "hs_social_twitter_clicks": { "value": "0" },
                    "hs_analytics_source_data_1": { "value": "API" },
                    "lifecyclestage": { "value": "subscriber" },
                    "hs_email_sends_since_last_engagement": { "value": "0" } },
                    "form-submissions": [ ], "identity-profiles": [ { "vid":
                    3234574, "saved-at-timestamp": 0,
                    "deleted-changed-timestamp": 0, "identities": [ { "type":
                    "EMAIL", "value": "testingapis@hubspot.com", "timestamp":
                    1484026585538 }, { "type": "LEAD_GUID", "value":
                    "4b11f8af-50d9-4665-9c43-bb2fc46e3a80", "timestamp":
                    1484026585610 } ] } ], "merge-audits": [ ] } ] }
      security:
        - oauth2:
            - crm.objects.contacts.read
        - oauth2_legacy: []
        - private_apps:
            - crm.objects.contacts.read
        - private_apps_legacy: []
components: {}

````