# Only pulling recent entries from API

**URL:** <https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451>\
**Category:** Ask a question\
**Tags:** Using-APIs\
**Created:** [January 8, 2021, 6:03am UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451 "2021-01-08T06:03:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@Jacob](https://community.parabola.io/u/Jacob)\
**Post date:** [January 8, 2021, 6:03am UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/1 "2021-01-08T06:03:05Z")

</div>

I’m trying to use the “Pull from an API” action, and I’m successfully getting results, which I can filter for those created after a certain timeframe:  
e.g.  
[https://myactivecampaigndomain.api-us1.com/api/3/contacts?filters[created\_after]=2021-01-01](https://myactivecampaigndomain.api-us1.com/api/3/contacts?filters%5Bcreated_after%5D=2021-01-01)

Is there any way that each time the request runs, it pulls in data from the last 7 days - i.e. can the “created\_after” filter be dynamic?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/daniel/32/732_2.png) [@daniel](https://community.parabola.io/u/daniel)\
**Post date:** [January 8, 2021, 6:30pm UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/2 "2021-01-08T18:30:14Z")

</div>

Hey Jacob 👋

Good question! Try using the [Start with date & time row](https://parabola.io/integration/date-and-time#start-with-date-time-row) step to add the current date and time to your flow. You’ll want to set the `Day's Offset` value to `-7`.

To format your dates in a `YYYY-MM-DD` format, use the [Format dates](https://parabola.io/transform/format-dates) step and target your `Current DateTime` column.

You should now be able to pass the dynamic value in that column to an endpoint using the [Enrich with an API](https://parabola.io/transform/enrich-with-an-api) step. Just wrap your column in curly brackets. Your endpoint might look like this:

`https://myactivecampaigndomain.api-us1.com/api/3/contacts?filters[created_after]={current DateTime}`

---

<div class="post-metadata">

**Author:** ![Jacob](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@Jacob](https://community.parabola.io/u/Jacob)\
**Post date:** [January 10, 2021, 1:20am UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/3 "2021-01-10T01:20:30Z")

</div>

Hi @daniel amazing, I’m almost there, but I tried what you mentioned and I’m getting caught up with the following error

 ![image](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/a/a07a45e045d8c1dc98169a6325bf9396f2ec46a2.png)

Here’s the input tab of that window:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/d/de14eca3002599b5dc3bc3e9059a79509f5837c4.png)

---

<div class="post-metadata">

**Author:** ![andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/andrew/32/36_2.png) [@andrew](https://community.parabola.io/u/andrew)\
**Post date:** [January 11, 2021, 5:23am UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/4 "2021-01-11T05:23:54Z")

</div>

Hey @Jacob –glad you’re getting close here 🙂 It looks like there’s a `+` in the API Endpoint URL with `{Current+DateTime}`. Can you try removing that `+` and see if it works?

---

<div class="post-metadata">

**Author:** ![Jacob](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@Jacob](https://community.parabola.io/u/Jacob)\
**Post date:** [January 11, 2021, 5:47am UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/5 "2021-01-11T05:47:52Z")

</div>

Hi @andrew  
The + was automatically added to the URL by Parabola when I entered the URL parameters.  
Now that I’ve deleted the + and replaced it with a space, it looks like it’s working now 🙂 thank you!

---

<div class="post-metadata">

**Author:** ![Jacob](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@Jacob](https://community.parabola.io/u/Jacob)\
**Post date:** [January 11, 2021, 6:06am UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/6 "2021-01-11T06:06:04Z")

</div>

@andrew hmm except every time I go to modify any part of this step, the + gets added back in there, so I have to keep taking it out.  
I’m concerned if I let this run itself, it may also revert to the + and error.

---

<div class="post-metadata">

**Author:** ![andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/andrew/32/36_2.png) [@andrew](https://community.parabola.io/u/andrew)\
**Post date:** [January 11, 2021, 2:47pm UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/7 "2021-01-11T14:47:13Z")

</div>

Hey @Jacob, that’s odd…let me flag for our engineering team and get that sorted out for you. Thanks for flagging!

---

<div class="post-metadata">

**Author:** ![andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/andrew/32/36_2.png) [@andrew](https://community.parabola.io/u/andrew)\
**Post date:** [January 11, 2021, 6:14pm UTC](https://community.parabola.io/t/only-pulling-recent-entries-from-api/1451/8 "2021-01-11T18:14:23Z")

</div>

@Jacob flagged with our engineering team and it is indeed a bug. We’ll get it fixed as soon as possible. For now, you should be able to edit the URL directly (not the parameters) and it should work. Will you give that a try and let me know? Happy to give you additional credits to experiment with in the meantime (can you send us a note at [help@parabola.io](mailto:help@parabola.io) and I’ll get that settled for you?).
