NativePort Apify API
The apify API from NativePort — 5 operation(s) for apify.
The apify API from NativePort — 5 operation(s) for apify.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/nativeport-ai:nativeport-ai-apify-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Reference Apify API
version: 1.0.0
servers:
- url: https://api.nativeport.ai
description: NativePort production
- url: http://localhost:8787
description: Local development (wrangler dev)
tags:
- name: apify
paths:
/apify/v2/acts/{actorId}/runs:
post:
operationId: apify_startActorRun
summary: Start an asynchronous actor run
description: 'Relays to `https://api.apify.com/v2/acts/{actorId}/runs`, rewriting `Authorization` to the
secret Apify token; a client-sent `token` query parameter is discarded. The run starts and
the run object comes back immediately — or, with `waitForFinish`, once the run has finished
(up to 60 s), which covers most short jobs in one call. This replaces the retired
`run-sync` actions.
The run **and** its `data.defaultDatasetId` are registered to your account before the
response reaches you, so `GET /apify/v2/actor-runs/{runId}`,
`GET /apify/v2/datasets/{datasetId}/items`, and the abort route are already authorized for
you — and answer `404` for everyone else.
The create itself carries no flat charge. Once the run reaches a terminal state, it is
charged once, priced from its own `usageTotalUsd` as read about 15 seconds after it
finishes, to the account that created it.'
tags:
- apify
parameters:
- name: actorId
in: path
description: 'The actor, as **one** path segment in tilde form (e.g. `apify~web-scraper`). Apify''s
slash-separated `username/name` spelling is not accepted here — it would split across path
segments and miss the allowlist.
'
required: true
schema:
type: string
- name: timeout
in: query
description: How long the run may take, in seconds, before Apify times it out. Apify's own default applies when omitted.
required: false
schema:
type: integer
minimum: 0
- name: memory
in: query
description: Memory for the run, in megabytes. Apify's own default applies when omitted; more memory costs more compute.
required: false
schema:
type: integer
- name: build
in: query
description: A specific actor build tag or number to run, instead of the actor's default build.
required: false
schema:
type: string
- name: waitForFinish
in: query
description: 'Seconds to hold the response open waiting for the run to finish, up to Apify''s own maximum.
The call still answers with the run object either way — it just may already be terminal, in
which case the run''s exact usage, plus the gateway''s 5.5% fee, settles right there.
'
required: false
schema:
type: integer
minimum: 0
responses:
'201':
description: 'An asynchronous run was started and the run object returned. The run and its
`defaultDatasetId` are registered to your account before this reaches you, so the very next
poll or dataset read is already authorized — and no other account can make either.
Keep `data.id` to poll `GET /apify/v2/actor-runs/{data.id}`, and `data.defaultDatasetId` to
read `GET /apify/v2/datasets/{data.defaultDatasetId}/items` once the run succeeds.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ApifyRunEnvelope'
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: 'The upstream created the resource, but the gateway could not record it as yours — so it was
discarded rather than handed back untracked, and nothing was charged for it. Retry the
request.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
description: 'The actor''s own input object, passed to Apify untouched — its shape is defined by the actor
you are running, not by the gateway. See that actor''s page on Apify for its input schema.
'
content:
application/json:
schema:
type: object
additionalProperties:
description: Any type
security:
- bearerAuth: []
/apify/v2/actor-tasks/{actorTaskId}/runs:
post:
operationId: apify_startTaskRun
summary: Start an asynchronous saved-task run
description: 'Relays to `https://api.apify.com/v2/actor-tasks/{actorTaskId}/runs`, rewriting
`Authorization` to the secret Apify token; a client-sent `token` query parameter is
discarded. The saved-task spelling of `POST /apify/v2/acts/{actorId}/runs`, with the same
ownership and settlement behaviour: both ids are registered to your account, the create
carries no flat charge, and the run''s exact `usageTotalUsd` plus the gateway''s 5.5% fee is
charged once it is terminal.'
tags:
- apify
parameters:
- name: actorTaskId
in: path
description: 'The saved task, as **one** path segment — its id, or its tilde-form
`username~task-name`. The slash-separated spelling is not accepted.
'
required: true
schema:
type: string
- name: timeout
in: query
description: How long the run may take, in seconds, before Apify times it out. Apify's own default applies when omitted.
required: false
schema:
type: integer
minimum: 0
- name: memory
in: query
description: Memory for the run, in megabytes. Apify's own default applies when omitted; more memory costs more compute.
required: false
schema:
type: integer
- name: build
in: query
description: A specific actor build tag or number to run, instead of the actor's default build.
required: false
schema:
type: string
- name: waitForFinish
in: query
description: 'Seconds to hold the response open waiting for the run to finish, up to Apify''s own maximum.
The call still answers with the run object either way — it just may already be terminal, in
which case the run''s exact usage, plus the gateway''s 5.5% fee, settles right there.
'
required: false
schema:
type: integer
minimum: 0
responses:
'201':
description: 'An asynchronous run was started and the run object returned. The run and its
`defaultDatasetId` are registered to your account before this reaches you, so the very next
poll or dataset read is already authorized — and no other account can make either.
Keep `data.id` to poll `GET /apify/v2/actor-runs/{data.id}`, and `data.defaultDatasetId` to
read `GET /apify/v2/datasets/{data.defaultDatasetId}/items` once the run succeeds.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ApifyRunEnvelope'
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: 'The upstream created the resource, but the gateway could not record it as yours — so it was
discarded rather than handed back untracked, and nothing was charged for it. Retry the
request.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
description: 'Optional input overrides for the saved task. A task already carries its stored input, so an
empty object runs it as saved; any fields you send are merged over that input by Apify.
'
content:
application/json:
schema:
type: object
additionalProperties:
description: Any type
security:
- bearerAuth: []
/apify/v2/actor-runs/{runId}:
get:
operationId: apify_getRun
summary: Poll an asynchronous run
description: 'Relays to `https://api.apify.com/v2/actor-runs/{runId}`, rewriting `Authorization` to the
secret Apify token; a client-sent `token` query parameter is discarded. Answers with the run
object — its `status`, and, once the run is terminal, its final `usageTotalUsd`.
**Ownership-gated**: only the account that created the run can read it. A run id belonging
to another account, and one that never existed, answer the same `404`, with no upstream call
made on its behalf. The account-wide run *list* carries no id to gate, so it is not mounted
and 404s as well.
Polling costs nothing on its own. The first poll that observes a terminal status settles the
run''s exact `usageTotalUsd` plus the gateway''s 5.5% fee, once, against the account that
created it — repeated terminal polls do not charge again.'
tags:
- apify
parameters:
- name: runId
in: path
description: 'The run, from `data.id` of the create that started it. Only the account that created the run
can name it: another account''s run id, and one that never existed, answer the same `404`,
refused locally with no upstream call. A run you **do** own that Apify has since expired also
answers `404` — that read is authorized and reaches Apify, so what comes back is Apify''s own
answer rather than the local refusal.
'
required: true
schema:
type: string
- name: waitForFinish
in: query
description: 'Seconds to hold the response open waiting for the run to finish, up to Apify''s own maximum.
The call still answers with the run object either way — it just may already be terminal, in
which case the run''s exact usage, plus the gateway''s 5.5% fee, settles right there.
'
required: false
schema:
type: integer
minimum: 0
responses:
'200':
description: 'Apify''s own run envelope, relayed as it arrived. `data.status` follows Apify''s run
lifecycle: `READY` and `RUNNING` while the run is live, `SUCCEEDED`, `FAILED`, `TIMED-OUT`,
or `ABORTED` once it is finished, with `TIMING-OUT` and `ABORTING` in between.
`data.usageTotalUsd` is a running total until the run is terminal — which is why nothing is
charged before then. Once terminal, that exact figure plus the gateway''s 5.5% fee is
charged once, to the account that created the run.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ApifyRunEnvelope'
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth: []
/apify/v2/actor-runs/{runId}/abort:
post:
operationId: apify_abortRun
summary: Abort an asynchronous run
description: 'Relays to `https://api.apify.com/v2/actor-runs/{runId}/abort`, rewriting `Authorization` to
the secret Apify token; a client-sent `token` query parameter is discarded. Stops a run you
created and answers with the run object in its new state. No request body is required.
**Ownership-gated** exactly like the poll above: another account''s run id answers `404`.
Aborting keeps the run readable: it still answers `GET /apify/v2/actor-runs/{runId}` with
its terminal status and final usage, and its dataset still serves whatever it produced
before stopping. An abort that lands the run in a terminal state settles its exact
`usageTotalUsd` plus the gateway''s 5.5% fee, once, against the account that created it.'
tags:
- apify
parameters:
- name: runId
in: path
description: 'The run, from `data.id` of the create that started it. Only the account that created the run
can name it: another account''s run id, and one that never existed, answer the same `404`,
refused locally with no upstream call. A run you **do** own that Apify has since expired also
answers `404` — that read is authorized and reaches Apify, so what comes back is Apify''s own
answer rather than the local refusal.
'
required: true
schema:
type: string
responses:
'200':
description: 'Apify''s own run envelope, relayed as it arrived. `data.status` follows Apify''s run
lifecycle: `READY` and `RUNNING` while the run is live, `SUCCEEDED`, `FAILED`, `TIMED-OUT`,
or `ABORTED` once it is finished, with `TIMING-OUT` and `ABORTING` in between.
`data.usageTotalUsd` is a running total until the run is terminal — which is why nothing is
charged before then. Once terminal, that exact figure plus the gateway''s 5.5% fee is
charged once, to the account that created the run.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ApifyRunEnvelope'
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
description: An abort takes no body. Send none, or an empty object.
content:
application/json:
schema:
type: object
additionalProperties:
description: Any type
security:
- bearerAuth: []
/apify/v2/datasets/{datasetId}/items:
get:
operationId: apify_getDatasetItems
summary: Read the items an asynchronous run produced
description: 'Relays to `https://api.apify.com/v2/datasets/{datasetId}/items`, rewriting `Authorization`
to the secret Apify token; a client-sent `token` query parameter is discarded. Answers with
the items the run wrote to its default dataset, in the format the query asks for.
**Ownership-gated**: the dataset was registered to your account alongside the run that
writes to it, and another account''s dataset id answers the same `404` an unknown id answers.
The account-wide dataset *list* is not mounted, and neither is dataset metadata — only the
items.
Reading items is never charged: the run it came from is what carries the cost.'
tags:
- apify
parameters:
- name: datasetId
in: path
description: 'The dataset, from `data.defaultDatasetId` of the create that started the run writing to it.
Ownership-gated the same way the run is.
'
required: true
schema:
type: string
- name: format
in: query
description: The serialization of the returned items. Apify defaults to `json`.
required: false
schema:
$ref: '#/components/schemas/ApifyV2DatasetsDatasetIdItemsGetParametersFormat'
- name: limit
in: query
description: How many items to return.
required: false
schema:
type: integer
minimum: 1
- name: offset
in: query
description: How many items to skip before returning any — the other half of paging through a large dataset.
required: false
schema:
type: integer
minimum: 0
- name: fields
in: query
description: A comma-separated list of fields to keep on each item; everything else is left out.
required: false
schema:
type: string
- name: clean
in: query
description: Return only non-empty items, with each item's hidden fields dropped.
required: false
schema:
type: boolean
- name: desc
in: query
description: Return the items newest-first instead of in insertion order.
required: false
schema:
type: boolean
responses:
'200':
description: 'The items the run wrote to its default dataset, relayed as Apify returned them. Each item''s
shape is the actor''s, not the gateway''s. The default serialization is a JSON array; the
`format` parameter selects another.
'
content:
application/json:
schema:
type: array
items:
type: object
additionalProperties:
description: Any type
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth: []
components:
schemas:
ApifyRunEnvelope:
type: object
properties:
data:
$ref: '#/components/schemas/ApifyRunEnvelopeData'
description: The run object.
description: 'Apify''s own run envelope, relayed as received. The gateway reads `data.id` and
`data.defaultDatasetId` on an asynchronous create to register both to your account, and
`data.status` / `data.usageTotalUsd` to settle the run once it is terminal. It changes
nothing.
'
title: ApifyRunEnvelope
ApifyRunEnvelopeData:
type: object
properties:
id:
type: string
description: The run id — the handle for `GET /apify/v2/actor-runs/{runId}` and the abort route.
actId:
type: string
description: The actor that ran.
status:
$ref: '#/components/schemas/ApifyRunEnvelopeDataStatus'
description: 'Apify''s run lifecycle. `READY` and `RUNNING` mean the run is live; `SUCCEEDED`,
`FAILED`, `TIMED-OUT`, and `ABORTED` are terminal, and `TIMING-OUT` / `ABORTING` are
the transitions into them. The charge is taken only on a terminal status.
'
startedAt:
type: string
format: date-time
description: When the run started.
finishedAt:
type:
- string
- 'null'
format: date-time
description: When the run finished, or `null` while it is still going.
defaultDatasetId:
type: string
description: 'The dataset this run writes its items to — registered to your account alongside the
run, and readable at `GET /apify/v2/datasets/{defaultDatasetId}/items`.
'
usageTotalUsd:
type: number
format: double
description: 'What the run has cost upstream so far, in US dollars — compute, proxy traffic,
storage operations, and dataset writes already summed by Apify. It is a running
total until the run is terminal, which is why nothing is charged before then. Once
terminal, this exact figure plus the gateway''s 5.5% fee is charged once, to the
account that created the run.
'
description: The run object.
title: ApifyRunEnvelopeData
Error:
type: object
properties:
error:
type: string
description: Explanatory message meant for humans.
required:
- error
title: Error
ApifyRunEnvelopeDataStatus:
type: string
enum:
- READY
- RUNNING
- SUCCEEDED
- FAILED
- TIMED-OUT
- ABORTED
- TIMING-OUT
- ABORTING
description: 'Apify''s run lifecycle. `READY` and `RUNNING` mean the run is live; `SUCCEEDED`,
`FAILED`, `TIMED-OUT`, and `ABORTED` are terminal, and `TIMING-OUT` / `ABORTING` are
the transitions into them. The charge is taken only on a terminal status.
'
title: ApifyRunEnvelopeDataStatus
ApifyV2DatasetsDatasetIdItemsGetParametersFormat:
type: string
enum:
- json
- jsonl
- csv
- html
- xml
- rss
- xlsx
title: ApifyV2DatasetsDatasetIdItemsGetParametersFormat
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Your per-client bearer token — the API key the gateway issued to you. Present it in
`Authorization: Bearer <token>` form. A token that is missing, unknown, or revoked draws a
`401`. Before the call is sent upstream the token is removed (stripped, or swapped for the
upstream''s own credential); it never makes it past the gateway.
'