📄
Documentation
MainMost Pirated MoviesPricingAbout
  • Welcome
  • Quick Start
    • Quick Start Guide
  • Services
    • Overview
    • Pro: Advanced Protection for Catalog Films and Series
    • Max: Premier Protection for New Releases
  • Resources
    • Enforcement and Removing Content from Google
    • Export Data
  • Developers
    • API Documentation
  • FAQs
    • International Sanctions and Service Suspension
    • Billing
Powered by GitBook
On this page
  • 2. Base URL
  • 3. Authentification
  • Request Headers
  • Authentication with Bearer Header
  • Authentication with API Key in Query String
  • 4. Get Project List
  • 5. Get Project URLs
  • 6. Pagination
  • 7. Error Handling
  • 8. Rate Limiting

Was this helpful?

  1. Developers

API Documentation

This documentation provides details on how to authenticate and make requests to the API.

PreviousExport DataNextInternational Sanctions and Service Suspension

Last updated 1 month ago

Was this helpful?

1. Intro

This API delivers a list of projects and URLs flagged for copyright infringement in Google Search. It provides a streamlined interface to integrate our data into your systems, enhancing your ability to monitor and address copyright violations effectively.

Please note that this API is exclusively available for Pro & Max subscription projects. If you are using the free search from the landing page or the Meter subscription, you will not have access to this data via the API. This limitation ensures the robustness and responsiveness of our API for Pro & Max subscribers, providing a more personalized and efficient experience. Please consider upgrading to a Pro or Max subscription to gain access to this valuable resource.

In this documentation, you will find detailed instructions on how to interact with our API, from setting up authentication, to crafting requests and handling responses. This includes complete definitions for all available endpoints, detailed field descriptions, and numerous examples to assist you in your development journey.

We appreciate your interest in our API and look forward to supporting you in integrating our data into your applications, services, or workflows. Please review this documentation carefully, and don't hesitate to reach out if you have any questions or require further information.

2. Base URL

The base URL for the PiracyMeter API is: https://piracymeter.com/api/v1

3. Authentification

To authenticate your requests, you can use one of the available authentification methods:

  • using Authorization header;

  • using key variable in the query string.

For the first authentification method, you need to include the Authorization header with the value of Bearer followed by your API key. The API key can be obtained from the "Account & Billing" section at piracymeter.com.

Example:

Authorization: Bearer <your-api-key>

If you prefer to define your authorization key directly in the query string, you can use the second method.

Example:

https://piracymeter.com/api/v1/projects?key=<your-api-key>

Request Headers

All requests to the Piracymeter API should include the following request header:

  • Accept: application/json - Indicates that you expect the response to be in JSON format.

Authentication with Bearer Header

curl --location 'https://piracymeter.com/api/v1/projects' \
--header 'Authorization: Bearer <your-api-key>' \
--header 'Accept: application/json'
var settings = {
  "url": "https://piracymeter.com/api/v1/projects",
  "method": "GET",
  "headers": {
    "Authorization": "Bearer <your-api-key>",
    "Accept": "application/json"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
const axios = require('axios');

const config = {
  method: 'get',
  url: 'https://piracymeter.com/api/v1/projects',
  headers: {
    'Authorization': 'Bearer <your-api-key>',
    'Accept': 'application/json'
  }
};

axios(config)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.log(error);
  });
<?php
$client = new Client();
$headers = [
  'Authorization' => 'Bearer <your-api-key>'
  'Accept' => 'application/json'
];
$request = new Request('GET', 'https://piracymeter.com/api/v1/projects', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://piracymeter.com/api/v1/projects",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <your-api-key>",
    "Accept: application/json"
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client
 
conn = http.client.HTTPSConnection("piracymeter.com")
payload = ''
headers = {
  'Authorization': 'Bearer <your-api-key>',
  'Accept': 'application/json'
}
conn.request("GET", "/api/v1/projects", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"
 
url = URI("https://piracymeter.com/api/v1/projects")
 
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
 
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <your-api-key>"
request["Accept"] = "application/json"
 
response = https.request(request)
puts response.read_body

Authentication with API Key in Query String

curl --location 'https://piracymeter.com/api/v1/projects?key=<your-api-key>' \
--header 'Accept: application/json'
var settings = {
  "url": "https://piracymeter.com/api/v1/projects?key=<your-api-key>",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  },
};
 
$.ajax(settings).done(function (response) {
  console.log(response);
});
const axios = require('axios');
 
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://piracymeter.com/api/v1/projects?key=<your-api-key>',
  headers: { 
    'Accept': 'application/json'
  }
};
 
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
<?php
$client = new Client();
$headers = [
  'Accept' => 'application/json'
];
$request = new Request('GET', 'https://piracymeter.com/api/v1/projects?key=<your-api-key>', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://piracymeter.com/api/v1/projects?page=1&key=<your-api-key>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import http.client

conn = http.client.HTTPSConnection("piracymeter.com")
payload = ''
headers = {
  'Accept': 'application/json'
}
conn.request("GET", "/api/v1/projects?key=<your-api-key>", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"

url = URI("https://piracymeter.com/api/v1/projects?key=<your-api-key>")

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

request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"

response = https.request(request)
puts response.read_body

Remember to replace<your-api-key> with your valid API key obtained from piracymeter.com.

4. Get Project List

/projects path

curl --location 'https://piracymeter.com/api/v1/projects' \
--header 'Authorization: Bearer <your-api-key>' \
--header 'Accept: application/json'
var settings = {
  "url": "https://piracymeter.com/api/v1/projects",
  "method": "GET",
  "headers": {
    "Authorization": "Bearer <your-api-key>",
    "Accept": "application/json"
  },
};
 
$.ajax(settings).done(function (response) {
  console.log(response);
});
const axios = require('axios');
 
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://piracymeter.com/api/v1/projects',
  headers: { 
    'Authorization': '<your-api-key>', 
    'Accept': 'application/json'
  }
};
 
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
 
<?php
$client = new Client();
$headers = [
  'Authorization' => 'Bearer <your-api-key>',
  'Accept' => 'application/json'
];
$request = new Request('GET', 'https://piracymeter.com/api/v1/projects', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
 
<?php
 
$curl = curl_init();
 
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://piracymeter.com/api/v1/projects',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <your-api-key>',
    'Accept: application/json'
  ),
));
 
