How to read the 'remain' and 'not_valid' fields after submitting the link to Baidu's push interface
What do the fields such as remain, not_valid, etc. in the returned results after calling the API for Baidu Search Resource Platform mean?These fields are a remainder signal and a quality signal: 'remain' tells you how much quota is left for the day, 'not_valid' tells you which links in the submission have not passed validation.After each call, read back in the order of 'number of successful items, remaining quota, invalid list', if the numbers match, stop working, if not, check the site ownership and link format.AnQiCMS's link push module is connected to Baidu Push's active push channel, and the returned fields follow the same set of rules.
What does each of the four fields returned successfully manage
| field | Meaning | Subsequent actions |
|---|---|---|
| success | The number of links handled this time | Compare with the number of submissions, the difference enters investigation |
| remain | Daily remaining quota | When zero, the remaining amount is transferred to the next day, or check the entry for raising quota |
| not_same_site | The submitted address does not belong to a verified site | Check if the domain ownership and protocol writing are consistent |
| not_valid | The address is invalid | Check the format, parameters, and page status item by item |
The official document lists API push as the fastest submission method. It is recommended to push new links produced by the site on the same day immediately, so that new links can be discovered by Baidu in a timely manner.
First distinguish which two types of failure to return
Failure responses are divided into two categories: client error codes starting with 4, and 500 server error codes. The former is basically a problem with the call itself - token expiration, site not verified, request format incorrect, retrying a hundred times will not turn green; the latter is a temporary condition on the platform side, just resend it according to the avoidance rhythm. Dealing with both categories together is a major reason why the push script gets more and more messy.
Common reasons for quota being deducted
Firstly, the retry script does not perform idempotence, and the same batch of links is repeatedly submitted to exhaust the quota; secondly, the test data and attachment resource links are also included in the submission list; thirdly, after the site attribution verification fails, the entire batch is resubmitted with different domain names. The safe approach is to actively push only the links produced on the day and not previously pushed, write the four fields into the log after the call, and the next day's reconciliation can clearly see whether the quota consumption comes from normal release.
Which part of the push and sitemap cover
Proactive push solves 'If there are new additions or changes today, inform immediately'; Sitemap (Sitemap) solves 'Full inventory disclosure for periodic rescan'. AnQiCMS supports automatic Sitemap generation and has push channels for Baidu and Bing, with two links managing different segments: new content goes through push for timeliness, and existing corrections rely on the Sitemap. Find a batch of pages that have not been indexed for a long time, first check if they are in the Sitemap, and then see if 'not_valid' is lying in the push return.
Common questions
Question: The remain value is very small, is there a problem with the site?Answer: It is not necessarily so. Quotas are allocated by the platform according to the situation of the site, the small quota only changes the rhythm of 'pushing the content of the day', and the excess part can be submitted in batches. The key is to observe whether the success is consistent with the number of submissions.
Question: If the link always goes to not_valid, what should you check first?Answer: First check the format - whether the protocol and domain are strictly consistent with the verified site, and then check whether the page itself can be accessed normally. If the address is redirected to another place by 301, submit the final address after the redirection is completed.
Question: How long will it take for the push to be included?Answer: Pushing only shortens the 'discovery' process, inclusion and sorting depend on content quality and page experience, do not consider pushing successful as the inclusion is complete.