View as MarkdownView this page as plain text

AnySearch provides three APIs for search, capability discovery and public URL content extraction. Use /v1/search for general or vertical queries, and /v1/sub-domains to discover vertical capabilities and parameters when needed. With a public webpage URL, optionally call /v1/extract directly to retrieve its content.

Create an account and API Key

No API Key? Use a registration endpoint to create an account and a default key. Registration does not require Authorization.

Choose a method to begin

Email registration

POST /v1/auth/email/register

Create an account and receive a default API Key in one request.

Minimal request · cURL
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

curl -X POST https://api.cn.anysearch.com/v1/auth/email/register \

-H "Content-Type: application/json" \

-d '{

"email": "dev@example.com"

}'

Read after successdata.api_key.keyThe plaintext key is returned once. Save it securely immediately.
View success response
Success response · excerpt
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12

{

"code": 0,

"message": "success",

"data": {

"username": "dev@example.com",

"email": "dev@example.com",

"api_key": {

"key": "as_sk_5d1f0c9a7b3e4d2f8a6c1b0e9d7f3a52",

"name": "default"

}

}

}

Agent registration

POST /v1/api/bot/challengePOST /v1/api/bot/register

Get a challenge, solve it, then submit the answer. Suitable for autonomous agents.

challenge→solve→register
Step 1 · Get a challenge
  1. 1
  2. 2
  3. 3

curl -X POST https://api.cn.anysearch.com/v1/api/bot/challenge \

-H "Content-Type: application/json" \

-d '{}'

Step 2 · Submit your answer
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6

curl -X POST https://api.cn.anysearch.com/v1/api/bot/register \

-H "Content-Type: application/json" \

-d '{

"challenge_id": "ch_9c1f4b2a7d0e4f6b8a3c5d9e1f2a4b6c",

"answer": "89.05"

}'

Read after successdata.api_keyThe plaintext key is returned once. Save it securely immediately.
View success response
Success response (example)
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10

{

"code": 0,

"message": "success",

"data": {

"username": "as_auto_q3Jk9xLm2Ab",

"password": "K7mQ2xRtbV9d",

"api_key": "as_sk_5d1f0c9a7b3e4d2f8a6c1b0e9d7f3a52",

"expires_at": null

}

}

Three reminders for registration: Check the response body field code; some email registration failures still return HTTP 200. Do not log the full response. The key and password are returned once. For registration, request_id is mainly returned in the X-Request-ID response header.

How the APIs work together

WHEN NEEDED · EXTRACT

POST/v1/extract

Extract content

Call directly with a public webpage URL, or optionally extract content from a search result URL for summarization or analysis.

Choose an API

TaskAPIQuota and next step
General or vertical searchPOST/v1/searchUses search quota; extract content afterward if needed.
Discover tags and parametersGET/v1/sub-domainsDoes not consume free or paid search quota; use the definitions in Search.
Read public webpage contentPOST/v1/extractSubject to quota; consult the applicable billing rules.

Complete call example

QUERY
全球AI芯片产业研究
01

Discover capabilities

Sub-domains docs ↗
Request · GET /v1/sub-domains
  1. 1

curl "https://api.cn.anysearch.com/v1/sub-domains?domain=academic"

Response · application/json
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23

{

"code": 0,

"message": "success",

"request_id": "<DISCOVERY_REQUEST_ID>",

"data": {

"domains": [

{

"domain": "academic",

"description": "Scholarly paper search, biomedical literature, preprints, citations, datasets",

"sub_domains": [

{

"sub_domain": "academic.paper",

"description": "Cross-discipline paper search by keyword, title, author, institution with metadata and open access links"

},

{

"sub_domain": "academic.citation",

"description": "Citation relationships, citation counts, reference lists by DOI or title"

}

]

}

]

}

}

Take data.domains[0].sub_domains[0].sub_domain → academic.paper as the tag for the next step
03

Extract text

Extract docs →
Request · POST /v1/extract
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6

curl -X POST https://api.cn.anysearch.com/v1/extract \

-H "Authorization: Bearer YOUR_ANYSEARCH_API_KEY" \

-H "Content-Type: application/json" \

-d '{

"url": "https://doi.org/10.5281/zenodo.17599539"

}'

Response · application/json
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10

{

"code": 0,

"message": "success",

"request_id": "<EXTRACT_REQUEST_ID>",

"data": {

"url": "https://doi.org/10.5281/zenodo.17599539",

"title": "Artificial Intelligence (AI) Chip Market Size, Share, Trends, and Forecast (2024–2030)…",

"content": "Published November 13, 2025 | Version v1 … The global Artificial Intelligence (AI) Chip Market, valued at USD 52.92 billion in 2024, is projected to reach USD 295.56 billion by 2030, growing at a CAGR of 33.2% from 2025 to 2030. Rising adoption of AI-driven technologies …"

}

}

Snippet vs. source text
SEARCH · data.results[0].snippet
The global Artificial Intelligence (AI) Chip Market, valued at USD 52.92 billion in 2024, is projected to reach USD 295.56 billion by 2030, growing at a CAGR of 33.2% from 2025 to 2030.
EXTRACT · data.content (excerpt)
Published November 13, 2025 | Version v1 …The global Artificial Intelligence (AI) Chip Market, valued at USD 52.92 billion in 2024, is projected to reach USD 295.56 billion by 2030, growing at a CAGR of 33.2% from 2025 to 2030.Rising adoption of AI-driven technologies …

Request examples

