Apify & CrawleeA&CApify & Crawlee
Powered by
ill-bronzeI
Apify & Crawlee•4y ago•
4 replies
ill-bronze

Return data to API call

Hello,

I'm trying to return the data from an Apify actor via the same REST API call that initiated the actor.

Is this possible?

This page says I need to put the value in OUTPUTOUTPUT in the "default key-value store":

https://docs.apify.com/platform/tutorials/run-actor-and-retrieve-data-via-api#synchronous-runs-with-dataset-output

But the "put record" documentation seems to require a key value store ID. Is there a default here?

https://docs.apify.com/api/v2#/reference/key-value-stores/record/put-record

So I'm trying to figure out how to return data. From within the Actor, am I supposed to call the key-value store API, put a new record, with the recordKey of OUTPUTOUTPUT, and JSON data of the value? If so, what should storeIdstoreId be?

Is there an easier way to do this? I wish I could just type returnreturn and return the value ...
image.png
Run actor and retrieve data via API | Apify Documentation
Learn how to run an actor/task via the Apify API, wait for the job to finish, and retrieve its output data. Your key to integrating actors with your projects.
Run actor and retrieve data via API | Apify Documentation
Apify Documentation · Apify Documentation | Apify Documentation
Apify Documentation · Apify Documentation | Apify Documentation
Apify & Crawlee banner
Apify & CrawleeJoin
This is the official developer community of Apify and Crawlee.
15,894Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Continue the conversation

Join the Discord to ask follow-up questions and connect with the community

Apify & CrawleeA&C

Apify & Crawlee

This is the official developer community of Apify and Crawlee.

15,894 Members

Join
Recent Announcements
Saurav Jain

We have opened call for papers for Apify Content Program - July. @here

Saurav Jain · 2w ago

Saurav Jain

Saurav Jain · 2w ago

uncertain-scarlet

uncertain-scarlet · 2w ago

Similar Threads

Apify Api Data?
MEE6MMEE6 / apify-platform
2y ago
Javascript API SDK: How to call multiple actors simultaneously?
living-lavenderLliving-lavender / apify-platform
3y ago
Limit the amount spend per API call? Or Per task?
dry-scarletDdry-scarlet / apify-platform
4y ago
Apify API not returning any data (Instagram User Scraper)
brilliant-orangeBbrilliant-orange / apify-platform
2y ago