Leads

Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.

get/leads/search

Request

  • Base URL
    https://api.pipedrive.com/v1
  • Auth
    • API key in header x-api-token
    • or OAuth 2
      Authorization code: https://oauth.pipedrive.com/oauth/authorize
      Token URL: https://oauth.pipedrive.com/oauth/token scopes: leads:read, leads:full, search:read

Query parameters

termstring required

The search term to look for. Minimum 2 characters (or 1 if using exact_match). Please note that the search term has to be URL encoded.

fieldsstring[]

A comma-separated string array. The fields to perform the search from. Defaults to all of them.

exact_matchboolean

When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.

person_idinteger

Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.

organization_idinteger

Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.

include_fieldsstring[]

Supports including optional fields in the results which are not provided by default

startinteger

Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter.

limitinteger

Items shown per page

Response

Success

successboolean

If the response is successful or not

Changes

    • breaking

      removed the enum value custom_fields from the query request parameter fields

    • breaking

      removed the enum value lead.was_seen from the query request parameter include_fields

    • breaking

      removed the enum value notes from the query request parameter fields

    • breaking

      removed the enum value title from the query request parameter fields

    • breaking

      for the query request parameter fields, the type changed from string to array

    • breaking

      for the query request parameter include_fields, the type changed from string to array

    • breaking

      removed the enum value false from the query request parameter exact_match

    • breaking

      removed the enum value true from the query request parameter exact_match