Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .agents/skills/api-doc/references/openapi-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ Rules:
| `/request-queues` | GET | `requestQueues_get` |
| `/request-queues/{queueId}` | GET | `requestQueue_get` |
| `/request-queues/{queueId}` | PUT | `requestQueue_put` |
| `/acts/{actorId}/runs` | POST | `act_runs_post` |
| `/acts/{actorId}/runs` | GET | `act_runs_get` |
| `/acts/{actorId}/runs/{runId}` | GET | `act_run_get` |
| `/actors/{actorId}/runs` | POST | `actors_runs_post` |
| `/actors/{actorId}/builds` | GET | `actors_builds_get` |
| `/actors/{actorId}/runs/last` | GET | `actor_runs_last_get` |

Uniqueness beats the singular rule, because the operation ID becomes the page slug. GET `/actors/{actorId}/runs` can't be `actor_runs_get` - the account-wide GET `/actor-runs` already owns the `actor-runs-get` slug and the two are different scopes. So Actor-scoped `/runs` and `/builds` use plural `actors_`, while `runs/last` has no clash and stays singular. Matching redirects: `nginx.conf`.

Never rewrite the `act_*` fragments in `x-legacy-doc-urls` or in-description links pointing at them. They're backward-compatibility anchors, not operation ID references. `docusaurus.config.js` turns every `x-legacy-doc-urls` hash into a `data-altids` sidebar attribute, and `redirectOpenApiDocs()` in `apify-docs-theme/static/js/custom.js` matches an incoming `#tag/` or `#/reference/` hash against those altids - an unmatched hash hard-bounces to `/search?...&not-found=1`. Rewrite `act_version_put` to `actor_version_put` and the old link breaks, because no page carries the new id.

## Code sample examples

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Examples:

- `/requests-queues` GET -> `requestQueues_get`
- `/requests-queues/{queueId}` PUT -> `requestQueue_put`
- `/acts/{actorId}/runs` POST -> `act_runs_post`
- `/actors/{actorId}/runs` POST -> `actors_runs_post`

#### Code samples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If the Actor being run via API takes 5 minutes or less to complete a typical run

> If you are unsure about the differences between an Actor and a task, you can read about them in the [tasks](/actors/running/tasks) documentation. In brief, tasks are pre-configured inputs for Actors.