General search only needs query. The examples below show the same request in five languages. See the Search page for vertical search examples.

cURL · macOS / Linux / Git Bash
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7

curl -X POST https://api.cn.anysearch.com/v1/search \

-H "Authorization: Bearer YOUR_ANYSEARCH_API_KEY" \

-H "Content-Type: application/json" \

-d '{

"query": "Global AI Semiconductor Industry Analysis",

"max_results": 5

}'

Python 3 · requests
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23

import os

import requests

​

response = requests.post(

"https://api.cn.anysearch.com/v1/search",

headers={

"Authorization": f"Bearer {os.environ['ANYSEARCH_API_KEY']}",

},

json={

"query": "Global AI Semiconductor Industry Analysis",

"max_results": 5,

},

timeout=30,

)

​

if not response.ok:

request_id = response.headers.get("X-Request-ID", "unknown")

raise RuntimeError(

f"Request failed: HTTP {response.status_code}; request_id={request_id}"

)

​

result = response.json()

print(result["data"])

JavaScript · Node.js 18+
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22

const response = await fetch("https://api.cn.anysearch.com/v1/search", {

method: "POST",

headers: {

Authorization: `Bearer ${process.env.ANYSEARCH_API_KEY}`,

"Content-Type": "application/json",

},

body: JSON.stringify({

query: "Global AI Semiconductor Industry Analysis",

max_results: 5,

}),

signal: AbortSignal.timeout(30_000),

});

​

if (!response.ok) {

const requestId = response.headers.get("X-Request-ID") ?? "unknown";

throw new Error(

`Request failed: HTTP ${response.status}; request_id=${requestId}`

);

}

​

const result = await response.json();

console.log(result.data);

Go · Standard library
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55

package main

​

import (

"encoding/json"

"fmt"

"net/http"

"os"

"strings"

"time"

)

​

func main() {

req, err := http.NewRequest(

http.MethodPost,

"https://api.cn.anysearch.com/v1/search",

strings.NewReader(`{

"query": "Global AI Semiconductor Industry Analysis",

"max_results": 5

}`),

)

if err != nil {

panic(err)

}

​

req.Header.Set("Authorization", "Bearer "+os.Getenv("ANYSEARCH_API_KEY"))

req.Header.Set("Content-Type", "application/json")

​

client := &http.Client{Timeout: 30 * time.Second}

resp, err := client.Do(req)

if err != nil {

panic(err)

}

defer resp.Body.Close()

​

if resp.StatusCode != http.StatusOK {

requestID := resp.Header.Get("X-Request-ID")

if requestID == "" {

requestID = "unknown"

}

​

panic(fmt.Sprintf(

"Request failed: HTTP %d; request_id=%s",

resp.StatusCode, requestID,

))

}

​

var result struct {

Data json.RawMessage `json:"data"`

}

if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {

panic(err)

}

​

fmt.Println(string(result.Data))

}

Rust · reqwest + serde_json
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39

use reqwest::blocking::Client;

use serde_json::{json, Value};

use std::{env, error::Error, time::Duration};

​

fn main() -> Result<(), Box<dyn Error>> {

let api_key = env::var("ANYSEARCH_API_KEY")?;

​

let client = Client::builder()

.timeout(Duration::from_secs(30))

.build()?;

​

let response = client

.post("https://api.cn.anysearch.com/v1/search")

.bearer_auth(api_key)

.json(&json!({

"query": "Global AI Semiconductor Industry Analysis",

"max_results": 5,

}))

.send()?;

​

if !response.status().is_success() {

let request_id = response

.headers()

.get("X-Request-ID")

.and_then(|value| value.to_str().ok())

.unwrap_or("unknown");

​

return Err(format!(

"Request failed: HTTP {}; request_id={request_id}",

response.status()

)

.into());

}

​

let result: Value = response.json()?;

println!("{}", result["data"]);

​

Ok(())

}

Base URL https://api.cn.anysearch.com Content type Use Content-Type: application/json for POST requests.

Browse domains and capabilities

Find the right capability for your task, then read its parameter definitions before running a vertical search.

General searchgeneralMedia assetsresourceSocial mediasocial_mediaFinancefinanceAcademic researchacademicLawlegalHealthhealthBusinessbusinessCybersecuritysecurityIntellectual propertyipCodecodeEnergyenergyEnvironmentenvironmentAgricultureagricultureTraveltravelFilmfilmGaminggaming
Browse the complete capability directory

Common response envelope

The server generates a UUID v4 request_id for each response and returns the same value in the X-Request-ID response header. A caller-supplied request ID is ignored.

FieldSuccessError
code0-1
message"success"Error description; HTTP 402 may include credentials.
request_idServer-generated UUID v4Use for diagnostics.
dataEndpoint-specific dataInspect the actual response.
error_codeUsually omittedOptional stable error identifier.
Success envelope · data depends on the endpoint
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6

{

"code": 0,

"message": "success",

"request_id": "7d6f4e91-2a83-4c5b-9f10-6e8a3d27b541",

"data": {}

}

FAQ

Must I discover capabilities before a general search?

No. A general search only needs query. Discover definitions when you need a specific vertical capability.

Does format=markdown return a plain Markdown response?

No. The outer Search response remains JSON. The content field uses Markdown.

Does capability discovery consume search quota?

No. It does not consume free or paid search quota or count as search usage. Requests may still be rate limited.

What content can Extract read?

Public HTTP(S) pages containing HTML/XHTML, plain text, JSON or Markdown. PDF, images, audio and video are unsupported.