Skip to content

Commit

Permalink
Merge pull request #1013 from GSA/afarooque-searchgov-updates
Browse files Browse the repository at this point in the history
Add new sitelimit parameter
  • Loading branch information
MorganRedden authored Jan 30, 2023
2 parents 7506c59 + 188d666 commit 4451c76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _apidocs/searchgov-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This API exposes all relevant Search.gov results “modules” in a single JSON

## Getting Started

The endpoint is `https://api.gsa.gov/technology/searchgov/v2/results/i14y`.
The endpoint is `https://api.gsa.gov/technology/searchgov/v2/results/i14y`. You must use https.

You must use https. You can find your access key on the API Access Key page of the Search.gov Admin Center.
You can find your access key in the [Search.gov Admin Center](https://search.usa.gov/login). On the left side navigation, click the "Activate" (`</>`) icon, and select the API Access Key page.

<p><small><a href="#">Back to top</a></small></p>

Expand Down Expand Up @@ -64,6 +64,7 @@ Sites indexed via sitemaps or crawling will use the `/i14y` endpoint. Because mo
| limit (optional) | Defines the number of results to return. The default is 20, but you can specify between 1 and 50 results. <br> Example: `limit=5`
| offset (optional) | Defines the number of results you want to skip from the first result. The offset is used for implementing pagination. The default is 0 and the maximum is 999. <br> Example: `offset=20`
| sort\_by (optional) | Allowed variables are date and relevance. The default sort is relevance. Add `sort_by=date` to sort by date.
| sitelimit (optional) | Limits the results to the subdomains and/or subfolders provided. Multiple values can be passed using a space-separated list. Example: `sitelimit=search.gov/about search.gov/get-started`. The values passed in the sitelimit must be in scope of the Domains list in the Search.gov Admin Center for your search site.

## Expected Results

Expand Down
7 changes: 7 additions & 0 deletions _apidocs/searchgov-results/v2/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ paths:
type: string
format: string
default: relevance
- name: sitelimit
in: query
description: 'Allows you to limit the results by subdomains or subfolders. You can limit to multiple locations using a space-separated list (ex. `sitelimit=search.gov/about search.gov/get-started`)'
required: false
schema:
type: string
format: string
tags:
- search
responses:
Expand Down

0 comments on commit 4451c76

Please sign in to comment.