Skip to main content
GET
/
search
Results
curl --request GET \
  --url https://api.agentfirst.dev/search \
  --header 'Authorization: Bearer <token>'
{
  "engine": "google",
  "terms": "foo",
  "results": [
    {
      "type": "organic",
      "page": 1,
      "section": "main",
      "feature": 1,
      "position": 1,
      "url": "https://foofighters.com/",
      "title": "Foo Fighters",
      "site": "Foo Fighters",
      "visibleUrl": "https://foofighters.com",
      "date": null,
      "snippet": "Official website of Foo Fighters.",
      "rating": null,
      "votes": null,
      "sitelinks": [
        {
          "position": 1,
          "url": "https://foofighters.com/tour-dates/",
          "title": "Tour Dates"
        }
      ],
      "images": [
        {
          "position": 1,
          "source": "[Image data]",
          "altText": "foo from en.wikipedia.org"
        }
      ]
    }
  ],
  "resultsCount": 43,
  "pageCount": 1,
  "pageSize": null,
  "approxResultsCount": 255000000,
  "resultsOffset": null,
  "country": null,
  "subdivision": null,
  "city": null,
  "uule": null,
  "language": null,
  "display": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

terms
string
required

The broad or exact word or phrase to query (e.g., foo bar baz or "foo bar baz"); the terms require form or URL encoding (with any space character being replaced by a + character or %20 sequence).

Example:

"foo"

serps
integer
default:1

The number of results pages to fetch.

Required range: 1 <= x <= 10
Example:

1

size
integer

The number of results per page to fetch; page size is unset by default.

Required range: 0 <= x <= 100
Example:

null

offset
integer

The number of initial results to skip; results aren’t offset by default.

Required range: 0 <= x <= 100
Example:

null

ip
enum<string>

The type of IP address to search from; a random IP type is used by default.

Available options:
residential,
isp
Example:

null

country
string

The two-letter ISO code of the country to search from (these codes are case insensitive); a random country is used by default.

Example:

null

subdivision
string

The alphanumeric second part (proceeding the separator) of a first-level subdivision code in the (prerequisite) country to search from (these codes are case insensitive); a random subdivision is used by default.

Example:

null

city
string

The commonly spelled name of the city in the (prerequisite) country to search from (these names are temporarily case sensitive and required to include form- or URL-encoded spaces and punctuation marks); a random city is used by default.

Example:

null

uule
string

The proprietary encoded string for emulating the location to search from; if possible, the actual location is searched from not emulated; location emulation is unused by default.

Example:

null

language
string

The commonly spelled name, two-letter ISO code, or Google code of the language to search in (these names and codes are case insensitive but required to include form- or URL-encoded spaces and punctuation marks); the language is unset by default.

Example:

null

display
string

The commonly spelled name, two-letter ISO code, or Google code of the search interface’s display language (these names and codes are case insensitive but required to include form- or URL-encoded spaces and punctuation marks); the display language is unset by default or set to the language if given.

Example:

null

format
enum<string>
default:html

The format to output to.

Available options:
html,
json
Example:

"json"

expiration
integer
default:1

The age in days of when to consider cached results expired, where 0 disables caching.

Required range: 0 <= x <= 1
Example:

0

mode
enum<string>
default:sync

The synchronous or asynchronous mode of results retrieval (see the async resource).

Available options:
sync,
async
Example:

"sync"

Response

The search results.

engine
enum<string>
required

The queried search engine.

Available options:
google
Example:

"google"

terms
string
required

The queried word or phrase.

Example:

"foo"

results
object[]
required
resultsCount
integer
required

The number of parsed results.

Required range: x >= 0
Example:

43

pageCount
integer
required

The number of retrieved results pages.

Required range: 1 <= x <= 10
Example:

1

pageSize
integer

The number of retrieved results per page.

Required range: 0 <= x <= 100
Example:

null

approxResultsCount
integer

The approximate number of indexed results.

Required range: x >= 0
Example:

255000000

resultsOffset
integer

The number of skipped initial results.

Required range: 0 <= x <= 100
Example:

null

country
string

The ISO code of the targeted country.

Example:

null

subdivision
string

The partial ISO code of the targeted subdivision.

Example:

null

city
string

The common name of the targeted city.

Example:

null

uule
string

The encoded string of the emulated location.

Example:

null

language
string

The common name, ISO code, or Google code of the targeted language.

Example:

null

display
string

The common name, ISO code, or Google code of the targeted display language.

Example:

null