> This page is for version v1.0.1 (default).
> For other versions, use one of these documentation indexes:
> - v1.0.1 (default): https://docs.kinetk.ai/v-1-0-1/llms.txt

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

# Search content, narratives, patterns and creators

POST https://api.kinetk.ai/graph/search
Content-Type: application/json

Synchronous search over the live corpus. Returns up to `limit` ranked content rows (default 100, max 300) plus the narratives, patterns and creators they belong to, with ids for `GET /narratives/{id}` and `GET /intelligence/patterns/{patternKey}` (`patterns` is currently always empty while it is switched off). Costs \$0.010 per content row returned. A search that runs past its time budget returns `202` with an `insights` job to poll. For larger pulls or deep analysis, use `POST /intelligence/jobs`.

Reference: https://docs.kinetk.ai/api-reference/api-reference/search

## Authentication

- `x-api-key` header (required) — Customer secret key, required on every request. Validated natively by API Gateway; missing / invalid / revoked → 403.

## Request

### Body (application/json)

This endpoint expects an ISearchBody.

- `query` (string, required) — Free-text query.
- `limit` (double, optional) — Max content rows to return (default 100, max 300). Larger pulls belong to a `records` job.
- `window` (enum, optional) — `7d`, `30d`, `90d` or `all`. Defaults to `30d`.
  - Allowed values: `30d`, `7d`, `90d`, `all`

## Response

### 200

Successful response

- `content` (list of ISearchContentItem, required)
- `creators` (list of ISearchCreator, required)
- `narratives` (list of ISearchNarrative, required)
- `patterns` (list of ISearchPattern, required)
- `query` (string, required)
- `request_id` (string, required) — Request id; quote it when contacting support about a call.
- `response_time_ms` (double, required)
- `usage` (ISearchResponseUsage, required)
- `window` (enum, required)
  - Allowed values: `30d`, `7d`, `90d`, `all`

### 202

The search ran past its time budget: its charge was refunded and an `insights` job was submitted instead. Poll `statusUrl`.

- `jobId` (string, required)
- `reason` (enum, required)
  - Allowed values: `sync_budget_exceeded`
- `request_id` (string, required)
- `status` (enum, required)
  - Allowed values: `queued`, `running`, `succeeded`
- `statusUrl` (string, required)
- `charged` (double, optional) — Credits actually charged when the job was served from cache.
- `estimated_cost` (double, optional) — Credit hold placed on the fallback insights job.

## Errors

### 400 Bad Request Error

Rejected input: `window` other than `7d`/`30d`/`90d`/`all`, `limit` above 300 or not a positive integer, or an undeclared field.

- `error` (string, required)

### 402 Payment Required Error

Insufficient credits. The body reports the credits required vs available plus budget recommendations (max affordable limit, top-up URL).

- `credits_available` (double, required)
- `credits_required` (double, required)
- `error` (enum, required)
  - Allowed values: `insufficient_credits`
- `recommendations` (IBudgetRecommendations, required)
- `tier` (enum, required) — Pricing tier of the requested kind: 2 marks the kind carrying the LLM-prose add-on.
  - Allowed values: `1`, `2`
- `window` (enum, required)
  - Allowed values: `30d`, `7d`, `90d`, `all`

## Types

### ISearchContentItem

- `authorReach` (double, required)
- `commentCount` (double, required)
- `engagementDepth` (double, required)
- `engagementScore` (double, required)
- `exampleRankingScore` (double, required)
- `likeCount` (double, required)
- `narrativeIds` (list of string, required) — Ids of the current-generation narratives this row belongs to (for GET /narratives/\{id}).
- `patternKeys` (list of string, required) — Keys of the current-generation patterns this row belongs to (for GET /intelligence/patterns/\{patternKey}).
- `rawSimilarity` (double, required)
- `recencyScore` (double, required)
- `rrfScore` (double, required)
- `shareCount` (double, required)
- `similarity` (double, required)
- `tags` (list of string, required)
- `uuid` (string, required)
- `viewCount` (double, required)
- `contentType` (string, optional, nullable)
- `creatorId` (double, optional, nullable)
- `description` (string, optional, nullable)
- `enrichment` (PublicEnrichment, optional)
- `followerCount` (double, optional, nullable)
- `intentEvidenceSource` (enum, optional)
  - Allowed values: `authored_text`, `no_match`, `no_text`, `tag_only`
- `intentSimilarity` (double, optional, nullable)
- `platform` (string, optional, nullable)
- `publishedAt` (string, optional, nullable)
- `relevance` (double, optional)
- `title` (string, optional, nullable)

