API文档和添加提交

QQTube API让你只需发送请求,就能轻松下单。这代表你能创建自己的网站,然后转售我们的服务。你的顾客不会知道订单传给我们!

此服务免费提供。 但你需要建立一个帐号,当中拥有足够的资金来购买你要的服务。 有了帐号和资金后,只需产生一个API金钥,你就可以开始了!

API 网址

https://www.qqtube.com/v1-api

Paramters

api_key 所需的

你独有的API金钥。 这仅属于你的帐号。 请勿转让或遗失。

数值例子 172a1c261d1d84916d9e7321153d0416acab98fc

action 所需的

要执行的动作。 本部分用于添加提交,因此请使用“add”。 检索统计在本页下方。

数值例子 add

url 所需的

我们服务的传送去向。为获得最佳兼容性,请删除不需要的信息。

数值例子 https://www.youtube.com/watch?v=jofNR_WkoCE

quantity 所需的

传送的数量

数值例子 1000

id_service 所需的

所用的服务种类。 请从收费版面获取服务ID(注意:你必须具有有效的API金钥才能查看服务ID)

数值例子 3

share_type 可选的

分享去的地方。 这仅适用于服务ID 46(YouTube分享):
提交这个 - 这是分享到的目的地
0 - Facebook
1 - Twitter
2 - Google Plus
3 - Reddit
4 - Blogger
5 - Tumblr
6 - Pinterest
7 - Skyblog
8 - Vkontakte
9 - LinkedIn
10 - Odnoklassniki
11 - StumbleUpon
12 - LiveJournal
13 - Random

数值例子 2

回应

回应会是JSON编码对象。 如果字段为null, empty,不存在或其他没有特别说明的字段,则代表错误存在,以及请求未成功。目前的回应格式只是临时的,最终将更改为包括有关错误或成功的特定代码。

字段说明
statusString 请求是否成功。 如果已添加,该值会是“成功”。 如果不能,那就是“错误”。 将来或会更改,测试是否失败,应该是由于缺少“成功”,而非“错误”。

回应例子

"status":"success"
messageArray 有关成功或失败的一串信息。

回应例子

"messages":
[
	{
		"id":30,
		"message":"Service ID not provided!"
	},
	{
		"id":32,
		"message":"Service does not exist."
	}
]
id_service_submissionInteger QQTube独有的ID用于检索统计信息。 如果你想从QQTube检索统计信息,你需要保存该号码。

回应例子

"id_service_submission":"123456"
short_urlString 若提交的是YouTube链接,它将被缩短为视频ID或用户频道。 其他的可以是完整的链接,或为空白。不需要期望这个条目总是存在。

回应例子

"short_url":"jofNR_WkoCE"
long_urlString 未经任何修改的完整链接。

回应例子

"long_url":"https:\/\/www.youtube.com\/watch?v=jofNR_WkoCE"
start_countInteger 订单开始时读取的数目。

回应例子

"start_count":500000
wanted_countInteger 已购买的数量

回应例子

"wanted_count":20000
current_countInteger 订单根据QQTube读取的目前数目。新增时会与开始位置读取的数目一样。

回应例子

"current_count":500000

代码示例

$url = 'https://www.youtube.com/watch?v=jofNR_WkoCE';
$quantity = '2000';
$id_service = '5';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.qqtube.com/v1-api");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Incase things are slow allow enough time to try.
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Can cause unexpected/no return
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);// Can cause unexpected/no return

$data = array(
	/* Required */
	'api_key' => " 172a1c261d1d84916d9e7321153d0416acab98fc",
	'action' => 'add',
	'url' => $url,
	'quantity' => $quantity,
	'id_service' => $id_service,

	// Country (required when service is geo targeted)
	'geo-countries' => 'US', // ISO Code

);

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$result = json_decode(curl_exec($ch));
							

Example response

{
	"status":"success",
	"id_service_submission":"123456",
	"short_url":"jofNR_WkoCE",
	"long_url":"https:\/\/www.youtube.com\/watch?v=jofNR_WkoCE",
	"start_count":500000,
	"wanted_count":20000,
	"current_count":500000,
	"message":
	[
		{
			"id":100,
			"message":"Successfully added URL"
		}
	]
}
							
信息
验证需要的
HTTP MethodPOST
回应json
Retrieving stats

When retrieving stats we ask that you do not do so excessively otherwise we may be required to throttle your requests. What may be considered excessive:

  • Continuing to retrieve updates on completed submissions
  • Retrieving the same submission every minute
  • Hundreds of retrievals per minute

API Url

https://www.qqtube.com/v1-api

Paramters

