# Retrieving sweep id when starting sweep from CL

**URL:** <https://community.wandb.ai/t/retrieving-sweep-id-when-starting-sweep-from-cl/2921>\
**Category:** W&B Help\
**Tags:** sweeps\
**Created:** [August 13, 2022, 1:58pm UTC](https://community.wandb.ai/t/retrieving-sweep-id-when-starting-sweep-from-cl/2921 "2022-08-13T13:58:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bask0](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@bask0](https://community.wandb.ai/u/bask0)\
**Post date:** [August 13, 2022, 1:58pm UTC](https://community.wandb.ai/t/retrieving-sweep-id-when-starting-sweep-from-cl/2921/1 "2022-08-13T13:58:59Z")

</div>

I start a sweep from the command line (`wandb sweep config.yaml`). The sweep ID is now displayed (`wandb: Created sweep with ID: 6bb3459a`), but I would like to get it programatically, such that I can later start agents automatically without copy-pasting the ID.

Is there a way to achieve this?

Thanks

---

<div class="post-metadata">

**Author:** ![mohammadbakir](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mohammadbakir](https://community.wandb.ai/u/mohammadbakir)\
**Post date:** [August 17, 2022, 8:52pm UTC](https://community.wandb.ai/t/retrieving-sweep-id-when-starting-sweep-from-cl/2921/2 "2022-08-17T20:52:11Z")

</div>

Hi @bask0 , we currently do not have the equivalent of `api.sweeps()` built into our API. This is being integrated for future releases. At this time, specific sweeps functionality via the API can be found [here](https://docs.wandb.ai/guides/track/public-api-guide#get-runs-from-a-specific-sweep). I attached your inquiry to our feature request system. Once it’s been implemented we will let you know.

---

<div class="post-metadata">

**Author:** ![bask0](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@bask0](https://community.wandb.ai/u/bask0)\
**Post date:** [August 18, 2022, 9:00am UTC](https://community.wandb.ai/t/retrieving-sweep-id-when-starting-sweep-from-cl/2921/3 "2022-08-18T09:00:14Z")

</div>

Thanks @mohammadbakir ! For those looking for a temporary solution: for now, I direct the output to a file and grab the ID from there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [October 17, 2022, 9:00am UTC](https://community.wandb.ai/t/retrieving-sweep-id-when-starting-sweep-from-cl/2921/4 "2022-10-17T09:00:32Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
