# Is there an API for PHP?

**URL:** https://community.pinecone.io/t/is-there-an-api-for-php/6962
**Category:** Support
**Tags:** sentence-transformer, vector-database
**Created:** [November 16, 2024, 10:15am UTC](https://community.pinecone.io/t/is-there-an-api-for-php/6962 "2024-11-16T10:15:53Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jesse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/jesse/32/1658_2.png) [@jesse](https://community.pinecone.io/u/jesse)
#### Post date: [November 17, 2024, 4:38pm UTC](https://community.pinecone.io/t/is-there-an-api-for-php/6962/2 "2024-11-17T16:38:46Z")

</div>

Hi @shlomo1. Pinecone doesn’t offer an official PHP SDK, but it looks like there are some community-supported SDKs out there. Pinecone hasn’t tested any of them, but at first glance, this one looks more up-to-date than some others: [GitHub - probots-io/pinecone-php: A beautiful, extendable PHP Package to communicate with your pinecone.io indices, collections and vectors.](https://github.com/probots-io/pinecone-php).

Interested to hear if that works for you. If not, it’s always an option to use the API directly with `curl`, for example:

```auto
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.pinecone.io/indexes",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n \"deletion_protection\": \"enabled\",\n \"dimension\": 1536,\n \"metric\": \"cosine\",\n \"name\": \"movie-recommendations\",\n \"spec\": {\n \"serverless\": {\n \"cloud\": \"gcp\",\n \"region\": \"us-east1\"\n }\n }\n}",
  CURLOPT_HTTPHEADER => [
    "Api-Key: <api-key>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

```

Best,  
Jesse

---

_[View the full topic](https://community.pinecone.io/t/is-there-an-api-for-php/6962)._