### ISearchCreator

- `creatorId` (double, required)
- `followerCount` (double, required, nullable)
- `hits` (double, required) — Number of returned content rows authored by this creator.
- `platform` (string, required)

### ISearchNarrative

- `computed_at` (string, required)
- `content_count` (double, required)
- `creator_count` (double, required)
- `emerging_score` (double, required)
- `id` (string, required)
- `label` (string, required)
- `momentum_score` (double, required)
- `platform_count` (double, required)
- `score_breakdown` (INarrativeScoreBreakdown, required)
- `source` (enum, required)
  - Allowed values: `emergent`, `tracked`
- `summary` (string, required)
- `top_tags` (list of string, required)
- `total_engagement` (string, required)
- `window_end` (string, required)
- `window_key` (enum, required) — The precomputed window a tracked narrative belongs to, or the search window an emergent one was formed from.
  - Allowed values: `30d`, `7d`, `90d`, `all`
- `window_start` (string, required)
- `acceleration` (double, optional, nullable)
- `diffusion` (double, optional, nullable)
- `lifecycle` (string, optional, nullable)
- `memberOverlap` (double, optional) — Retrieved content rows belonging to this narrative (tracked membership path only).
- `narrative_key` (string, optional, nullable)
- `overlapZScore` (double, optional) — How far that overlap exceeds what the narrative's share of the map predicts, in units of its own noise. A comparative score for ranking and display, not a threshold: admission uses an exact significance test, so every narrative returned has already cleared it (tracked membership path only).
- `overlap_count` (double, optional)
- `queryRelevance` (double, optional) — How closely the narrative's members match the query, 0-1 (emergent path only).
- `representative_content_uuid` (string, optional, nullable)
- `sentiment_breakdown` (INarrativeSentimentBreakdown, optional, nullable)
- `sentiment_label` (string, optional, nullable)
- `sentiment_score` (double, optional, nullable)
- `text_rank` (double, optional)
- `trajectory_confidence` (string, optional, nullable)
- `velocity` (double, optional, nullable)

### ISearchPattern

- `lexicalMatch` (double, required) — Share of query terms found in the pattern's label/summary/elements.
- `lookalikes` (list of ISearchPatternLookalikesItems, required)
- `memberTextMatch` (double, required) — Share of the pattern's posts whose own text matches the query.
- `pattern` (PatternDetail, required)
- `queryRelevance` (double, required) — Blended relevance: visual + lexical. What the ranking uses.
- `representativeContent` (list of ISearchPatternRepresentativeContentItems, required)
- `visualSimilarity` (double, required) — Query-to-centroid cosine on its own (small magnitudes are normal).

### ISearchResponseUsage

- `credits` (double, required) — Credits charged for this call: $0.010 per content row returned.

### IBudgetRecommendations

- `maxLimitForWindow` (double, required)
- `topUpUrl` (string, required)

### PublicEnrichment

- `aestheticStyle` (list of string, required)
- `attributeConfidence` (double, required, nullable)
- `brandProducts` (list of string, required)
- `coverage` (PublicEnrichmentCoverage, required)
- `emotionMood` (list of string, required)
- `noveltyScore` (double, required, nullable)
- `saturationScore` (double, required, nullable)
- `themes` (list of string, required)
- `tone` (string, required, nullable)
- `toneConfidence` (double, required, nullable)

### INarrativeScoreBreakdown

- `content_count` (double, required)
- `creator_count` (double, required)
- `platform_count` (double, required)
- `total_engagement` (double, required)
- `clustering_method` (string, optional)
- `pair_count` (double, optional)
- `seed_tag` (string, optional)

### INarrativeSentimentBreakdown

- `coverage` (double, optional)
- `dominant_tone` (string, optional, nullable)
- `stance` (INarrativeSentimentBreakdownStance, optional, nullable)
- `stance_coverage` (double, optional)

### ISearchPatternLookalikesItems

- `centroidCosine` (double, required)
- `corroborationCount` (double, required)
- `label` (string, required)
- `patternKey` (string, required)
- `sharedElements` (map from string to list of PatternSharedElementsItems, required)
- `tagJaccard` (double, required)

### PatternDetail

