Piloterr

Bing Search

GET
/v2/bing/search

Scrape real-time Bing search results with full control over location, language, and pagination.

Credit cost: 1 credit per call

Autorisierung

ApiKeyAuth
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

Abfrageparameter

query*string

The search query to execute on Bing. Supports all Bing advanced search operators.

Examples:

  • openai: standard keyword search
  • site:github.com python scraper: restrict results to a specific domain
  • intitle:"openai": match the page title
  • inurl:blog python: match part of the URL

Example:

openai
page?number

Page number of results to retrieve. Used for pagination.

  • 1: First page (default)
  • 2: Second page
  • 3: Third page, etc.
num?number

Number of results per page. Minimum: 10, Maximum: 50.

Note: This parameter is only a suggestion and might not reflect the actual number of results returned.

location?string

City or region from which the search should originate. If multiple locations match, the most popular one is selected.

Note: Cannot be used together with lat/lon. It is recommended to specify location at the city level.

Example:

Austin
lat?number

GPS latitude coordinate for the search origin.

Example:

48.8566
lon?number

GPS longitude coordinate for the search origin.

Example:

2.3522
mkt?string

Market code combining language and country, in the form <language>-<country>. Defines where the results come from.

  • en-US: English, United States (default)
  • fr-FR: French, France
  • de-DE: German, Germany
  • es-ES: Spanish, Spain

Note: Cannot be used together with cc.

cc?string

Two-letter ISO 3166-1 country code defining the country to search from.

  • us: United States
  • de: Germany
  • gb: United Kingdom
  • fr: France

Note: Cannot be used together with mkt.

fields?string

Comma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).

is_async?boolean

Run the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.

Defaultfalse
soft_fail?boolean

Return HTTP 200 even when the request fails; the error is in the error field of the body.

Defaultfalse

Antworttext

Successful response

application/json
  1. response
pagination?
organic_results?array<>
search_parameters?
search_information?
Example Request
curl -X GET 'https://api.piloterr.com/v2/bing/search?query=string'
Example Response
{  "pagination": {    "next": null,    "current": 1,    "other_pages": [],    "has_next_page": false  },  "organic_results": [    {      "link": "https://openai.com/",      "title": "OpenAI",      "domain": "openai.com",      "snippet": "OpenAI is an AI research and deployment company.",      "position": 1,      "displayed_link": "https://openai.com",      "snippet_matched": [        "openai"      ]    },    {      "link": "https://platform.openai.com/docs",      "title": "OpenAI API documentation",      "domain": "platform.openai.com",      "snippet": "Guides and the API reference for the OpenAI platform.",      "position": 2,      "displayed_link": "https://platform.openai.com › docs",      "snippet_matched": []    }  ],  "search_parameters": {    "q": "openai",    "cc": "us",    "lat": null,    "lon": null,    "mkt": "en-US",    "num": null,    "page": 1,    "engine": "bing",    "location": null,    "bing_domain": "bing.com"  },  "search_information": {    "total_results": null  }}