Skip to content

Commit ade9eb9

Browse files
committed
Addressed comments
1 parent 479c0af commit ade9eb9

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pages/api/index.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,12 @@ export default function Api() {
140140
{`# Prepare Actor input
141141
echo '{ "searchStringsArray": ["Apify"] }' > input.json
142142
143-
# Run the Actor and retreive its default dataset id.
144-
curl -X POST -d @input.json -H 'Content-Type: application/json' \\
145-
-s -o >(tee run.json) \\
146-
https://api.apify.com/v2/acts/compass~crawler-google-places/runs?token=<YOUR_API_TOKEN>
147-
148-
# Find the defaultDatasetId in the API response
149-
cat run.json | jq -r .data.defaultDatasetId
150-
151-
# And pass it instead of <DATASET_ID>
152-
curl https://api.apify.com/v2/datasets/<DATASET>/items?token=<YOUR_API_TOKEN>`
153-
}
143+
# Run the Actor and retreive its default dataset content.
144+
curl -X POST -d @input.json \\
145+
-H 'Content-Type: application/json' \\
146+
-H 'Authorization: Bearer <YOUR_API_TOKEN>' \\
147+
-L 'https://api.apify.com/v2/acts/compass~crawler-google-places/run-sync-get-dataset-items'
148+
`}
154149
</CodeBlock>
155150
</ClientCodeWrapper>
156151
</SectionWrapper>

0 commit comments

Comments
 (0)