api_key required

Your unique API key. This is specific to your account. Do not give it out or lose it!

Example value: 172a1c261d1d84916d9e7321153d0416acab98fc

action required

The action to perform. For retrieving stats use: stats

Example value: stats

id_service_submission required

The id_service_submission which was returned when the submission was added to QQTube. If you do not have this you cannot get stats. You cannot get stats by URL.

Example value: 123456

Response

Response will be a JSON encoded object. If a field is null, empty, non-existant or otherwise not as specifically mentioned it is safe to assume there was an error and the request did not succeed.

FieldTypeDescription
id_service_submissionInteger The unique ID on QQTube used to retrieve stats. If you want to be able to retrieve stats from QQTube you need to save this number.

Example response:

"id_service_submission":"123456"
short_urlString When the submission is a YouTube URL it will be shortened to the video ID or the user channel. For everything else it may be the full URL or empty. Do not expect this to always be present.

Example response:

"short_url":"jofNR_WkoCE"
long_urlString The full URL submitted without any modifications.

Example response:

"long_url":"https:\/\/www.youtube.com\/watch?v=jofNR_WkoCE"
start_countInteger The submissions starting count.

Example response:

"start_count":500000
wanted_countInteger The amount ordered

Example response:

"wanted_count":20000
current_countInteger The submissions current count according to QQTube. This will always be the same as the start count when adding.

Example response:

"current_count":500000
sent_countVaries (Integer / Null) The amount of views sent to the YouTube video. This can return either an Integer or Null. This field is only used for YouTube Views services (ID 54, 55). This field can be ignored for all other services. This field should be used to calculate completion. Completion is when sent_count >= wanted_count

Example response:

"sent_count":4000
total_costFloat The total cost of the submission

Example response:

"total_cost": 12.34
statusArray An array containing information about the status. The list of possible errors is being worked on, however you can use this as a guideline:
id_status is a unique ID for the status. This does not change. Statuses are:
1 = Completed
2 and 3 = In Progress
4 = Unknown error
5-7 = Error
8 = Refunded
9-18 = Error
19 = Stopped
20-25 = Error
name is a short but descriptive name of the status.
type is either info or error. All status IDs except 1, 2, 8 are error.
description is a longer description of what the error means

Example response:

"status":
	{
		"id_status":"2",
		"name":"In Progress",
		"type":"info",
		"description":"Submission is currently receiving what was ordered."
	}
refund_totalFloat The total amount of a refund if a refund was given. Only present if refunded.

Example response:

"refund_total": 12.34
refund_timeDateTime When the submission was refunded. Formatted as ISO 8601. Only present if refunded.

Example response:

"refund_time": "2021-12-30 23:59:59"

Example code

$url = 'https://www.qqtube.com/v1-api';
$data = array(
	/* Required */
	'api_key' => "172a1c261d1d84916d9e7321153d0416acab98fc",
	'action' => 'stats',
	'id_service_submission' => 123456

);
$url .= '?' . http_build_query($data);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Incase things are slow allow enough time to try.
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Can cause unexpected/no return
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);// Can cause unexpected/no return
$result = curl_exec($ch);
$info = curl_getinfo($ch);
$decoded = json_decode($info);
							

Example response

{
	"id_service_submission":"123456",
	"short_url":"yPslBGjuRL0",
	"long_url":"https:\/\/www.youtube.com\/watch?v=yPslBGjuRL0",
	"start_count":"500000",
	"wanted_count":"100000",
	"current_count":"580000",
	"sent_count":"4000",
	"total_cost":"13.00",
	"status":
		{
			"id_status":"2",
			"name":"In Progress",
			"type":"info",
			"description":"Submission is currently receiving what was ordered."
		},
	"refund_total":"13.00",
	"refund_time": "2021-12-30 23:59:59"

}
							
Information
AuthenticationRequired
HTTP MethodGET
Responsejson
Retrieving all submissions

When retrieving submissions we ask that you do not do so excessively otherwise we may be required to throttle your requests.

API Url

https://www.qqtube.com/v1-api

Paramters

api_key required

Your unique API key. This is specific to your account. Do not give it out or lose it!

Example value: 172a1c261d1d84916d9e7321153d0416acab98fc

action required

The action to perform. For retrieving submissions use: submissions

Example value: submissions

starting_after optional

The id_service_submission of the newest submission you wanted to start to go back from. For example if you are retrieving 2 submissions at a time and you have submissions with IDs 1 through 10 you would receive ID 10 and 9 without setting this parameter. By setting this to 9 you would receive 8 and 7 in your request. If setting to 7 you would receive 6 and 5.