The API endpoints and usage (for both sync and async) for [Actors](/api/v2#tag/ActorsRun-collection/operation/act_runs_post) and [tasks](/api/v2/actor-task-runs-post) are essentially the same.
The API endpoints and usage (for both sync and async) for [Actors](/api/v2/actors-runs-post) and [tasks](/api/v2/actor-task-runs-post) are essentially the same.

To run, or **call**, an Actor/task, you will need a few things:

Expand All @@ -45,7 +45,7 @@ The URL of [POST request](https://developer.mozilla.org/en-US/docs/Web/HTTP/Meth
https://api.apify.com/v2/actors/ACTOR_NAME_OR_ID/runs?token=YOUR_TOKEN
```

For tasks, we can switch the path from **acts** to **actor-tasks** and keep the rest the same:
For tasks, we can switch the path from **actors** to **actor-tasks** and keep the rest the same:

```cURL
https://api.apify.com/v2/actor-tasks/TASK_NAME_OR_ID/runs?token=YOUR_TOKEN
Expand Down
8 changes: 4 additions & 4 deletions sources/academy/tutorials/api/using_apify_from_php.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The [API reference](/api/v2/actors-runs-post) states that an Actor's input shoul
// To identify the Actor, you can use its ID, but you can also pass
// the full Actor name [username]~[actorName] or just ~[actorName] for
// your own Actors
$response = $client->post('acts/vdrmota~contact-info-scraper/runs', [
$response = $client->post('actors/vdrmota~contact-info-scraper/runs', [
// Actors usually accept JSON as input. When using the `json` key in
// a POST request's options, guzzle sets proper request headers
// and serializes the array we pass in
Expand Down Expand Up @@ -128,7 +128,7 @@ All the available parameters are described in [our API reference](/api/v2/datase
Datasets are great for structured data, but are not suited for binary files like images or PDFs. In these cases, Actors store their output in [key-value stores](/storage/key-value-store). One such Actor is the **HTML String To PDF** ([mhamas/html-string-to-pdf](https://apify.com/mhamas/html-string-to-pdf)) converter. Let's run it.

```php
$response = $client->post('acts/mhamas~html-string-to-pdf/runs', [
$response = $client->post('actors/mhamas~html-string-to-pdf/runs', [
'json' => [
'htmlString' => '<html><body><h1>Hello World</h1></body></html>'
],
Expand Down Expand Up @@ -183,7 +183,7 @@ It takes some time for an Actor to generate its output. Some even have Actors th
For Actors that are expected to be quick, we can use the `waitForFinish` parameter. Then, the running Actor's endpoint does not respond immediately but waits until the run finishes (up to the given limit). Let's try this with the HTML String to PDF Actor.

```php
$response = $client->post('acts/mhamas~html-string-to-pdf/runs', [
$response = $client->post('actors/mhamas~html-string-to-pdf/runs', [
'json' => [
'htmlString' => '<html><body><h1>Hi World</h1></body></html>'
],
Expand Down Expand Up @@ -217,7 +217,7 @@ $webhooks = \base64_encode(\json_encode([
'requestUrl' => '<WEBHOOK_ENDPOINT_URL>',
],
]));
$response = $client->post('acts/mhamas~html-string-to-pdf/runs', [
$response = $client->post('actors/mhamas~html-string-to-pdf/runs', [
'json' => [
'htmlString' => '<html><body><h1>Hello World</h1></body></html>'
],
Expand Down
6 changes: 3 additions & 3 deletions sources/platform/get-started/agent-onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ For HTTP-native integrations or languages without a dedicated client. Base URL:
| Action | Method | Endpoint |
| :--- | :--- | :--- |
| [Search Actors in Store](/api/v2/store-get) | `GET` | `/v2/store` |
| [Get Actor details](/api/v2/actor-get) | `GET` | `/v2/acts/{actorId}` |
| [Run an Actor](/api/v2/actors-runs-post) | `POST` | `/v2/acts/{actorId}/runs` |
| [Run Actor (sync, get results)](/api/v2/actor-run-sync-get-dataset-items-post) | `POST` | `/v2/acts/{actorId}/run-sync-get-dataset-items` |
| [Get Actor details](/api/v2/actor-get) | `GET` | `/v2/actors/{actorId}` |
| [Run an Actor](/api/v2/actors-runs-post) | `POST` | `/v2/actors/{actorId}/runs` |
| [Run Actor (sync, get results)](/api/v2/actor-run-sync-get-dataset-items-post) | `POST` | `/v2/actors/{actorId}/run-sync-get-dataset-items` |
| [Get run status](/api/v2/actor-run-get) | `GET` | `/v2/actor-runs/{runId}` |
| [Get dataset items](/api/v2/dataset-items-get) | `GET` | `/v2/datasets/{datasetId}/items` |

Expand Down
2 changes: 1 addition & 1 deletion sources/platform/integrations/programming/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ After you link an Actor to a GitHub repository, add a webhook in GitHub to trigg
1. In Apify Console, open the Actor's **API** dropdown and select **API endpoints**. Copy the **Build Actor** endpoint URL. It has this format:

```text
https://api.apify.com/v2/acts/YOUR-ACTOR-NAME/builds?token=YOUR-TOKEN&version=0.0&tag=latest&waitForFinish=60
https://api.apify.com/v2/actors/YOUR-ACTOR-NAME/builds?token=YOUR-TOKEN&version=0.0&tag=latest&waitForFinish=60
```

:::note API token
Expand Down
Loading