Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: copy & paste friendly curl API example (#1305)
<img width="623" alt="image" src="https://github.com/user-attachments/assets/f839e94b-a9e8-45ce-a03e-12cf962367b8"> - the commands are restructured in a way that the editable part is always at the end of the snippet (especially annoying in multi-line snippets) - added the saving of the response of the Run to a `run.json ` - added convenience `jq` command to find the dataset in the Actor run response - removed (imo) unnecessary quotes - squished the per command line breaks to save lines Please, try it yourself before merging: ``` # Prepare Actor input echo '{ "searchStringsArray": ["Apify"] }' > input.json # Run the Actor and retreive its default dataset id. curl -X POST -d @input.json -H 'Content-Type: application/json' \ -s -o >(tee run.json) \ https://api.apify.com/v2/acts/compass~crawler-google-places/runs?token=<YOUR_API_TOKEN> # Find the defaultDatasetId in the API response cat run.json | jq -r .data.defaultDatasetId # And pass it instead of <DATASET_ID> curl https://api.apify.com/v2/datasets/<DATASET>/items?token=<YOUR_API_TOKEN> ```
- Loading branch information