> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Banned Hashtags

> A banned hashtag checker

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

export const HeaderAPI = ({noProfileKey, profileKeyRequired}) => <>
    <ParamField header="Authorization" type="string" required>
      <a href="/apis/overview#authorization">API Key</a> of the Primary Profile.
      <br />
      <br />
      Format: <code>Authorization: Bearer API_KEY</code>
    </ParamField>
    {!noProfileKey && (profileKeyRequired ? <ParamField header="Profile-Key" type="string" required>
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField> : <ParamField header="Profile-Key" type="string">
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField>)}
  </>;

<PlansAvailable plans={["premium"]} maxPackRequired={false} />

A banned hashtag checker to validate if the given hashtag has been banned by Instagram or other social networks.

## Header Parameters

<HeaderAPI noProfileKey />

## Query Parameters

<ParamField query="hashtag" type="string" required>
  The hashtag to validate. Format: "hashtag" or "#hashtag"
</ParamField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl --location --request GET 'https://api.ayrshare.com/ayrshare/api/hashtags/banned?hashtag=%23bikinibody' \
  --header 'Authorization: Bearer API_KEY'
  ```

  ```javascript JavaScript theme={"system"}
  const myHeaders = new Headers();
  myHeaders.append("Authorization", "Bearer API_KEY");

  const urlencoded = new URLSearchParams();

  const requestOptions = {
    method: 'GET',
    headers: myHeaders,
  };

  fetch("https://api.ayrshare.com/api/hashtags/banned?hashtag=%23bikinibody", requestOptions)
    .then(response => response.json())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
  ```

  ```python Python theme={"system"}
  import requests

  # Your API key
  API_KEY = "Bearer API_KEY"

  # Headers
  headers = {
      "Authorization": API_KEY
  }

  # URL
  url = "https://api.ayrshare.com/api/hashtags/banned?hashtag=%23bikinibody"

  # Making the GET request
  response = requests.get(url, headers=headers)

  # Checking if the request was successful
  if response.status_code == 200:
      # Parse JSON response
      result = response.json()
      print(result)
  else:
      print("Error:", response.status_code)
  ```

  ```php PHP theme={"system"}
  <?php

  // Your API key
  $apiKey = "Bearer API_KEY";

  // URL
  $url = "https://api.ayrshare.com/api/hashtags/banned?hashtag=%23bikinibody";

  // Initialize cURL session
  $ch = curl_init($url);

  // Set cURL options
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "Authorization: $apiKey"
  ]);

  // Execute cURL session
  $response = curl_exec($ch);

  // Check if any error occurred
  if(curl_errno($ch)) {
      echo 'Curl error: ' . curl_error($ch);
  } else {
      // Decode JSON response
      $result = json_decode($response, true);
      echo print_r($result, true);
  }

  // Close cURL session
  curl_close($ch);

  ?>
  ```

  ```csharp C# theme={"system"}
  using System;
  using System.Net.Http;
  using System.Threading.Tasks;

  namespace ConsoleApp
  {
      class Program
      {
          static async Task Main(string[] args)
          {
              // Your API key
              string apiKey = "Bearer API_KEY";

              // URL
              string url = "https://api.ayrshare.com/api/hashtags/banned?hashtag=%23bikinibody";

              using (var httpClient = new HttpClient())
              {
                  // Set the Authorization header with your API key
                  httpClient.DefaultRequestHeaders.Add("Authorization", apiKey);

                  try
                  {
                      // Make the GET request
                      HttpResponseMessage response = await httpClient.GetAsync(url);

                      if (response.IsSuccessStatusCode)
                      {
                          // Read the response content as a string
                          string result = await response.Content.ReadAsStringAsync();
                          Console.WriteLine(result);
                      }
                      else
                      {
                          Console.WriteLine($"Error: {response.StatusCode}");
                      }
                  }
                  catch (HttpRequestException e)
                  {
                      Console.WriteLine($"Request exception: {e.Message}");
                  }
              }
          }
      }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
      "hashtag": "#bikinibody",
      "banned": true
  }
  ```

  ```json 400 theme={"system"}
  {
    "action": "request",
    "status": "error",
    "code": 101,
    "message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
  }
  ```
</ResponseExample>