- `clusteringMethod` (string, required)
- `confidence` (double, required)
- `contentCount` (double, required)
- `creatorCount` (double, required)
- `earlyCount` (double, required)
- `firstSeenAt` (string, required)
- `generation` (string, required)
- `label` (string, required)
- `labelSource` (string, required)
- `lateCount` (double, required)
- `lateShare` (double, required, nullable)
- `medoidContentUuids` (list of string, required)
- `patternKey` (string, required)
- `platformCount` (double, required)
- `reconciliation` (PatternDetailReconciliation, required, nullable)
- `recurrentElements` (list of PatternDetailRecurrentElementsItems, required)
- `scopeDays` (double, required)
- `summary` (string, required, nullable)
- `tagAttachedMembers` (double, required)
- `totalEngagement` (double, required)
- `trajectory` (list of PatternDetailTrajectoryItems, required)

### ISearchPatternRepresentativeContentItems

- `centroidSimilarity` (double, required, nullable)
- `contentUrl` (string, required, nullable)
- `contentUuid` (string, required)
- `description` (string, required, nullable) — Falls back for the many platforms that post without a title.
- `engagement` (double, required)
- `isRepresentative` (boolean, required)
- `platform` (string, required, nullable)
- `publishedAt` (string, required, nullable)
- `title` (string, required, nullable)

### PublicEnrichmentCoverage

- `attributes` (boolean, required)
- `novelty` (boolean, required)
- `sentiment` (boolean, required)

### INarrativeSentimentBreakdownStance

- `critical` (double, required)
- `mixed` (double, required)
- `neutral` (double, required)
- `supportive` (double, required)

### PatternSharedElementsItems

- `neighborSupport` (double, required)
- `selfSupport` (double, required)
- `value` (string, required)

### PatternDetailReconciliation

- `cosine` (double, required)
- `memberOverlap` (double, required, nullable)

### PatternDetailRecurrentElementsItems

- `support` (double, required)
- `type` (string, required)
- `value` (string, required)

### PatternDetailTrajectoryItems

- `contentCount` (double, required)
- `creatorCount` (double, required)
- `generation` (string, required)

## Examples

### Example 1

**Request**

```json
{
  "query": "string"
}
```

**Response**

```json
{
  "content": [
    {
      "authorReach": 1.1,
      "commentCount": 1.1,
      "engagementDepth": 1.1,
      "engagementScore": 1.1,
      "exampleRankingScore": 1.1,
      "likeCount": 1.1,
      "narrativeIds": [
        "string"
      ],
      "patternKeys": [
        "string"
      ],
      "rawSimilarity": 1.1,
      "recencyScore": 1.1,
      "rrfScore": 1.1,
      "shareCount": 1.1,
      "similarity": 1.1,
      "tags": [
        "string"
      ],
      "uuid": "string",
      "viewCount": 1.1,
      "contentType": "string",
      "creatorId": 1.1,
      "description": "string",
      "enrichment": {
        "aestheticStyle": [
          "string"
        ],
        "attributeConfidence": 1.1,
        "brandProducts": [
          "string"
        ],
        "coverage": {
          "attributes": true,
          "novelty": true,
          "sentiment": true
        },
        "emotionMood": [
          "string"
        ],
        "noveltyScore": 1.1,
        "saturationScore": 1.1,
        "themes": [
          "string"
        ],
        "tone": "string",
        "toneConfidence": 1.1
      },
      "followerCount": 1.1,
      "intentEvidenceSource": "authored_text",
      "intentSimilarity": 1.1,
      "platform": "string",
      "publishedAt": "string",
      "relevance": 1.1,
      "title": "string"
    }
  ],
  "creators": [
    {
      "creatorId": 1.1,
      "followerCount": 1.1,
      "hits": 1.1,
      "platform": "string"
    }
  ],
  "narratives": [
    {
      "computed_at": "string",
      "content_count": 1.1,
      "creator_count": 1.1,
      "emerging_score": 1.1,
      "id": "string",
      "label": "string",
      "momentum_score": 1.1,
      "platform_count": 1.1,
      "score_breakdown": {
        "content_count": 1.1,
        "creator_count": 1.1,
        "platform_count": 1.1,
        "total_engagement": 1.1,
        "clustering_method": "string",
        "pair_count": 1.1,
        "seed_tag": "string"
      },
      "source": "emergent",
      "summary": "string",
      "top_tags": [
        "string"
      ],
      "total_engagement": "string",
      "window_end": "string",
      "window_key": "30d",
      "window_start": "string",
      "acceleration": 1.1,
      "diffusion": 1.1,
      "lifecycle": "string",
      "memberOverlap": 1.1,
      "narrative_key": "string",
      "overlapZScore": 1.1,
      "overlap_count": 1.1,
      "queryRelevance": 1.1,
      "representative_content_uuid": "string",
      "sentiment_breakdown": {
        "coverage": 1.1,
        "dominant_tone": "string",
        "stance": {
          "critical": 1.1,
          "mixed": 1.1,
          "neutral": 1.1,
          "supportive": 1.1
        },
        "stance_coverage": 1.1
      },
      "sentiment_label": "string",
      "sentiment_score": 1.1,
      "text_rank": 1.1,
      "trajectory_confidence": "string",
      "velocity": 1.1
    }
  ],
  "patterns": [
    {
      "lexicalMatch": 1.1,
      "lookalikes": [
        {
          "centroidCosine": 1.1,
          "corroborationCount": 1.1,
          "label": "string",
          "patternKey": "string",
          "sharedElements": {},
          "tagJaccard": 1.1
        }
      ],
      "memberTextMatch": 1.1,
      "pattern": {
        "clusteringMethod": "string",
        "confidence": 1.1,
        "contentCount": 1.1,
        "creatorCount": 1.1,
        "earlyCount": 1.1,
        "firstSeenAt": "string",
        "generation": "string",
        "label": "string",
        "labelSource": "string",
        "lateCount": 1.1,
        "lateShare": 1.1,
        "medoidContentUuids": [
          "string"
        ],
        "patternKey": "string",
        "platformCount": 1.1,
        "reconciliation": {
          "cosine": 1.1,
          "memberOverlap": 1.1
        },
        "recurrentElements": [
          {
            "support": 1.1,
            "type": "string",
            "value": "string"
          }
        ],
        "scopeDays": 1.1,
        "summary": "string",
        "tagAttachedMembers": 1.1,
        "totalEngagement": 1.1,
        "trajectory": [
          {
            "contentCount": 1.1,
            "creatorCount": 1.1,
            "generation": "string"
          }
        ]
      },
      "queryRelevance": 1.1,
      "representativeContent": [
        {
          "centroidSimilarity": 1.1,
          "contentUrl": "string",
          "contentUuid": "string",
          "description": "string",
          "engagement": 1.1,
          "isRepresentative": true,
          "platform": "string",
          "publishedAt": "string",
          "title": "string"
        }
      ],
      "visualSimilarity": 1.1
    }
  ],
  "query": "string",
  "request_id": "string",
  "response_time_ms": 1.1,
  "usage": {
    "credits": 1.1
  },
  "window": "30d"
}
```