$response = curl_exec($curl);
 
curl_close($curl);
echo $response;
import http.client
 
conn = http.client.HTTPSConnection("piracymeter.com")
payload = ''
headers = {
  'Authorization': 'Bearer <your-api-key>',
  'Accept': 'application/json'
}
conn.request("GET", "/api/v1/projects", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"
 
url = URI("https://piracymeter.com/api/v1/projects")
 
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
 
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <your-api-key>"
request["Accept"] = "application/json"
 
response = https.request(request)
puts response.read_body
 

Remember to replace<your-api-key> with your valid API key obtained from piracymeter.com.

5. Get Project URLs

To retrieve the URLs for a specific project, you can make a GET request to the following endpoint:

GET /api/v1/links
curl --location 'https://piracymeter.com/api/v1/links?project_id=<project_id>' \
--header 'Authorization: Bearer <your-api-key>' \
--header 'Accept: application/json'
var settings = {
  "url": "https://piracymeter.com/api/v1/links?project_id=<project_id>",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer <your-api-key>",
    "Accept": "application/json"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://piracymeter.com/api/v1/links?project_id=<project_id>',
  headers: { 
    'Authorization': 'Bearer <your-api-key>', 
    'Accept': 'application/json'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
<?php
$client = new Client();
$headers = [
  'Authorization' => 'Bearer <your-api-key>',
  'Accept' => 'application/json'
];
$request = new Request('GET', 'https://piracymeter.com/api/v1/links?project_id=<project_id>', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://piracymeter.com/api/v1/links?project_id=<project_id>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <your-api-key>',
    'Accept: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import http.client

conn = http.client.HTTPSConnection("piracymeter.com")
payload = ''
headers = {
  'Authorization': 'Bearer <your-api-key>',
  'Accept': 'application/json'
}
conn.request("GET", "/api/v1/links?project_id=<project_id>", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"

url = URI("https://piracymeter.com/api/v1/links?project_id=<project_id>")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <your-api-key>"
request["Accept"] = "application/json"

response = https.request(request)
puts response.read_body

Remember to replace <project_id> in the endpoint URL with the actual ID of the project you want to retrieve the URLs for, and <your-api-key> with your valid API key obtained from piracymeter.com.

6. Pagination

The PiracyMeter API supports pagination for retrieving large sets of data. The response from the API includes information about the available pages and the ability to navigate between them.

The following query parameters can be used for pagination:

  • page (optional): The page number to retrieve. Default is 1.

The response will include the following pagination information:

  • current_page: The current page number.

  • per_page: The number of results per page.

Example response:

{
    "status": "success",
    "data": {
        "links": {
            "current_page": 1,
            "per_page": 100,
            "data": [
                // Results for the current page
            ]
        }
    }    
}

To navigate between pages, you can modify the page query parameter in your API request. For example, to retrieve the second page of results, you can use the following URL:

GET /api/v1/projects?page=2

Remember to include the appropriate authentication headers (Authorization and Accept) in your API requests.

Please note that API may impose rate limits or other restrictions to ensure fair usage.

7. Error Handling

The PiracyMeter API uses standard HTTP status codes to indicate the success or failure of a request. In case of an error, additional information may be provided in the response body.

Here are some common HTTP status codes you may encounter:

  • 200 OK: The request was successful, and the response body contains the requested data.

  • 400 Bad Request: The request was invalid or could not be understood. Check your request parameters and format.

  • 401 Unauthorized: The request lacks valid authentication credentials or the provided API key is invalid.

  • 403 Forbidden: The request is valid, but the server is refusing to respond. Ensure you have the necessary permissions.

  • 404 Not Found: The requested resource was not found. Verify the endpoint URL and resource identifiers.

  • 429 Too Many Requests: The request exceeds the rate limits. Retry the request after a certain period.

  • 500 Internal Server Error: An unexpected error occurred on the server. Contact the PiracyMeter support team if the issue persists.

Example error response:

{
    "status": "error",
    "error": {
        "code": 403,
        "text": "Not authorized."
    }
}

Ensure that your API client handles different status codes appropriately and displays or logs any error messages returned by the API.

8. Rate Limiting

The PiracyMeter API enforces rate limiting to ensure fair usage. The current rate limit is set to 100 requests per minute per API key. If you exceed this limit, you will receive a 429 Too Many Requests response.

How to Get Your API Key from Piracymeter