Answers.Body: <p>You can use <code>modified_date</code> in <code>Contact.get</code> eg:</p>
  
  <p>Return the date:</p>
  
  <pre><code>$result = civicrm_api3('Contact', 'get', array(
    'sequential' =&gt; 1,
    'return' =&gt; array("modified_date"),
  ));
  </code></pre>
  
  <p>Search for Contacts modified after a date:</p>
  
  <pre><code>$result = civicrm_api3('Contact', 'get', array(
    'sequential' =&gt; 1,
    'modified_date' =&gt; array('&gt;' =&gt; "2017-04-12"),
  ));
  </code></pre>
  
  <p>The API explorer is useful for exploring things like this.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-13T13:46:04.410Z
Answers.Text: 'The API explorer is useful for exploring things like this.' +1
Answers.UserDisplayName: michaelmcandrew
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-12T13:35:00.137Z
Answers.LastActivityDate: 2017-04-12T13:35:00.137Z
Answers.UserDisplayName: Aidan
Body: <p>I basically have the same questions as described in these topics <a href="https://forum.civicrm.org/index.php?topic=22774.0" rel="nofollow noreferrer">https://forum.civicrm.org/index.php?topic=22774.0</a>
  <a href="https://forum.civicrm.org/index.php?topic=24121.0" rel="nofollow noreferrer">https://forum.civicrm.org/index.php?topic=24121.0</a></p>
  
  <p>I would like to know which parameter to use in an api call url to get the last modified date in the list of returned fields </p>
  
  <p>and</p>
  
  <p>which parameter to add to an api call url so that it only returns the contacts that where created/modified since a specific date (or if this isn't possible: the parameter for all contacts created since a specific date, and the parameter to get all contacts modified since a specific date).</p>
  
  <p>Thanks!</p>
  
Tags: <api>
Title: Using API to retrieve contact records by modified date
ThreadText: # Using API to retrieve contact records by modified date
  
  (Asked by: username_0 on 2017-04-12)
  
  I basically have the same questions as described in these topics <https://forum.civicrm.org/index.php?topic=22774.0>
  <https://forum.civicrm.org/index.php?topic=24121.0>
  
  I would like to know which parameter to use in an api call url to get the last modified date in the list of returned fields
  
  and
  
  which parameter to add to an api call url so that it only returns the contacts that where created/modified since a specific date (or if this isn't possible: the parameter for all contacts created since a specific date, and the parameter to get all contacts modified since a specific date).
  
  Thanks!
  
  **Tags:** api
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-04-12. Score: 3
  
  You can use modified_date in Contact.get eg:
  Return the date:
  $result = civicrm_api3('Contact', 'get', array(
    'sequential' => 1,
    'return' => array("modified_date"),
  ));
  
  Search for Contacts modified after a date:
  $result = civicrm_api3('Contact', 'get', array(
    'sequential' => 1,
    'modified_date' => array('>' => "2017-04-12"),
  ));
  
  The API explorer is useful for exploring things like this.
  
  > **Comments:**
  > **username_2**: 'The API explorer is useful for exploring things like this.' +1  
  
  ---
  
  