> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.auxiliar.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.auxiliar.ai/_mcp/server.

# Proxy an Apify POST

POST https://api.auxiliar.ai/apify/{path}
Content-Type: application/json

Forwards to `https://api.apify.com/{path}`, overwriting `Authorization` with the secret Apify
token and dropping any client `token` query param. Use to run actors and tasks.


Reference: https://docs.auxiliar.ai/api-reference/api-reference/apify/post

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: gateway
  version: 1.0.0
paths:
  /apify/{path}:
    post:
      operationId: post
      summary: Proxy an Apify POST
      description: >
        Forwards to `https://api.apify.com/{path}`, overwriting `Authorization`
        with the secret Apify

        token and dropping any client `token` query param. Use to run actors and
        tasks.
      tags:
        - subpackage_apify
      parameters:
        - name: path
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >
            A per-client bearer token (your Auxiliar API key). Send it as

            `Authorization: Bearer <token>`. A missing, unknown, or revoked
            token returns `401`. This

            token is removed before the request is forwarded upstream (stripped,
            or overwritten with the

            upstream's own credential), so it never leaves the gateway.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >
            The upstream's response, passed through unchanged (status, headers,
            and body). Shown here as

            JSON; the exact shape is defined by the upstream provider.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  description: Any type
        '401':
          description: >
            Missing, unknown, or revoked bearer token. The body is JSON `{
            "error": "Unauthorized." }`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >
            Unknown path, or a method the matched route does not allow (e.g. an
            unlisted `/serper/<endpoint>`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                description: Any type
servers:
  - url: https://api.auxiliar.ai
    description: Auxiliar production
  - url: http://localhost:8787
    description: Local development (wrangler dev)
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
      title: Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        A per-client bearer token (your Auxiliar API key). Send it as

        `Authorization: Bearer <token>`. A missing, unknown, or revoked token
        returns `401`. This

        token is removed before the request is forwarded upstream (stripped, or
        overwritten with the

        upstream's own credential), so it never leaves the gateway.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "searchParameters": {
    "q": "apple inc",
    "type": "search"
  },
  "organic": [
    {
      "title": "Apple",
      "link": "https://www.apple.com/",
      "position": 1
    }
  ]
}
```

**SDK Code**

```python Serper /search (truncated)
import requests

url = "https://api.auxiliar.ai/apify/path"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Serper /search (truncated)
const url = 'https://api.auxiliar.ai/apify/path';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Serper /search (truncated)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.auxiliar.ai/apify/path"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Serper /search (truncated)
require 'uri'
require 'net/http'

url = URI("https://api.auxiliar.ai/apify/path")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java Serper /search (truncated)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.auxiliar.ai/apify/path")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Serper /search (truncated)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.auxiliar.ai/apify/path', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Serper /search (truncated)
using RestSharp;

var client = new RestClient("https://api.auxiliar.ai/apify/path");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Serper /search (truncated)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.auxiliar.ai/apify/path")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```