Example value: 123456

limit optional

The maximum number of results per request. This minimum is 1, the maximum is 500.

Example value: 200

Response

Response will be a JSON encoded array of submission objects. If a field is null, empty, non-existant or otherwise not as specifically mentioned it is safe to assume there was an error and the request did not succeed.

FieldTypeDescription
id_service_submissionInteger The unique ID on QQTube used to retrieve stats. If you want to be able to retrieve stats from QQTube you need to save this number.

Example response:

"id_service_submission":"123456"
short_urlString When the submission is a YouTube URL it will be shortened to the video ID or the user channel. For everything else it may be the full URL or empty. Do not expect this to always be present.

Example response:

"short_url":"jofNR_WkoCE"
start_countInteger The submissions starting count.

Example response:

"start_count":500000
wanted_countInteger The amount ordered

Example response:

"wanted_count":20000
current_countInteger The submissions current count according to QQTube. This will always be the same as the start count when adding.

Example response:

"current_count":500000
id_statusInteger The status ID of the submission

Example response:

"id_status": 2
id_serviceInteger The service ID it was added to

Example response:

"id_service": 35
total_costFloat The total cost of the submission

Example response:

"total_cost": 12.34
date_addeddatetime A datetime of when the submission was added

Example response:

"date_added": "2020-01-31 16:52:01"

Example code

$url = 'https://www.qqtube.com/v1-api';
$data = array(
	/* Required */
	'api_key' => "172a1c261d1d84916d9e7321153d0416acab98fc",
	'action' => 'submissions',

);
$url .= '?' . http_build_query($data);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Incase things are slow allow enough time to try.
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Can cause unexpected/no return
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);// Can cause unexpected/no return
$result = curl_exec($ch);
$info = curl_getinfo($ch);
$decoded = json_decode($info);
							

Example response

[
    {
        "id_service_submission": "2",
        "short_url": "jofNR_WkoCE",
        "id_status": "2",
        "id_service": "30",
        "start_count": "200000",
        "wanted_count": "1000",
        "current_count": "200001",
        "total_cost": "0.60",
        "date_added": "2020-07-30 16:56:40"
    },
    {
        "id_service_submission": "1",
        "short_url": "dQw4w9WgXcQ",
        "id_status": "1",
        "id_service": "30",
        "start_count": "200000",
        "wanted_count": "1000",
        "current_count": "200001",
        "total_cost": "0.60",
        "date_added": "2020-07-30 16:52:14"
    }
]
							
Information
AuthenticationRequired
HTTP MethodPOST
Responsejson
Get Current Funds

Used to get the amount of funds on your account

API Url

https://www.qqtube.com/v1-api

Paramters

api_key required

Your unique API key. This is specific to your account. Do not give it out or lose it!

Example value: 172a1c261d1d84916d9e7321153d0416acab98fc

action required

The action to perform. For retrieving funds use: funds

Example value: funds

Response

Response will be a JSON encoded object. If a field is null, empty, non-existant or otherwise not as specifically mentioned it is safe to assume there was an error and the request did not succeed.

FieldTypeDescription
fundsString The amount of funds on the account

Example response:

"funds": "34.21"

Example code

$url = 'https://www.qqtube.com/v1-api';
$data = array(
	/* Required */
	'api_key' => "172a1c261d1d84916d9e7321153d0416acab98fc",
	'action' => 'funds'

);
$url .= '?' . http_build_query($data);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Incase things are slow allow enough time to try.
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Can cause unexpected/no return
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);// Can cause unexpected/no return
$result = curl_exec($ch);
$info = curl_getinfo($ch);
$decoded = json_decode($info);
							

Example response

{
	"funds":"508.60"
}
							
Information
AuthenticationRequired
HTTP MethodGET
Responsejson
Get Active Services

This will return all active services with their pricing and parameters available for your account. This will have all the info needed for you to automatically setup or determine pricing.

API Url

https://www.qqtube.com/v1-api

Paramters

api_key required

Your unique API key. This is specific to your account. Do not give it out or lose it!

Example value: 172a1c261d1d84916d9e7321153d0416acab98fc

action required

The action to perform. For retrieving services use: services

Example value: services

Response

Response will be a JSON encoded object. If a field is null, empty, non-existant or otherwise not as specifically mentioned it is safe to assume there was an error and the request did not succeed.