**SDK Code**

```python
import requests

url = "https://api.kinetk.ai/graph/search"

payload = { "query": "string" }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.kinetk.ai/graph/search';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"query":"string"}'
};

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

```go
package main

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

func main() {

	url := "https://api.kinetk.ai/graph/search"

	payload := strings.NewReader("{\n  \"query\": \"string\"\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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
require 'uri'
require 'net/http'

url = URI("https://api.kinetk.ai/graph/search")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"query\": \"string\"\n}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.kinetk.ai/graph/search")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"query\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.kinetk.ai/graph/search', [
  'body' => '{
  "query": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.kinetk.ai/graph/search");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"query\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["query": "string"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.kinetk.ai/graph/search")! 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()
```

### Example 2

**Request**

```json
{
  "query": "string"
}
```

**Response**

```json
{
  "content": [
    {
      "authorReach": 1.1,
      "commentCount": 1.1,
      "engagementDepth": 1.1,
      "engagementScore": 1.1,
      "exampleRankingScore": 1.1,
      "likeCount": 1.1,
      "narrativeIds": [
        "string"
      ],
      "patternKeys": [
        "string"
      ],
      "rawSimilarity": 1.1,
      "recencyScore": 1.1,
      "rrfScore": 1.1,
      "shareCount": 1.1,
      "similarity": 1.1,
      "tags": [
        "string"
      ],
      "uuid": "string",
      "viewCount": 1.1,
      "contentType": "string",
      "creatorId": 1.1,
      "description": "string",
      "enrichment": {
        "aestheticStyle": [
          "string"
        ],
        "attributeConfidence": 1.1,
        "brandProducts": [
          "string"
        ],
        "coverage": {
          "attributes": true,
          "novelty": true,
          "sentiment": true
        },
        "emotionMood": [
          "string"
        ],
        "noveltyScore": 1.1,
        "saturationScore": 1.1,
        "themes": [
          "string"
        ],
        "tone": "string",
        "toneConfidence": 1.1
      },
      "followerCount": 1.1,
      "intentEvidenceSource": "authored_text",
      "intentSimilarity": 1.1,
      "platform": "string",
      "publishedAt": "string",
      "relevance": 1.1,
      "title": "string"
    }
  ],
  "creators": [
    {
      "creatorId": 1.1,
      "followerCount": 1.1,
      "hits": 1.1,
      "platform": "string"
    }
  ],
  "narratives": [
    {
      "computed_at": "string",
      "content_count": 1.1,
      "creator_count": 1.1,
      "emerging_score": 1.1,
      "id": "string",
      "label": "string",
      "momentum_score": 1.1,
      "platform_count": 1.1,
      "score_breakdown": {
        "content_count": 1.1,
        "creator_count": 1.1,
        "platform_count": 1.1,
        "total_engagement": 1.1,
        "clustering_method": "string",
        "pair_count": 1.1,
        "seed_tag": "string"
      },
      "source": "emergent",
      "summary": "string",
      "top_tags": [
        "string"
      ],
      "total_engagement": "string",
      "window_end": "string",
      "window_key": "30d",
      "window_start": "string",
      "acceleration": 1.1,
      "diffusion": 1.1,
      "lifecycle": "string",
      "memberOverlap": 1.1,
      "narrative_key": "string",
      "overlapZScore": 1.1,
      "overlap_count": 1.1,
      "queryRelevance": 1.1,
      "representative_content_uuid": "string",
      "sentiment_breakdown": {
        "coverage": 1.1,
        "dominant_tone": "string",
        "stance": {
          "critical": 1.1,
          "mixed": 1.1,
          "neutral": 1.1,
          "supportive": 1.1
        },
        "stance_coverage": 1.1
      },
      "sentiment_label": "string",
      "sentiment_score": 1.1,
      "text_rank": 1.1,
      "trajectory_confidence": "string",
      "velocity": 1.1
    }
  ],
  "patterns": [
    {
      "lexicalMatch": 1.1,
      "lookalikes": [
        {
          "centroidCosine": 1.1,
          "corroborationCount": 1.1,
          "label": "string",
          "patternKey": "string",
          "sharedElements": {},
          "tagJaccard": 1.1
        }
      ],
      "memberTextMatch": 1.1,
      "pattern": {
        "clusteringMethod": "string",
        "confidence": 1.1,
        "contentCount": 1.1,
        "creatorCount": 1.1,
        "earlyCount": 1.1,
        "firstSeenAt": "string",
        "generation": "string",
        "label": "string",
        "labelSource": "string",
        "lateCount": 1.1,
        "lateShare": 1.1,
        "medoidContentUuids": [
          "string"
        ],
        "patternKey": "string",
        "platformCount": 1.1,
        "reconciliation": {
          "cosine": 1.1,
          "memberOverlap": 1.1
        },
        "recurrentElements": [
          {
            "support": 1.1,
            "type": "string",
            "value": "string"
          }
        ],
        "scopeDays": 1.1,
        "summary": "string",
        "tagAttachedMembers": 1.1,
        "totalEngagement": 1.1,
        "trajectory": [
          {
            "contentCount": 1.1,
            "creatorCount": 1.1,
            "generation": "string"
          }
        ]
      },
      "queryRelevance": 1.1,
      "representativeContent": [
        {
          "centroidSimilarity": 1.1,
          "contentUrl": "string",
          "contentUuid": "string",
          "description": "string",
          "engagement": 1.1,
          "isRepresentative": true,
          "platform": "string",
          "publishedAt": "string",
          "title": "string"
        }
      ],
      "visualSimilarity": 1.1
    }
  ],
  "query": "string",
  "request_id": "string",
  "response_time_ms": 1.1,
  "usage": {
    "credits": 1.1
  },
  "window": "30d"
}
```

**SDK Code**

```python
import requests

url = "https://api.kinetk.ai/graph/search"

payload = { "query": "string" }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.kinetk.ai/graph/search';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"query":"string"}'
};

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

```go
package main

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

func main() {

	url := "https://api.kinetk.ai/graph/search"

	payload := strings.NewReader("{\n  \"query\": \"string\"\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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
require 'uri'
require 'net/http'

url = URI("https://api.kinetk.ai/graph/search")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"query\": \"string\"\n}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.kinetk.ai/graph/search")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"query\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.kinetk.ai/graph/search', [
  'body' => '{
  "query": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.kinetk.ai/graph/search");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"query\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["query": "string"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.kinetk.ai/graph/search")! 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()
```