FieldTypeDescription
id_serviceString The service ID you must send when adding to QQTube
public_nameString User friendly name, acceptable for showing to customers
amount_minimumString The minimum amount that can be added for this service
amount_incrementString The increment amount which must be followed for this service. For example if set to 1000 it must be 1000, 2000, 3000 etc
is_geoString If the service is a Geo-Targeted service
is_retentionString If the service is meant for retention delivery
is_dripString If the service is drip-feed enabled.
drip_costString How much it costs for drip speed per increment amount
exampleString An example of the URL expected
type_nameString What type of service it is for (views, shares, likes etc.) You can use this to group together similar services.
pricesArray (of objects) Each object is a price "group". There may be different pricing for different amounts ordered. Please be sure to check the minimum and maximums to determine if your wanted_count falls in it.
prices[minimum]String The minimum required to receive this pricing
prices[maximum]String The maximum allowed to receive this pricing
prices[pricing_per]String This is what pricing is based on. For every of these it will cost the price. Example: If this is 1000 and "price" shows $2.50 you will be charged that per 1000
prices[price]String The price for the range of amount (min, max)
paramsArray (of objects) A service may have "parameters" or "params" which are used to further configure the order. When placing an order you will need to only send two things:
"field_name" - This will need to be the key / field name to send The value - This may provided in the "options" as "option[value]" or it may be something the user provides
params[field_label]String A customer viewable name of what the parameter is for/what it is
params[field_descr]String A description of the parameter
params[field_placeholder]String A customer viewable form placeholder
params[field_name]String This is what needs to be sent to QQTube as the key / parameter name.
params[field_validators]String This describes what is required for the parameter. Each validator is separated by a pipe character. If the validator can be configured it will have a colon and the value after it.
Validators:
Name - Configuration if any - Description
"required" - No configuration - This parameter must be sent. If this is not present the parameter is optional.
"min" - Integer - The minimum number/amount that this parameter requires
"max" - Integer - The maximum number/amount that this parameter can have
"increment" - Integer - How much the number/amount that this parameter must be incremented by
"minchar" - Integer - The minimum amount of characters that must be sent.
"maxchar" - Integer - The maximum amount of characters that can be sent.
"minlines" - Integer - The minimum amount of lines that must be sent. Please send with \n line endings.
params[is_price_modifier]String If this parameter will modify the price given in the "prices" array
params[modify_type]String If "is_price_modifier" is true then this will either be "add" or "multiply"
When set to "add" it will add params[modify_by] for every params[modify_every] to the total price
When set to "multiply" it will be: (ProvidedAmount / params[modify_every]) * params[modify_by]
params[modify_every]String Modifies the price for every one of these. Please read "modify_type" to see how it works.
params[modify_by]String Modify the price by this. Please read "modify_type" to see how it works.
params[options]Array (of objects) If the parameter expects a specific value this will be an array of what is expected as well as customer viewable names.
params[options][name]String Customer viewable name of the option
params[options][value]String The value which would be for this option.
params[options][error_selection]String This is not a valid option/value and is only as a default value to helpfully guide the customer.

Example response

  {
    "id_service": "80",
    "public_name": "YouTube Geo-target Views",
    "amount_minimum": "1000",
    "amount_increment": "1000",
    "is_geo": "0",
    "is_retention": "0",
    "is_drip": "0",
    "drip_cost": "0.00",
    "example": "https://www.youtube.com/watch?v=abcdef",
    "type_name": "geo views",
    "prices": [
      {
        "id_service_pricing": "1",
        "id_service": "80",
        "minimum": "1000",
        "maximum": "100000",
        "pricing_per": "1000",
        "price": "2.50"
      }
    ],
    "countries": false,
    "params": [
      {
        "id_service_params": "6",
        "id_service": "80",
        "field_label": "Country Selection",
        "field_descr": "Select the country you want views from",
        "field_placeholder": "",
        "field_name": "geotarget",
        "field_type": "dropdown",
        "field_validators": "required",
        "is_price_modifier": "0",
        "modify_type": "",
        "modify_every": "0.000000",
        "modify_by": "0.000000",
        "options": [
          {
            "id_service_param_option": "19",
            "id_service_param": "6",
            "name": "Select a country",
            "value": "0",
            "error_selection": "1",
            "order_by": "0",
            "active": "1"
          },
          {
            "id_service_param_option": "20",
            "id_service_param": "6",
            "name": "United States",
            "value": "21",
            "error_selection": "0",
            "order_by": "10",
            "active": "1"
          }
        ],
        "override_id": false,
        "id": 6,
        "id_shop_list": null
      }
    ]
  }
							
Information
AuthenticationRequired
HTTP MethodGET
Responsejson
QQTube 与 YouTube, Pinterest, Shazam, SoundCloud, Twitch, 抖音, Spotify, Vimeo, DailyMotion没有隶属或合作关系